diff --git a/.gitignore b/.gitignore index 722d5e7..07eddc4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,15 @@ .vscode +*.exe +*.txt +*.a +*.dll +!allegro_acodec-5.0.10-md.dll +!allegro_audio-5.0.10-md.dll +!allegro_image-5.0.10-md.dll +!allegro_primitives-5.0.10-md.dll +!allegro-5.0.10-md.dll +!liballegro_audio-5.0.10-md.a +!liballegro_acodec-5.0.10-md.a +!liballegro_image-5.0.10-md.a +!liballegro_dialog-5.0.10-md.a +!liballegro_primitives-5.0.10-md.a \ No newline at end of file diff --git a/Game.c b/Game.c new file mode 100644 index 0000000..d1ec000 --- /dev/null +++ b/Game.c @@ -0,0 +1,797 @@ +/* + Author: Asrın "Syntriax" Doğan + Date: 25.08.2019 + Mail: asrindogan99@gmail.com +*/ + +#include +#include +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_audio.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_acodec.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_image.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_primitives.h" +#define playerSpeed 7.5 +#define bulletSpeed 25 +#define numberSize 5 +#define scoreDigitLimit 10 +#define enemyLimiter 8 +#define initialEnemyLimit 3 + +typedef struct +{ + float x; + float y; +} Vector2D; + +struct +{ + Vector2D position; + char health; + float moveSpeed; + byte lookDirection; + int shootPerSecond; + float shootCooldown; + unsigned int killedEnemyCount; + unsigned int score; + + ALLEGRO_BITMAP *playerImage; +} player; + +typedef struct +{ + Vector2D position; + char health; + float moveSpeed; + float fireCooldown; + Vector2D velocity; +} Enemy; + +struct +{ + int enemyLimit; + int enemyCount; + Enemy *enemyArray; +} enemies; + +typedef struct +{ + char isEnemyBullet; + Vector2D position; + Vector2D velocity; +} Bullet; + +struct +{ + int bulletCount; + Bullet *bulletArray; +} bullets; + +void SpawnEnemies(); +void CheckBullets(); +void RemoveBulletAtIndex(int index); +void RemoveEnemyAtIndex(int index); +void CheckEnemies(); +void MoveEnemies(); +void InitializeEnemies(); +void DestroyGame(); +void DrawObject(Vector2D position, ALLEGRO_BITMAP *image, int flag); +void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectSizeMultiplier); +void DrawScreen(); +void DrawScore(); +void DrawNumber(Vector2D position, int number); +void Inputs(); +void PlayerMovement(); +void BulletMovement(); +void ShootSoundEffect(); +void DieSoundEffect(); +void PlayerShoot(); +void EnemyShoot(); +void BulletCollisions(); +void Update(); +void DestroyGameWindow(); +float VectorMagnitude(Vector2D vector); +float VectorDistance(Vector2D vectorFirst, Vector2D vectorSecond); +byte isVectorExceedingLimits(Vector2D vector, Vector2D limits); +byte CheckCollision(Vector2D *firstPos, Vector2D *secondPos, ALLEGRO_BITMAP *firstMap, ALLEGRO_BITMAP *secondMap); +char InitializeGameWindow(); +char InitializeGame(); +char DealDamage(char *health, int damage); +Vector2D NormalizeVector(Vector2D vector); + +ALLEGRO_KEYBOARD_STATE keyboardState; +ALLEGRO_DISPLAY *display; +ALLEGRO_DISPLAY_MODE disp_data; +ALLEGRO_EVENT_QUEUE *event_queue = NULL; +ALLEGRO_TIMER *timer = NULL; +ALLEGRO_COLOR backgroundColor; +ALLEGRO_BITMAP *gameOverImage; + +ALLEGRO_SAMPLE *shootSound; +ALLEGRO_SAMPLE_ID shootSoundID; + +ALLEGRO_BITMAP *enemyImage; +ALLEGRO_BITMAP *enemyBulletImage; +ALLEGRO_SAMPLE *enemyDieSound; +ALLEGRO_SAMPLE_ID enemyDieSoundID; + +ALLEGRO_BITMAP *numberTable; + +const char *displayName = "Syn Game"; +const Vector2D referenceScreenDimensions = {160, 90}; +Vector2D screenDimensions = {0, 0}; +Vector2D scorePosition = {0, 0}; +Vector2D highScorePosition = {0, 0}; +float sizeMultiplier; +float timeFromStart; +const float FPS = 60; +double deltaTime; +unsigned int enemyRespawnCounter = 0; +Vector2D input; +byte isRestart = 0; +byte isRunning = 1; +byte isGameStarted = 0; +byte isGameOver = 0; + +void Update() +{ + al_get_keyboard_state(&keyboardState); + + if(al_key_down(&keyboardState, ALLEGRO_KEY_ESCAPE)) + isRunning = 0; + + al_clear_to_color(backgroundColor); + + if(!isGameOver) + { + printf("Inputs();\n"); + Inputs(); + + if(al_key_down(&keyboardState, ALLEGRO_KEY_F)) + player.score += 1000; + // enemies.enemyLimit++; + + printf("PlayerMovement();\n"); + PlayerMovement(); + + printf("EnemyShoot();\n"); + EnemyShoot(); + + printf("BulletCollisions();\n"); + BulletCollisions(); + + if(player.shootCooldown < 0.0f) + { + if(al_key_down(&keyboardState, ALLEGRO_KEY_SPACE)) + { + printf("PlayerShoot();\n"); + PlayerShoot(); + } + } + else + player.shootCooldown -= deltaTime; + + timeFromStart += deltaTime; + player.score = (int)(timeFromStart * timeFromStart) * player.killedEnemyCount; + + if(enemies.enemyLimit != enemyLimiter) + { + enemies.enemyLimit = initialEnemyLimit + (int)(timeFromStart / 10); + if(enemies.enemyCount > enemyLimiter) + enemies.enemyLimit = enemyLimiter; + } + } + else if(al_key_down(&keyboardState, ALLEGRO_KEY_R)) + isRestart = 1; + + + printf("CheckEnemies();\n"); + CheckEnemies(); + + printf("MoveEnemies();\n"); + MoveEnemies(); + + printf("CheckBullets();\n"); + CheckBullets(); + + printf("BulletMovement();\n"); + BulletMovement(); + + printf("DrawScreen();\n"); + DrawScreen(); + + + al_flip_display(); +} + + +int main(int argc, char **argv) +{ + if(InitializeGameWindow() == 0) + return 0; + do + { + if(InitializeGame() == 0) + return 0; + + while (isRunning && !isRestart) + { + ALLEGRO_EVENT ev; + al_wait_for_event(event_queue, &ev); + + if(ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE) + isRunning = 0; + + if(ev.type == ALLEGRO_EVENT_TIMER) + Update(); + } + + DestroyGame(); + } while (isRestart); + + DestroyGameWindow(); + + getchar(); + return 0; +} + +Vector2D NormalizeVector(Vector2D vector) +{ + Vector2D normalizedVector; + float magnitude = sqrt(vector.x * vector.x + vector.y * vector.y); + + if(vector.x == 0.0 && vector.y == 0.0) + return vector; + + normalizedVector.x = vector.x / magnitude; + normalizedVector.y = vector.y / magnitude; + + return normalizedVector; +} + +float VectorMagnitude(Vector2D vector) +{ + return sqrt(vector.x * vector.x + vector.y * vector.y); +} + +float VectorDistance(Vector2D vectorFirst, Vector2D vectorSecond) +{ + Vector2D difference; + difference.x = abs(vectorFirst.x - vectorSecond.x); + difference.y = abs(vectorFirst.y - vectorSecond.y); + return VectorMagnitude(difference); +} + +byte isVectorExceedingLimits(Vector2D vector, Vector2D limits) +{ + byte result = vector.x > limits.x || vector.x < 0 || vector.y > limits.y || vector.y < 0; + return result; +} + +byte CheckCollision(Vector2D *firstPos, Vector2D *secondPos, ALLEGRO_BITMAP *firstMap, ALLEGRO_BITMAP *secondMap) +{ + Vector2D firstImageSize; + Vector2D secondImageSize; + byte result; + float minDistance; + float distance; + firstImageSize.x = (float)al_get_bitmap_width(firstMap); + firstImageSize.y = (float)al_get_bitmap_height(firstMap); + secondImageSize.x = (float)al_get_bitmap_width(secondMap); + secondImageSize.y = (float)al_get_bitmap_height(secondMap); + + minDistance = firstImageSize.x > firstImageSize.y ? firstImageSize.y : firstImageSize.x; + minDistance += secondImageSize.x > secondImageSize.y ? secondImageSize.y : secondImageSize.x; + + minDistance /= 2; + minDistance *= sizeMultiplier; + + distance = VectorDistance(*firstPos, *secondPos); + + result = distance <= minDistance; + return result; +} + +char InitializeGameWindow() +{ + float x = 0.0f; + float y = 0.0f; + + if(!al_init() || + !al_init_primitives_addon() || + !al_init_image_addon() || + !al_install_audio() || + !al_init_acodec_addon() || + !al_reserve_samples(1)) + return 0; + + al_get_display_mode(al_get_num_display_modes() - 1, &disp_data); + al_set_new_display_flags(ALLEGRO_FULLSCREEN); + + x = disp_data.width; + y = disp_data.height; + /* x = 1600; */ + /* y = 900; */ + + screenDimensions = (Vector2D){x, y}; + scorePosition = (Vector2D){x * (float)0.05, y * (float)0.05}; + highScorePosition = (Vector2D){x * (float)0.05, y * (float)0.95}; + sizeMultiplier = screenDimensions.x / referenceScreenDimensions.x; + display = al_create_display(screenDimensions.x, screenDimensions.y); + + if(display == NULL) + return 0; + + if(!al_install_keyboard()) + return 0; + + deltaTime = 1.0 / FPS; + timer = al_create_timer(deltaTime); + event_queue = al_create_event_queue(); + + if(event_queue == NULL) + { + printf("Event Queue Error"); + al_destroy_display(display); + al_destroy_timer(timer); + return 0; + } + + al_register_event_source(event_queue, al_get_keyboard_event_source()); + al_register_event_source(event_queue, al_get_display_event_source(display)); + al_register_event_source(event_queue, al_get_timer_event_source(timer)); + + al_start_timer(timer); + al_set_window_title(display, displayName); + + backgroundColor.a = 1; + backgroundColor.a = 0; + backgroundColor.a = 0; + backgroundColor.a = 0; +} + +char InitializeGame() +{ + shootSound = al_load_sample("Sounds/Shoot.wav"); + enemyDieSound = al_load_sample("Sounds/Die.wav"); + + InitializeEnemies(); + + /* Player Initialization */ + player.position.x = screenDimensions.x / 2; + player.position.y = screenDimensions.y / 2; + player.moveSpeed = playerSpeed; + player.shootPerSecond = 10; + player.health = 100; + player.playerImage = al_load_bitmap("Images/Player.png"); + bullets.bulletCount = 0; + bullets.bulletArray = (Bullet *) malloc(sizeof(Bullet) * bullets.bulletCount); + if(player.playerImage == NULL || + shootSound == NULL || + enemyDieSound == NULL) + return 0; + + isRunning = 1; + isRestart = 0; + isGameOver = 0; + isGameStarted = 0; + timeFromStart = 0; + player.killedEnemyCount = 0; + return 1; +} + +void InitializeEnemies() +{ + int i = 0; + enemies.enemyLimit = initialEnemyLimit; + enemies.enemyCount = 0; + enemies.enemyArray = (Enemy *) malloc(sizeof(Enemy) * enemies.enemyCount); + enemyImage = al_load_bitmap("Images/Enemy.png"); + numberTable = al_load_bitmap("Images/Numbers.png"); + enemyBulletImage = al_load_bitmap("Images/Bullet.png"); + gameOverImage = al_load_bitmap("Images/GameOver.png"); + SpawnEnemies(); +} + +void SpawnEnemies() +{ + if(enemyRespawnCounter > 10000) + enemyRespawnCounter = 0; + + Vector2D enemySpawnVector; + Vector2D enemyvelocity; + Enemy *enemy; + float speed; + int randomNumber; + while (enemies.enemyCount < enemies.enemyLimit) + { + srand(time(0) + enemyRespawnCounter); + enemies.enemyCount++; + randomNumber = rand() * enemies.enemyCount; + enemies.enemyArray = (Enemy *) realloc(enemies.enemyArray, sizeof(Enemy) * enemies.enemyCount); + enemyvelocity.x = (float)(randomNumber % 20000) / 10000; + enemyvelocity.y = (float)(randomNumber % 2000) / 1000; + enemyvelocity.x *= randomNumber % 2 == 0 ? -1 : 1; + enemyvelocity.y *= randomNumber % 4 >= 2 ? -1 : 1; + + speed = (float)(randomNumber % 500 / 100 + 2); + enemy = (enemies.enemyArray + enemies.enemyCount - 1); + enemy -> velocity = NormalizeVector(enemyvelocity); + enemy -> moveSpeed = speed; + + enemySpawnVector.x = enemyvelocity.x > 0 ? 0 : screenDimensions.x; + enemySpawnVector.y = enemyvelocity.y > 0 ? 0 : screenDimensions.y; + + enemy -> position = enemySpawnVector; + enemy -> fireCooldown = 01.0 / (rand() % 5) + 2.0; + + enemyRespawnCounter++; + } +} + +void CheckBullets() +{ + int i = 0; + int j = 0; + + for (; i < bullets.bulletCount; i++) + { + if(isVectorExceedingLimits((bullets.bulletArray + i) -> position, screenDimensions)) + { + for (j = i; j < bullets.bulletCount - 1; j++) + *(bullets.bulletArray + j) = *(bullets.bulletArray + j + 1); + + bullets.bulletCount--; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + } + } +} + +void RemoveBulletAtIndex(int index) +{ + printf("RemoveBulletAtIndex();\n"); + for (; index < bullets.bulletCount - 1; index++) + *(bullets.bulletArray + index) = *(bullets.bulletArray + index + 1); + + bullets.bulletCount--; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); +} + +void RemoveEnemyAtIndex(int index) +{ + printf("RemoveEnemyAtIndex();\n"); + for (; index < enemies.enemyCount - 1; index++) + *(enemies.enemyArray + index) = *(enemies.enemyArray + index + 1); + + enemies.enemyCount--; + enemies.enemyArray = (Enemy *) realloc(enemies.enemyArray, sizeof(Enemy) * enemies.enemyCount); + printf("New Enemy Count = %d\n", enemies.enemyCount); + DieSoundEffect(); +} + +void CheckEnemies() +{ + int i = 0; + + for (; i < enemies.enemyCount; i++) + if(isVectorExceedingLimits((enemies.enemyArray + i) -> position, screenDimensions)) + RemoveEnemyAtIndex(i); + + SpawnEnemies(); +} + +void MoveEnemies() +{ + int i = 0; + Vector2D velocity; + float speed; + + for (; i < enemies.enemyCount; i++) + { + speed = (enemies.enemyArray + i) -> moveSpeed; + velocity = (enemies.enemyArray + i) -> velocity; + (enemies.enemyArray + i) -> position.x += velocity.x * speed; + (enemies.enemyArray + i) -> position.y += velocity.y * speed; + } +} +void DrawObject(Vector2D position, ALLEGRO_BITMAP *image, int flag) +{ + Vector2D InstantiateSize; + InstantiateSize.x = (float)al_get_bitmap_width(image); + InstantiateSize.y = (float)al_get_bitmap_height(image); + + al_draw_scaled_bitmap(image, + 0, 0, InstantiateSize.x, InstantiateSize.y, + position.x - InstantiateSize.x / 2 * sizeMultiplier, position.y - InstantiateSize.y / 2 * sizeMultiplier, + InstantiateSize.x * sizeMultiplier, InstantiateSize.y * sizeMultiplier, flag); +} + +void DrawNumber(Vector2D position, int number) +{ + Vector2D InstantiateSize; + float numberFactor; + InstantiateSize.x = (float)al_get_bitmap_width(numberTable); + InstantiateSize.y = (float)al_get_bitmap_height(numberTable); + numberFactor = InstantiateSize.x / 10.0; + + al_draw_scaled_bitmap(numberTable, + numberFactor * number, 0, numberFactor, InstantiateSize.y, + position.x - numberFactor / 2 * sizeMultiplier, position.y - InstantiateSize.y / 2 * sizeMultiplier, + numberFactor * sizeMultiplier, InstantiateSize.y * sizeMultiplier, 0); +} + +void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectSizeMultiplier) +{ + Vector2D InstantiateSize; + float sizeFactor = sizeMultiplier * objectSizeMultiplier; + InstantiateSize.x = (float)al_get_bitmap_width(image); + InstantiateSize.y = (float)al_get_bitmap_height(image); + + al_draw_scaled_bitmap(image, + 0, 0, InstantiateSize.x, InstantiateSize.y, + position.x - InstantiateSize.x / 2 * sizeFactor, position.y - InstantiateSize.y / 2 * sizeFactor, + InstantiateSize.x * sizeFactor, InstantiateSize.y * sizeFactor, flag); +} + +void DrawScreen() +{ + int i = 0; + Vector2D halfScreen = {screenDimensions.x / 2, screenDimensions.y / 2}; + + /* Enemy Draw */ + for (i = 0; i < enemies.enemyCount; i++) + DrawObject((enemies.enemyArray + i) -> position, enemyImage, (enemies.enemyArray + i) -> velocity.x > 0 ? ALLEGRO_FLIP_HORIZONTAL : 0 ); + + /* Bullet Draw */ + for (i = 0; i < bullets.bulletCount; i++) + DrawObject((bullets.bulletArray + i) -> position, enemyBulletImage, 0); + + /* Player Draw */ + if(!isGameOver) + DrawObject(player.position, player.playerImage, player.lookDirection == 1 ? ALLEGRO_FLIP_HORIZONTAL : 0); + else + DrawObject(halfScreen, gameOverImage, 0); + + DrawScore(); +} + +void DrawScore() +{ + unsigned int processedScore = player.score; + char digit; + Vector2D spawnPosition; + int i = scoreDigitLimit; + + /*while (processedScore >= 1 && i > 0)*/ + while (i > 0) + { + spawnPosition = scorePosition; + /* numberSize + 1 is because 1 pixel space between digits */ + spawnPosition.x += sizeMultiplier * (numberSize + 1) * i; + digit = processedScore % 10; + processedScore = (int)(processedScore / 10); + DrawNumber(spawnPosition, digit); + i--; + } +} + +void Inputs() +{ + input.x = 0; + input.y = 0; + + if(al_key_down(&keyboardState, ALLEGRO_KEY_UP)) + input.y = -1; + else if(al_key_down(&keyboardState, ALLEGRO_KEY_DOWN)) + input.y = 1; + + if(al_key_down(&keyboardState, ALLEGRO_KEY_RIGHT)) + { + input.x = 1; + player.lookDirection = input.x; + } + else if(al_key_down(&keyboardState, ALLEGRO_KEY_LEFT)) + { + input.x = -1; + player.lookDirection = input.x; + } + + + input = NormalizeVector(input); +} + +void PlayerMovement() +{ + player.position.x += input.x * player.moveSpeed; + player.position.y += input.y * player.moveSpeed; +} + +char DealDamage(char *health, int damage) +{ + int healthInt = *health; + *health -= damage; + + return healthInt <= 0; +} + +void BulletMovement() +{ + Bullet *bullet; + int i = 0; + for (; i < bullets.bulletCount; i++) + { + bullet = (bullets.bulletArray + i); + bullet -> position.x += bullet -> velocity.x; + bullet -> position.y += bullet -> velocity.y; + } +} + +void ShootSoundEffect() +{ + printf("ShootSoundEffect();\n"); + al_stop_sample(&shootSoundID); + al_play_sample(shootSound, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, &shootSoundID); +} + +void DieSoundEffect() +{ + printf("DieSoundEffect();\n"); + al_stop_sample(&enemyDieSoundID); + al_play_sample(enemyDieSound, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, &enemyDieSoundID); +} + +void PlayerShoot() +{ + Vector2D shootDir; + Bullet *newBullet; + float offset = (al_get_bitmap_width(player.playerImage) + al_get_bitmap_width(enemyBulletImage) * 2.0 * sizeMultiplier); + + if(player.lookDirection != 1) + offset = -offset; + + shootDir.x = player.lookDirection == 1 ? bulletSpeed : -bulletSpeed; + shootDir.y = 0; + + player.shootCooldown = 1 / (float)player.shootPerSecond; + bullets.bulletCount++; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + newBullet = (bullets.bulletArray + bullets.bulletCount - 1); + newBullet -> position = player.position; + newBullet -> position.x += offset; + newBullet -> velocity = shootDir; + newBullet -> isEnemyBullet = 0; + + ShootSoundEffect(); +} + +void EnemyShoot() +{ + Vector2D shootDir; + Vector2D normalizedVec; + Enemy *enemy; + Bullet *bullet; + int i; + float offset = (al_get_bitmap_width(player.playerImage) + al_get_bitmap_width(enemyBulletImage) * 2.0 * sizeMultiplier); + + for (i = 0; i < enemies.enemyCount; i++) + { + srand(time(0) + enemyRespawnCounter++); + enemy = (enemies.enemyArray + i); + if(enemy -> fireCooldown > 0.0) + enemy -> fireCooldown -= deltaTime; + else + { + shootDir = (Vector2D){player.position.x - enemy -> position.x , player.position.y - enemy -> position.y}; + + shootDir = NormalizeVector(shootDir); + normalizedVec = shootDir; + shootDir = (Vector2D){shootDir.x * bulletSpeed, shootDir.y * bulletSpeed}; + + enemy -> fireCooldown = 1.0 / (rand() % 5) + 2.0; + bullets.bulletCount++; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + bullet = (bullets.bulletArray + bullets.bulletCount - 1); + bullet -> position = enemy -> position; + bullet -> position.x += normalizedVec.x * offset; + bullet -> position.y += normalizedVec.y * offset; + bullet -> velocity = shootDir; + bullet -> isEnemyBullet = 1; + ShootSoundEffect(); + } + } + +} + +void BulletCollisions() +{ + Bullet *bullet; + Enemy *enemy; + int bulletCounter = 0; + int enemyCounter = 0; + int i = 0; + byte isCheckPlayerEnemyInteraction = 1; + for (bulletCounter = 0; bulletCounter < bullets.bulletCount; bulletCounter++) + { + bullet = (bullets.bulletArray + bulletCounter); + printf("Player-Bullet\n"); + if(bullet -> isEnemyBullet == 1 && CheckCollision( + &bullet -> position, + &player.position, + enemyBulletImage, + player.playerImage + )) + { + RemoveBulletAtIndex(bulletCounter); + bulletCounter--; + + if(DealDamage(&player.health, 25)) + isGameOver = 1; + break; + } + + printf("Enemy-Bullet\n"); + for (enemyCounter = 0; enemyCounter < enemies.enemyCount; enemyCounter++) + { + enemy = (enemies.enemyArray + enemyCounter); + printf("Enemy-Bullet|enemyCounter\n"); + printf("Enemy Count = %d\n", enemyCounter); + printf("Enemy Counter = %d\n", enemies.enemyCount); + printf("Bullet Count = %d\n", bulletCounter); + printf("Bullet Counter = %d\n", bullets.bulletCount); + + if(bullet -> isEnemyBullet == 0 && CheckCollision( + &bullet -> position, + &enemy -> position, + enemyBulletImage, + enemyImage + )) + { + printf("Enemy-Bullet|EnemyRemove\n"); + RemoveEnemyAtIndex(enemyCounter); + enemyCounter--; + + printf("Enemy-Bullet|BulletRemove\n"); + RemoveBulletAtIndex(bulletCounter); + bulletCounter--; + player.killedEnemyCount++; + break; + } + + printf("Enemy-Player\n"); + if( isCheckPlayerEnemyInteraction == 1 && + CheckCollision( + &enemy -> position, + &player.position, + enemyImage, + player.playerImage + )) + { + RemoveEnemyAtIndex(enemyCounter); + enemyCounter--; + + if(DealDamage(&player.health, 25)) + isGameOver = 1; + + isCheckPlayerEnemyInteraction = 0; + } + } + } +} + +void DestroyGame() +{ + al_destroy_bitmap(enemyImage); + al_destroy_bitmap(enemyBulletImage); + al_destroy_bitmap(gameOverImage); + al_destroy_bitmap(numberTable); + al_destroy_sample(shootSound); + al_destroy_sample(enemyDieSound); + al_destroy_bitmap(player.playerImage); + free(enemies.enemyArray); +} + +void DestroyGameWindow() +{ + al_destroy_display(display); + al_uninstall_keyboard(); +} \ No newline at end of file diff --git a/Images/Bullet.png b/Images/Bullet.png new file mode 100644 index 0000000..e2a0361 Binary files /dev/null and b/Images/Bullet.png differ diff --git a/Images/Enemy.png b/Images/Enemy.png new file mode 100644 index 0000000..b37e731 Binary files /dev/null and b/Images/Enemy.png differ diff --git a/Images/GameOver.png b/Images/GameOver.png new file mode 100644 index 0000000..c20358b Binary files /dev/null and b/Images/GameOver.png differ diff --git a/Images/Numbers.png b/Images/Numbers.png new file mode 100644 index 0000000..20fd345 Binary files /dev/null and b/Images/Numbers.png differ diff --git a/Images/Player.png b/Images/Player.png new file mode 100644 index 0000000..5816ca2 Binary files /dev/null and b/Images/Player.png differ diff --git a/README.md b/README.md index 3cd6fe9..6ed0a7c 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ # SynGame +Simple Shoot 'Em Up game. + +Exe without console window +g++ SynGame.c -o SynGame.exe "allegro-5.0.10-mingw-4.7.0\lib\liballegro-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_audio-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_acodec-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_image-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_dialog-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_primitives-5.0.10-md.a" --machine-windows + +Exe with console window +g++ SynGame.c -o SynGame.exe "allegro-5.0.10-mingw-4.7.0\lib\liballegro-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_audio-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_acodec-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_image-5.0.10-md.a" "allegro-5.0.10-mingw-4.7.0\lib\liballegro_primitives-5.0.10-md.a" \ No newline at end of file diff --git a/Sounds/die.wav b/Sounds/die.wav new file mode 100644 index 0000000..80441d2 Binary files /dev/null and b/Sounds/die.wav differ diff --git a/Sounds/shoot.wav b/Sounds/shoot.wav new file mode 100644 index 0000000..f0a528e Binary files /dev/null and b/Sounds/shoot.wav differ diff --git a/SynGame.c b/SynGame.c new file mode 100644 index 0000000..e07b48b --- /dev/null +++ b/SynGame.c @@ -0,0 +1,796 @@ +/* + Author: Asrın "Syntriax" Doğan + Date: 10.09.2019 + Mail: asrindogan99@gmail.com +*/ +#include +#include +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_audio.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_acodec.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_image.h" +#include "allegro-5.0.10-mingw-4.7.0\include\allegro5\allegro_primitives.h" +#define playerSpeed 7.5 +#define bulletSpeed 25 +#define numberSize 5 +#define scoreDigitLimit 10 +#define enemyLimiter 8 +#define initialEnemyLimit 3 + +typedef struct +{ + float x; + float y; +} Vector2D; + +struct +{ + Vector2D position; + char health; + float moveSpeed; + byte lookDirection; + int shootPerSecond; + float shootCooldown; + unsigned int killedEnemyCount; + unsigned int score; + + ALLEGRO_BITMAP *playerImage; +} player; + +typedef struct +{ + Vector2D position; + /* char health; */ + float moveSpeed; + float fireCooldown; + Vector2D velocity; +} Enemy; + +struct +{ + int enemyLimit; + int enemyCount; + Enemy *enemyArray; +} enemies; + +typedef struct +{ + char isEnemyBullet; + Vector2D position; + Vector2D velocity; +} Bullet; + +struct +{ + int bulletCount; + Bullet *bulletArray; +} bullets; + +void SpawnEnemies(); +void CheckBullets(); +void RemoveBulletAtIndex(int index); +void RemoveEnemyAtIndex(int index); +void CheckEnemies(); +void MoveEnemies(); +void InitializeEnemies(); +void DestroyGame(); +void DrawObject(Vector2D position, ALLEGRO_BITMAP *image, int flag); +void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectSizeMultiplier); +void DrawScreen(); +void DrawScore(); +void DrawNumber(Vector2D position, int number); +void Inputs(); +void PlayerMovement(); +void BulletMovement(); +void ShootSoundEffect(); +void DieSoundEffect(); +void PlayerShoot(); +void EnemyShoot(); +void BulletCollisions(); +void Update(); +void DestroyGameWindow(); +float VectorMagnitude(Vector2D vector); +float VectorDistance(Vector2D vectorFirst, Vector2D vectorSecond); +byte isVectorExceedingLimits(Vector2D vector, Vector2D limits); +byte CheckCollision(Vector2D *firstPos, Vector2D *secondPos, ALLEGRO_BITMAP *firstMap, ALLEGRO_BITMAP *secondMap); +char InitializeGameWindow(); +char InitializeGame(); +char DealDamage(char *health, int damage); +Vector2D NormalizeVector(Vector2D vector); + +ALLEGRO_KEYBOARD_STATE keyboardState; +ALLEGRO_DISPLAY *display; +ALLEGRO_DISPLAY_MODE disp_data; +ALLEGRO_EVENT_QUEUE *event_queue = NULL; +ALLEGRO_TIMER *timer = NULL; +ALLEGRO_COLOR backgroundColor; +ALLEGRO_BITMAP *gameOverImage; + +ALLEGRO_SAMPLE *shootSound; +ALLEGRO_SAMPLE_ID shootSoundID; + +ALLEGRO_BITMAP *enemyImage; +ALLEGRO_BITMAP *enemyBulletImage; +ALLEGRO_SAMPLE *enemyDieSound; +ALLEGRO_SAMPLE_ID enemyDieSoundID; + +ALLEGRO_BITMAP *numberTable; + +const char *displayName = "Syn Game"; +const Vector2D referenceScreenDimensions = {160, 90}; +Vector2D screenDimensions = {0, 0}; +Vector2D scorePosition = {0, 0}; +Vector2D highScorePosition = {0, 0}; +float sizeMultiplier; +float timeFromStart; +const float FPS = 60; +double deltaTime; +unsigned int enemyRespawnCounter = 0; +Vector2D input; +byte isRestart = 0; +byte isRunning = 1; +byte isGameStarted = 0; +byte isGameOver = 0; + +void Update() +{ + al_get_keyboard_state(&keyboardState); + + if(al_key_down(&keyboardState, ALLEGRO_KEY_ESCAPE)) + isRunning = 0; + + al_clear_to_color(backgroundColor); + + if(!isGameOver) + { + printf("Inputs();\n"); + Inputs(); + + if(al_key_down(&keyboardState, ALLEGRO_KEY_F)) + player.score += 1000; + // enemies.enemyLimit++; + + printf("PlayerMovement();\n"); + PlayerMovement(); + + printf("EnemyShoot();\n"); + EnemyShoot(); + + printf("BulletCollisions();\n"); + BulletCollisions(); + + if(player.shootCooldown < 0.0f) + { + if(al_key_down(&keyboardState, ALLEGRO_KEY_SPACE)) + { + printf("PlayerShoot();\n"); + PlayerShoot(); + } + } + else + player.shootCooldown -= deltaTime; + + timeFromStart += deltaTime; + player.score = (int)(timeFromStart * timeFromStart) * player.killedEnemyCount; + + if(enemies.enemyLimit != enemyLimiter) + { + enemies.enemyLimit = initialEnemyLimit + (int)(timeFromStart / 10); + if(enemies.enemyCount > enemyLimiter) + enemies.enemyLimit = enemyLimiter; + } + } + else if(al_key_down(&keyboardState, ALLEGRO_KEY_R)) + isRestart = 1; + + + printf("CheckEnemies();\n"); + CheckEnemies(); + + printf("MoveEnemies();\n"); + MoveEnemies(); + + printf("CheckBullets();\n"); + CheckBullets(); + + printf("BulletMovement();\n"); + BulletMovement(); + + printf("DrawScreen();\n"); + DrawScreen(); + + + al_flip_display(); +} + + +int main(int argc, char **argv) +{ + if(InitializeGameWindow() == 0) + return 0; + do + { + if(InitializeGame() == 0) + return 0; + + while (isRunning && !isRestart) + { + ALLEGRO_EVENT ev; + al_wait_for_event(event_queue, &ev); + + if(ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE) + isRunning = 0; + + if(ev.type == ALLEGRO_EVENT_TIMER) + Update(); + } + + DestroyGame(); + } while (isRestart); + + DestroyGameWindow(); + + getchar(); + return 0; +} + +Vector2D NormalizeVector(Vector2D vector) +{ + Vector2D normalizedVector; + float magnitude = sqrt(vector.x * vector.x + vector.y * vector.y); + + if(vector.x == 0.0 && vector.y == 0.0) + return vector; + + normalizedVector.x = vector.x / magnitude; + normalizedVector.y = vector.y / magnitude; + + return normalizedVector; +} + +float VectorMagnitude(Vector2D vector) +{ + return sqrt(vector.x * vector.x + vector.y * vector.y); +} + +float VectorDistance(Vector2D vectorFirst, Vector2D vectorSecond) +{ + Vector2D difference; + difference.x = abs(vectorFirst.x - vectorSecond.x); + difference.y = abs(vectorFirst.y - vectorSecond.y); + return VectorMagnitude(difference); +} + +byte isVectorExceedingLimits(Vector2D vector, Vector2D limits) +{ + byte result = vector.x > limits.x || vector.x < 0 || vector.y > limits.y || vector.y < 0; + return result; +} + +byte CheckCollision(Vector2D *firstPos, Vector2D *secondPos, ALLEGRO_BITMAP *firstMap, ALLEGRO_BITMAP *secondMap) +{ + Vector2D firstImageSize; + Vector2D secondImageSize; + byte result; + float minDistance; + float distance; + firstImageSize.x = (float)al_get_bitmap_width(firstMap); + firstImageSize.y = (float)al_get_bitmap_height(firstMap); + secondImageSize.x = (float)al_get_bitmap_width(secondMap); + secondImageSize.y = (float)al_get_bitmap_height(secondMap); + + minDistance = firstImageSize.x > firstImageSize.y ? firstImageSize.y : firstImageSize.x; + minDistance += secondImageSize.x > secondImageSize.y ? secondImageSize.y : secondImageSize.x; + + minDistance /= 2; + minDistance *= sizeMultiplier; + + distance = VectorDistance(*firstPos, *secondPos); + + result = distance <= minDistance; + return result; +} + +char InitializeGameWindow() +{ + float x = 0.0f; + float y = 0.0f; + + if(!al_init() || + !al_init_primitives_addon() || + !al_init_image_addon() || + !al_install_audio() || + !al_init_acodec_addon() || + !al_reserve_samples(1)) + return 0; + + al_get_display_mode(al_get_num_display_modes() - 1, &disp_data); + al_set_new_display_flags(ALLEGRO_FULLSCREEN); + + x = disp_data.width; + y = disp_data.height; + /* x = 1600; */ + /* y = 900; */ + + screenDimensions = (Vector2D){x, y}; + scorePosition = (Vector2D){x * (float)0.05, y * (float)0.05}; + highScorePosition = (Vector2D){x * (float)0.05, y * (float)0.95}; + sizeMultiplier = screenDimensions.x / referenceScreenDimensions.x; + display = al_create_display(screenDimensions.x, screenDimensions.y); + + if(display == NULL) + return 0; + + if(!al_install_keyboard()) + return 0; + + deltaTime = 1.0 / FPS; + timer = al_create_timer(deltaTime); + event_queue = al_create_event_queue(); + + if(event_queue == NULL) + { + printf("Event Queue Error"); + al_destroy_display(display); + al_destroy_timer(timer); + return 0; + } + + al_register_event_source(event_queue, al_get_keyboard_event_source()); + al_register_event_source(event_queue, al_get_display_event_source(display)); + al_register_event_source(event_queue, al_get_timer_event_source(timer)); + + al_start_timer(timer); + al_set_window_title(display, displayName); + + backgroundColor.a = 1; + backgroundColor.a = 0; + backgroundColor.a = 0; + backgroundColor.a = 0; +} + +char InitializeGame() +{ + shootSound = al_load_sample("Sounds/Shoot.wav"); + enemyDieSound = al_load_sample("Sounds/Die.wav"); + + InitializeEnemies(); + + /* Player Initialization */ + player.position.x = screenDimensions.x / 2; + player.position.y = screenDimensions.y / 2; + player.moveSpeed = playerSpeed; + player.shootPerSecond = 10; + player.health = 100; + player.playerImage = al_load_bitmap("Images/Player.png"); + bullets.bulletCount = 0; + bullets.bulletArray = (Bullet *) malloc(sizeof(Bullet) * bullets.bulletCount); + if(player.playerImage == NULL || + shootSound == NULL || + enemyDieSound == NULL) + return 0; + + isRunning = 1; + isRestart = 0; + isGameOver = 0; + isGameStarted = 0; + timeFromStart = 0; + player.killedEnemyCount = 0; + return 1; +} + +void InitializeEnemies() +{ + int i = 0; + enemies.enemyLimit = initialEnemyLimit; + enemies.enemyCount = 0; + enemies.enemyArray = (Enemy *) malloc(sizeof(Enemy) * enemies.enemyCount); + enemyImage = al_load_bitmap("Images/Enemy.png"); + numberTable = al_load_bitmap("Images/Numbers.png"); + enemyBulletImage = al_load_bitmap("Images/Bullet.png"); + gameOverImage = al_load_bitmap("Images/GameOver.png"); + SpawnEnemies(); +} + +void SpawnEnemies() +{ + if(enemyRespawnCounter > 10000) + enemyRespawnCounter = 0; + + Vector2D enemySpawnVector; + Vector2D enemyvelocity; + Enemy *enemy; + float speed; + int randomNumber; + while (enemies.enemyCount < enemies.enemyLimit) + { + srand(time(0) + enemyRespawnCounter); + enemies.enemyCount++; + randomNumber = rand() * enemies.enemyCount; + enemies.enemyArray = (Enemy *) realloc(enemies.enemyArray, sizeof(Enemy) * enemies.enemyCount); + enemyvelocity.x = (float)(randomNumber % 20000) / 10000; + enemyvelocity.y = (float)(randomNumber % 2000) / 1000; + enemyvelocity.x *= randomNumber % 2 == 0 ? -1 : 1; + enemyvelocity.y *= randomNumber % 4 >= 2 ? -1 : 1; + + speed = (float)(randomNumber % 500 / 100 + 2); + enemy = (enemies.enemyArray + enemies.enemyCount - 1); + enemy -> velocity = NormalizeVector(enemyvelocity); + enemy -> moveSpeed = speed; + + enemySpawnVector.x = enemyvelocity.x > 0 ? 0 : screenDimensions.x; + enemySpawnVector.y = enemyvelocity.y > 0 ? 0 : screenDimensions.y; + + enemy -> position = enemySpawnVector; + enemy -> fireCooldown = 01.0 / (rand() % 5) + 2.0; + + enemyRespawnCounter++; + } +} + +void CheckBullets() +{ + int i = 0; + int j = 0; + + for (; i < bullets.bulletCount; i++) + { + if(isVectorExceedingLimits((bullets.bulletArray + i) -> position, screenDimensions)) + { + for (j = i; j < bullets.bulletCount - 1; j++) + *(bullets.bulletArray + j) = *(bullets.bulletArray + j + 1); + + bullets.bulletCount--; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + } + } +} + +void RemoveBulletAtIndex(int index) +{ + printf("RemoveBulletAtIndex();\n"); + for (; index < bullets.bulletCount - 1; index++) + *(bullets.bulletArray + index) = *(bullets.bulletArray + index + 1); + + bullets.bulletCount--; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); +} + +void RemoveEnemyAtIndex(int index) +{ + printf("RemoveEnemyAtIndex();\n"); + for (; index < enemies.enemyCount - 1; index++) + *(enemies.enemyArray + index) = *(enemies.enemyArray + index + 1); + + enemies.enemyCount--; + enemies.enemyArray = (Enemy *) realloc(enemies.enemyArray, sizeof(Enemy) * enemies.enemyCount); + printf("New Enemy Count = %d\n", enemies.enemyCount); + DieSoundEffect(); +} + +void CheckEnemies() +{ + int i = 0; + + for (; i < enemies.enemyCount; i++) + if(isVectorExceedingLimits((enemies.enemyArray + i) -> position, screenDimensions)) + RemoveEnemyAtIndex(i); + + SpawnEnemies(); +} + +void MoveEnemies() +{ + int i = 0; + Vector2D velocity; + float speed; + + for (; i < enemies.enemyCount; i++) + { + speed = (enemies.enemyArray + i) -> moveSpeed; + velocity = (enemies.enemyArray + i) -> velocity; + (enemies.enemyArray + i) -> position.x += velocity.x * speed; + (enemies.enemyArray + i) -> position.y += velocity.y * speed; + } +} +void DrawObject(Vector2D position, ALLEGRO_BITMAP *image, int flag) +{ + Vector2D InstantiateSize; + InstantiateSize.x = (float)al_get_bitmap_width(image); + InstantiateSize.y = (float)al_get_bitmap_height(image); + + al_draw_scaled_bitmap(image, + 0, 0, InstantiateSize.x, InstantiateSize.y, + position.x - InstantiateSize.x / 2 * sizeMultiplier, position.y - InstantiateSize.y / 2 * sizeMultiplier, + InstantiateSize.x * sizeMultiplier, InstantiateSize.y * sizeMultiplier, flag); +} + +void DrawNumber(Vector2D position, int number) +{ + Vector2D InstantiateSize; + float numberFactor; + InstantiateSize.x = (float)al_get_bitmap_width(numberTable); + InstantiateSize.y = (float)al_get_bitmap_height(numberTable); + numberFactor = InstantiateSize.x / 10.0; + + al_draw_scaled_bitmap(numberTable, + numberFactor * number, 0, numberFactor, InstantiateSize.y, + position.x - numberFactor / 2 * sizeMultiplier, position.y - InstantiateSize.y / 2 * sizeMultiplier, + numberFactor * sizeMultiplier, InstantiateSize.y * sizeMultiplier, 0); +} + +void DrawSizedObject(Vector2D position, ALLEGRO_BITMAP *image, int flag, float objectSizeMultiplier) +{ + Vector2D InstantiateSize; + float sizeFactor = sizeMultiplier * objectSizeMultiplier; + InstantiateSize.x = (float)al_get_bitmap_width(image); + InstantiateSize.y = (float)al_get_bitmap_height(image); + + al_draw_scaled_bitmap(image, + 0, 0, InstantiateSize.x, InstantiateSize.y, + position.x - InstantiateSize.x / 2 * sizeFactor, position.y - InstantiateSize.y / 2 * sizeFactor, + InstantiateSize.x * sizeFactor, InstantiateSize.y * sizeFactor, flag); +} + +void DrawScreen() +{ + int i = 0; + Vector2D halfScreen = {screenDimensions.x / 2, screenDimensions.y / 2}; + + /* Enemy Draw */ + for (i = 0; i < enemies.enemyCount; i++) + DrawObject((enemies.enemyArray + i) -> position, enemyImage, (enemies.enemyArray + i) -> velocity.x > 0 ? ALLEGRO_FLIP_HORIZONTAL : 0 ); + + /* Bullet Draw */ + for (i = 0; i < bullets.bulletCount; i++) + DrawObject((bullets.bulletArray + i) -> position, enemyBulletImage, 0); + + /* Player Draw */ + if(!isGameOver) + DrawObject(player.position, player.playerImage, player.lookDirection == 1 ? ALLEGRO_FLIP_HORIZONTAL : 0); + else + DrawObject(halfScreen, gameOverImage, 0); + + DrawScore(); +} + +void DrawScore() +{ + unsigned int processedScore = player.score; + char digit; + Vector2D spawnPosition; + int i = scoreDigitLimit; + + /*while (processedScore >= 1 && i > 0)*/ + while (i > 0) + { + spawnPosition = scorePosition; + /* numberSize + 1 is because 1 pixel space between digits */ + spawnPosition.x += sizeMultiplier * (numberSize + 1) * i; + digit = processedScore % 10; + processedScore = (int)(processedScore / 10); + DrawNumber(spawnPosition, digit); + i--; + } +} + +void Inputs() +{ + input.x = 0; + input.y = 0; + + if(al_key_down(&keyboardState, ALLEGRO_KEY_UP)) + input.y = -1; + else if(al_key_down(&keyboardState, ALLEGRO_KEY_DOWN)) + input.y = 1; + + if(al_key_down(&keyboardState, ALLEGRO_KEY_RIGHT)) + { + input.x = 1; + player.lookDirection = input.x; + } + else if(al_key_down(&keyboardState, ALLEGRO_KEY_LEFT)) + { + input.x = -1; + player.lookDirection = input.x; + } + + + input = NormalizeVector(input); +} + +void PlayerMovement() +{ + player.position.x += input.x * player.moveSpeed; + player.position.y += input.y * player.moveSpeed; +} + +char DealDamage(char *health, int damage) +{ + int healthInt = *health; + *health -= damage; + + return healthInt <= 0; +} + +void BulletMovement() +{ + Bullet *bullet; + int i = 0; + for (; i < bullets.bulletCount; i++) + { + bullet = (bullets.bulletArray + i); + bullet -> position.x += bullet -> velocity.x; + bullet -> position.y += bullet -> velocity.y; + } +} + +void ShootSoundEffect() +{ + printf("ShootSoundEffect();\n"); + al_stop_sample(&shootSoundID); + al_play_sample(shootSound, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, &shootSoundID); +} + +void DieSoundEffect() +{ + printf("DieSoundEffect();\n"); + al_stop_sample(&enemyDieSoundID); + al_play_sample(enemyDieSound, 1.0, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, &enemyDieSoundID); +} + +void PlayerShoot() +{ + Vector2D shootDir; + Bullet *newBullet; + float offset = (al_get_bitmap_width(player.playerImage) + al_get_bitmap_width(enemyBulletImage) * 2.0 * sizeMultiplier); + + if(player.lookDirection != 1) + offset = -offset; + + shootDir.x = player.lookDirection == 1 ? bulletSpeed : -bulletSpeed; + shootDir.y = 0; + + player.shootCooldown = 1 / (float)player.shootPerSecond; + bullets.bulletCount++; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + newBullet = (bullets.bulletArray + bullets.bulletCount - 1); + newBullet -> position = player.position; + newBullet -> position.x += offset; + newBullet -> velocity = shootDir; + newBullet -> isEnemyBullet = 0; + + ShootSoundEffect(); +} + +void EnemyShoot() +{ + Vector2D shootDir; + Vector2D normalizedVec; + Enemy *enemy; + Bullet *bullet; + int i; + float offset = (al_get_bitmap_width(player.playerImage) + al_get_bitmap_width(enemyBulletImage) * 2.0 * sizeMultiplier); + + for (i = 0; i < enemies.enemyCount; i++) + { + srand(time(0) + enemyRespawnCounter++); + enemy = (enemies.enemyArray + i); + if(enemy -> fireCooldown > 0.0) + enemy -> fireCooldown -= deltaTime; + else + { + shootDir = (Vector2D){player.position.x - enemy -> position.x , player.position.y - enemy -> position.y}; + + shootDir = NormalizeVector(shootDir); + normalizedVec = shootDir; + shootDir = (Vector2D){shootDir.x * bulletSpeed, shootDir.y * bulletSpeed}; + + enemy -> fireCooldown = 1.0 / (rand() % 5) + 2.0; + bullets.bulletCount++; + bullets.bulletArray = (Bullet *) realloc(bullets.bulletArray, sizeof(Bullet) * bullets.bulletCount); + bullet = (bullets.bulletArray + bullets.bulletCount - 1); + bullet -> position = enemy -> position; + bullet -> position.x += normalizedVec.x * offset; + bullet -> position.y += normalizedVec.y * offset; + bullet -> velocity = shootDir; + bullet -> isEnemyBullet = 1; + ShootSoundEffect(); + } + } + +} + +void BulletCollisions() +{ + Bullet *bullet; + Enemy *enemy; + int bulletCounter = 0; + int enemyCounter = 0; + int i = 0; + byte isCheckPlayerEnemyInteraction = 1; + for (bulletCounter = 0; bulletCounter < bullets.bulletCount; bulletCounter++) + { + bullet = (bullets.bulletArray + bulletCounter); + printf("Player-Bullet\n"); + if(bullet -> isEnemyBullet == 1 && CheckCollision( + &bullet -> position, + &player.position, + enemyBulletImage, + player.playerImage + )) + { + RemoveBulletAtIndex(bulletCounter); + bulletCounter--; + + if(DealDamage(&player.health, 25)) + isGameOver = 1; + break; + } + + printf("Enemy-Bullet\n"); + for (enemyCounter = 0; enemyCounter < enemies.enemyCount; enemyCounter++) + { + enemy = (enemies.enemyArray + enemyCounter); + printf("Enemy-Bullet|enemyCounter\n"); + printf("Enemy Count = %d\n", enemyCounter); + printf("Enemy Counter = %d\n", enemies.enemyCount); + printf("Bullet Count = %d\n", bulletCounter); + printf("Bullet Counter = %d\n", bullets.bulletCount); + + if(bullet -> isEnemyBullet == 0 && CheckCollision( + &bullet -> position, + &enemy -> position, + enemyBulletImage, + enemyImage + )) + { + printf("Enemy-Bullet|EnemyRemove\n"); + RemoveEnemyAtIndex(enemyCounter); + enemyCounter--; + + printf("Enemy-Bullet|BulletRemove\n"); + RemoveBulletAtIndex(bulletCounter); + bulletCounter--; + player.killedEnemyCount++; + break; + } + + printf("Enemy-Player\n"); + if( isCheckPlayerEnemyInteraction == 1 && + CheckCollision( + &enemy -> position, + &player.position, + enemyImage, + player.playerImage + )) + { + RemoveEnemyAtIndex(enemyCounter); + enemyCounter--; + + if(DealDamage(&player.health, 25)) + isGameOver = 1; + + isCheckPlayerEnemyInteraction = 0; + } + } + } +} + +void DestroyGame() +{ + al_destroy_bitmap(enemyImage); + al_destroy_bitmap(enemyBulletImage); + al_destroy_bitmap(gameOverImage); + al_destroy_bitmap(numberTable); + al_destroy_sample(shootSound); + al_destroy_sample(enemyDieSound); + al_destroy_bitmap(player.playerImage); + free(enemies.enemyArray); +} + +void DestroyGameWindow() +{ + al_destroy_display(display); + al_uninstall_keyboard(); +} \ No newline at end of file diff --git a/allegro-5.0.10-mingw-4.7.0/bin/allegro-5.0.10-md.dll b/allegro-5.0.10-mingw-4.7.0/bin/allegro-5.0.10-md.dll new file mode 100644 index 0000000..4dc4bdc Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/bin/allegro-5.0.10-md.dll differ diff --git a/allegro-5.0.10-mingw-4.7.0/bin/allegro_acodec-5.0.10-md.dll b/allegro-5.0.10-mingw-4.7.0/bin/allegro_acodec-5.0.10-md.dll new file mode 100644 index 0000000..6e054fc Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/bin/allegro_acodec-5.0.10-md.dll differ diff --git a/allegro-5.0.10-mingw-4.7.0/bin/allegro_audio-5.0.10-md.dll b/allegro-5.0.10-mingw-4.7.0/bin/allegro_audio-5.0.10-md.dll new file mode 100644 index 0000000..8f3c064 Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/bin/allegro_audio-5.0.10-md.dll differ diff --git a/allegro-5.0.10-mingw-4.7.0/bin/allegro_image-5.0.10-md.dll b/allegro-5.0.10-mingw-4.7.0/bin/allegro_image-5.0.10-md.dll new file mode 100644 index 0000000..34eac63 Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/bin/allegro_image-5.0.10-md.dll differ diff --git a/allegro-5.0.10-mingw-4.7.0/bin/allegro_primitives-5.0.10-md.dll b/allegro-5.0.10-mingw-4.7.0/bin/allegro_primitives-5.0.10-md.dll new file mode 100644 index 0000000..dbcbe20 Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/bin/allegro_primitives-5.0.10-md.dll differ diff --git a/allegro-5.0.10-mingw-4.7.0/include/AL/al.h b/allegro-5.0.10-mingw-4.7.0/include/AL/al.h new file mode 100644 index 0000000..44db779 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/AL/al.h @@ -0,0 +1,724 @@ +#ifndef AL_AL_H +#define AL_AL_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#if defined(AL_LIBTYPE_STATIC) + #define AL_API +#elif defined(_WIN32) && !defined(_XBOX) + #if defined(AL_BUILD_LIBRARY) + #define AL_API __declspec(dllexport) + #else + #define AL_API __declspec(dllimport) + #endif +#else + #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) + #define AL_API __attribute__((visibility("protected"))) + #else + #define AL_API extern + #endif +#endif + +#if defined(_WIN32) + #define AL_APIENTRY __cdecl +#else + #define AL_APIENTRY +#endif + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export on +#endif + +/* + * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and + * AL_ILLEGAL_COMMAND macros are deprecated, but are included for + * applications porting code from AL 1.0 + */ +#define OPENAL +#define ALAPI AL_API +#define ALAPIENTRY AL_APIENTRY +#define AL_INVALID (-1) +#define AL_ILLEGAL_ENUM AL_INVALID_ENUM +#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION + +#define AL_VERSION_1_0 +#define AL_VERSION_1_1 + + +/** 8-bit boolean */ +typedef char ALboolean; + +/** character */ +typedef char ALchar; + +/** signed 8-bit 2's complement integer */ +typedef signed char ALbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALsizei; + +/** enumerated 32-bit value */ +typedef int ALenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALdouble; + +/** void type (for opaque pointers only) */ +typedef void ALvoid; + + +/* Enumerant values begin at column 50. No tabs. */ + +/* "no distance model" or "no buffer" */ +#define AL_NONE 0 + +/* Boolean False. */ +#define AL_FALSE 0 + +/** Boolean True. */ +#define AL_TRUE 1 + +/** Indicate Source has relative coordinates. */ +#define AL_SOURCE_RELATIVE 0x202 + + + +/** + * Directional source, inner cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ +#define AL_CONE_INNER_ANGLE 0x1001 + +/** + * Directional source, outer cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ +#define AL_CONE_OUTER_ANGLE 0x1002 + +/** + * Specify the pitch to be applied at source. + * Range: [0.5-2.0] + * Default: 1.0 + */ +#define AL_PITCH 0x1003 + +/** + * Specify the current location in three dimensional space. + * OpenAL, like OpenGL, uses a right handed coordinate system, + * where in a frontal default view X (thumb) points right, + * Y points up (index finger), and Z points towards the + * viewer/camera (middle finger). + * To switch from a left handed coordinate system, flip the + * sign on the Z coordinate. + * Listener position is always in the world coordinate system. + */ +#define AL_POSITION 0x1004 + +/** Specify the current direction. */ +#define AL_DIRECTION 0x1005 + +/** Specify the current velocity in three dimensional space. */ +#define AL_VELOCITY 0x1006 + +/** + * Indicate whether source is looping. + * Type: ALboolean? + * Range: [AL_TRUE, AL_FALSE] + * Default: FALSE. + */ +#define AL_LOOPING 0x1007 + +/** + * Indicate the buffer to provide sound samples. + * Type: ALuint. + * Range: any valid Buffer id. + */ +#define AL_BUFFER 0x1009 + +/** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ +#define AL_GAIN 0x100A + +/* + * Indicate minimum source attenuation + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * Logarthmic + */ +#define AL_MIN_GAIN 0x100D + +/** + * Indicate maximum source attenuation + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * Logarthmic + */ +#define AL_MAX_GAIN 0x100E + +/** + * Indicate listener orientation. + * + * at/up + */ +#define AL_ORIENTATION 0x100F + +/** + * Source state information. + */ +#define AL_SOURCE_STATE 0x1010 +#define AL_INITIAL 0x1011 +#define AL_PLAYING 0x1012 +#define AL_PAUSED 0x1013 +#define AL_STOPPED 0x1014 + +/** + * Buffer Queue params + */ +#define AL_BUFFERS_QUEUED 0x1015 +#define AL_BUFFERS_PROCESSED 0x1016 + +/** + * Source buffer position information + */ +#define AL_SEC_OFFSET 0x1024 +#define AL_SAMPLE_OFFSET 0x1025 +#define AL_BYTE_OFFSET 0x1026 + +/* + * Source type (Static, Streaming or undetermined) + * Source is Static if a Buffer has been attached using AL_BUFFER + * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers + * Source is undetermined when it has the NULL buffer attached + */ +#define AL_SOURCE_TYPE 0x1027 +#define AL_STATIC 0x1028 +#define AL_STREAMING 0x1029 +#define AL_UNDETERMINED 0x1030 + +/** Sound samples: format specifier. */ +#define AL_FORMAT_MONO8 0x1100 +#define AL_FORMAT_MONO16 0x1101 +#define AL_FORMAT_STEREO8 0x1102 +#define AL_FORMAT_STEREO16 0x1103 + +/** + * source specific reference distance + * Type: ALfloat + * Range: 0.0 - +inf + * + * At 0.0, no distance attenuation occurs. Default is + * 1.0. + */ +#define AL_REFERENCE_DISTANCE 0x1020 + +/** + * source specific rolloff factor + * Type: ALfloat + * Range: 0.0 - +inf + * + */ +#define AL_ROLLOFF_FACTOR 0x1021 + +/** + * Directional source, outer cone gain. + * + * Default: 0.0 + * Range: [0.0 - 1.0] + * Logarithmic + */ +#define AL_CONE_OUTER_GAIN 0x1022 + +/** + * Indicate distance above which sources are not + * attenuated using the inverse clamped distance model. + * + * Default: +inf + * Type: ALfloat + * Range: 0.0 - +inf + */ +#define AL_MAX_DISTANCE 0x1023 + +/** + * Sound samples: frequency, in units of Hertz [Hz]. + * This is the number of samples per second. Half of the + * sample frequency marks the maximum significant + * frequency component. + */ +#define AL_FREQUENCY 0x2001 +#define AL_BITS 0x2002 +#define AL_CHANNELS 0x2003 +#define AL_SIZE 0x2004 + +/** + * Buffer state. + * + * Not supported for public use (yet). + */ +#define AL_UNUSED 0x2010 +#define AL_PENDING 0x2011 +#define AL_PROCESSED 0x2012 + + +/** Errors: No Error. */ +#define AL_NO_ERROR AL_FALSE + +/** + * Invalid Name paramater passed to AL call. + */ +#define AL_INVALID_NAME 0xA001 + +/** + * Invalid parameter passed to AL call. + */ +#define AL_INVALID_ENUM 0xA002 + +/** + * Invalid enum parameter value. + */ +#define AL_INVALID_VALUE 0xA003 + +/** + * Illegal call. + */ +#define AL_INVALID_OPERATION 0xA004 + + +/** + * No mojo. + */ +#define AL_OUT_OF_MEMORY 0xA005 + + +/** Context strings: Vendor Name. */ +#define AL_VENDOR 0xB001 +#define AL_VERSION 0xB002 +#define AL_RENDERER 0xB003 +#define AL_EXTENSIONS 0xB004 + +/** Global tweakage. */ + +/** + * Doppler scale. Default 1.0 + */ +#define AL_DOPPLER_FACTOR 0xC000 + +/** + * Tweaks speed of propagation. + */ +#define AL_DOPPLER_VELOCITY 0xC001 + +/** + * Speed of Sound in units per second + */ +#define AL_SPEED_OF_SOUND 0xC003 + +/** + * Distance models + * + * used in conjunction with DistanceModel + * + * implicit: NONE, which disances distance attenuation. + */ +#define AL_DISTANCE_MODEL 0xD000 +#define AL_INVERSE_DISTANCE 0xD001 +#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 +#define AL_LINEAR_DISTANCE 0xD003 +#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 +#define AL_EXPONENT_DISTANCE 0xD005 +#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 + +/* + * Renderer State management + */ +AL_API void AL_APIENTRY alEnable( ALenum capability ); + +AL_API void AL_APIENTRY alDisable( ALenum capability ); + +AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability ); + + +/* + * State retrieval + */ +AL_API const ALchar* AL_APIENTRY alGetString( ALenum param ); + +AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data ); + +AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data ); + +AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data ); + +AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data ); + +AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param ); + +AL_API ALint AL_APIENTRY alGetInteger( ALenum param ); + +AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param ); + +AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param ); + + +/* + * Error support. + * Obtain the most recent error generated in the AL state machine. + */ +AL_API ALenum AL_APIENTRY alGetError( void ); + + +/* + * Extension support. + * Query for the presence of an extension, and obtain any appropriate + * function pointers and enum values. + */ +AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname ); + +AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname ); + +AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ); + + +/* + * LISTENER + * Listener represents the location and orientation of the + * 'user' in 3D-space. + * + * Properties include: - + * + * Gain AL_GAIN ALfloat + * Position AL_POSITION ALfloat[3] + * Velocity AL_VELOCITY ALfloat[3] + * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors) +*/ + +/* + * Set Listener parameters + */ +AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value ); + +AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values ); + +/* + * Get Listener parameters + */ +AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); + +AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); + +AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values ); + + +/** + * SOURCE + * Sources represent individual sound objects in 3D-space. + * Sources take the PCM data provided in the specified Buffer, + * apply Source-specific modifications, and then + * submit them to be mixed according to spatial arrangement etc. + * + * Properties include: - + * + * Gain AL_GAIN ALfloat + * Min Gain AL_MIN_GAIN ALfloat + * Max Gain AL_MAX_GAIN ALfloat + * Position AL_POSITION ALfloat[3] + * Velocity AL_VELOCITY ALfloat[3] + * Direction AL_DIRECTION ALfloat[3] + * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE) + * Reference Distance AL_REFERENCE_DISTANCE ALfloat + * Max Distance AL_MAX_DISTANCE ALfloat + * RollOff Factor AL_ROLLOFF_FACTOR ALfloat + * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat + * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat + * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat + * Pitch AL_PITCH ALfloat + * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE) + * MS Offset AL_MSEC_OFFSET ALint or ALfloat + * Byte Offset AL_BYTE_OFFSET ALint or ALfloat + * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat + * Attached Buffer AL_BUFFER ALint + * State (Query only) AL_SOURCE_STATE ALint + * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint + * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint + */ + +/* Create Source objects */ +AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ); + +/* Delete Source objects */ +AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ); + +/* Verify a handle is a valid Source */ +AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid ); + +/* + * Set Source parameters + */ +AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ); + +AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values ); + +/* + * Get Source parameters + */ +AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); + +AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); + +AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values ); + + +/* + * Source vector based playback calls + */ + +/* Play, replay, or resume (if paused) a list of Sources */ +AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids ); + +/* Stop a list of Sources */ +AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids ); + +/* Rewind a list of Sources */ +AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids ); + +/* Pause a list of Sources */ +AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids ); + +/* + * Source based playback calls + */ + +/* Play, replay, or resume a Source */ +AL_API void AL_APIENTRY alSourcePlay( ALuint sid ); + +/* Stop a Source */ +AL_API void AL_APIENTRY alSourceStop( ALuint sid ); + +/* Rewind a Source (set playback postiton to beginning) */ +AL_API void AL_APIENTRY alSourceRewind( ALuint sid ); + +/* Pause a Source */ +AL_API void AL_APIENTRY alSourcePause( ALuint sid ); + +/* + * Source Queuing + */ +AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ); + +AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids ); + + +/** + * BUFFER + * Buffer objects are storage space for sample data. + * Buffers are referred to by Sources. One Buffer can be used + * by multiple Sources. + * + * Properties include: - + * + * Frequency (Query only) AL_FREQUENCY ALint + * Size (Query only) AL_SIZE ALint + * Bits (Query only) AL_BITS ALint + * Channels (Query only) AL_CHANNELS ALint + */ + +/* Create Buffer objects */ +AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers ); + +/* Delete Buffer objects */ +AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers ); + +/* Verify a handle is a valid Buffer */ +AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid ); + +/* Specify the data to be copied into a buffer */ +AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); + +/* + * Set Buffer parameters + */ +AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value ); + +AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values ); + +/* + * Get Buffer parameters + */ +AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); + +AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); + +AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values ); + + +/* + * Global Parameters + */ +AL_API void AL_APIENTRY alDopplerFactor( ALfloat value ); + +AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value ); + +AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value ); + +AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel ); + +/* + * Pointer-to-function types, useful for dynamically getting AL entry points. + */ +typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability ); +typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability ); +typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability ); +typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param ); +typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data ); +typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data ); +typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data ); +typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data ); +typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param ); +typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param ); +typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param ); +typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param ); +typedef ALenum (AL_APIENTRY *LPALGETERROR)( void ); +typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname ); +typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname ); +typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename ); +typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value ); +typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value ); +typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); +typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); +typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources ); +typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources ); +typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); +typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); +typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids ); +typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids ); +typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers ); +typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers ); +typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid ); +typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); +typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); +typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); +typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value ); +typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value ); +typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value ); +typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel ); + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export off +#endif + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#endif /* AL_AL_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/AL/alc.h b/allegro-5.0.10-mingw-4.7.0/include/AL/alc.h new file mode 100644 index 0000000..00cb762 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/AL/alc.h @@ -0,0 +1,286 @@ +#ifndef AL_ALC_H +#define AL_ALC_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#if defined(AL_LIBTYPE_STATIC) + #define ALC_API +#elif defined(_WIN32) && !defined(_XBOX) + #if defined(AL_BUILD_LIBRARY) + #define ALC_API __declspec(dllexport) + #else + #define ALC_API __declspec(dllimport) + #endif +#else + #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) + #define ALC_API __attribute__((visibility("protected"))) + #else + #define ALC_API extern + #endif +#endif + +#if defined(_WIN32) + #define ALC_APIENTRY __cdecl +#else + #define ALC_APIENTRY +#endif + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export on +#endif + +/* + * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are + * included for applications porting code from AL 1.0 + */ +#define ALCAPI ALC_API +#define ALCAPIENTRY ALC_APIENTRY +#define ALC_INVALID 0 + + +#define ALC_VERSION_0_1 1 + +typedef struct ALCdevice_struct ALCdevice; +typedef struct ALCcontext_struct ALCcontext; + + +/** 8-bit boolean */ +typedef char ALCboolean; + +/** character */ +typedef char ALCchar; + +/** signed 8-bit 2's complement integer */ +typedef signed char ALCbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALCubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALCshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALCushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALCint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALCuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALCsizei; + +/** enumerated 32-bit value */ +typedef int ALCenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALCfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALCdouble; + +/** void type (for opaque pointers only) */ +typedef void ALCvoid; + + +/* Enumerant values begin at column 50. No tabs. */ + +/* Boolean False. */ +#define ALC_FALSE 0 + +/* Boolean True. */ +#define ALC_TRUE 1 + +/** + * followed by Hz + */ +#define ALC_FREQUENCY 0x1007 + +/** + * followed by Hz + */ +#define ALC_REFRESH 0x1008 + +/** + * followed by AL_TRUE, AL_FALSE + */ +#define ALC_SYNC 0x1009 + +/** + * followed by Num of requested Mono (3D) Sources + */ +#define ALC_MONO_SOURCES 0x1010 + +/** + * followed by Num of requested Stereo Sources + */ +#define ALC_STEREO_SOURCES 0x1011 + +/** + * errors + */ + +/** + * No error + */ +#define ALC_NO_ERROR ALC_FALSE + +/** + * No device + */ +#define ALC_INVALID_DEVICE 0xA001 + +/** + * invalid context ID + */ +#define ALC_INVALID_CONTEXT 0xA002 + +/** + * bad enum + */ +#define ALC_INVALID_ENUM 0xA003 + +/** + * bad value + */ +#define ALC_INVALID_VALUE 0xA004 + +/** + * Out of memory. + */ +#define ALC_OUT_OF_MEMORY 0xA005 + + +/** + * The Specifier string for default device + */ +#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 +#define ALC_DEVICE_SPECIFIER 0x1005 +#define ALC_EXTENSIONS 0x1006 + +#define ALC_MAJOR_VERSION 0x1000 +#define ALC_MINOR_VERSION 0x1001 + +#define ALC_ATTRIBUTES_SIZE 0x1002 +#define ALC_ALL_ATTRIBUTES 0x1003 + + +/** + * Capture extension + */ +#define ALC_EXT_CAPTURE 1 +#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 +#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 +#define ALC_CAPTURE_SAMPLES 0x312 + + +/** + * ALC_ENUMERATE_ALL_EXT enums + */ +#define ALC_ENUMERATE_ALL_EXT 1 +#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 +#define ALC_ALL_DEVICES_SPECIFIER 0x1013 + + +/* + * Context Management + */ +ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist ); + +ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context ); + +ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void ); + +ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context ); + + +/* + * Device Management + */ +ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename ); + +ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device ); + + +/* + * Error support. + * Obtain the most recent Context error + */ +ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device ); + + +/* + * Extension support. + * Query for the presence of an extension, and obtain any appropriate + * function pointers and enum values. + */ +ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname ); + +ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname ); + +ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname ); + + +/* + * Query functions + */ +ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ); + +ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data ); + + +/* + * Capture functions + */ +ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); + +ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); + +/* + * Pointer-to-function types, useful for dynamically getting ALC entry points. + */ +typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist); +typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context ); +typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void ); +typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context ); +typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename ); +typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device ); +typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device ); +typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname ); +typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname ); +typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname ); +typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param ); +typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest ); +typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); +typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export off +#endif + +#if defined(__cplusplus) +} +#endif + +#endif /* AL_ALC_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/AL/alext.h b/allegro-5.0.10-mingw-4.7.0/include/AL/alext.h new file mode 100644 index 0000000..ea27071 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/AL/alext.h @@ -0,0 +1,183 @@ +/** + * OpenAL cross platform audio library + * Copyright (C) 2008 by authors. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * Or go to http://www.gnu.org/copyleft/lgpl.html + */ + +#ifndef AL_ALEXT_H +#define AL_ALEXT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef AL_LOKI_IMA_ADPCM_format +#define AL_LOKI_IMA_ADPCM_format 1 +#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000 +#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001 +#endif + +#ifndef AL_LOKI_WAVE_format +#define AL_LOKI_WAVE_format 1 +#define AL_FORMAT_WAVE_EXT 0x10002 +#endif + +#ifndef AL_EXT_vorbis +#define AL_EXT_vorbis 1 +#define AL_FORMAT_VORBIS_EXT 0x10003 +#endif + +#ifndef AL_LOKI_quadriphonic +#define AL_LOKI_quadriphonic 1 +#define AL_FORMAT_QUAD8_LOKI 0x10004 +#define AL_FORMAT_QUAD16_LOKI 0x10005 +#endif + +#ifndef AL_EXT_float32 +#define AL_EXT_float32 1 +#define AL_FORMAT_MONO_FLOAT32 0x10010 +#define AL_FORMAT_STEREO_FLOAT32 0x10011 +#endif + +#ifndef AL_EXT_double +#define AL_EXT_double 1 +#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012 +#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013 +#endif + +#ifndef ALC_LOKI_audio_channel +#define ALC_LOKI_audio_channel 1 +#define ALC_CHAN_MAIN_LOKI 0x500001 +#define ALC_CHAN_PCM_LOKI 0x500002 +#define ALC_CHAN_CD_LOKI 0x500003 +#endif + +#ifndef AL_EXT_MCFORMATS +#define AL_EXT_MCFORMATS 1 +#define AL_FORMAT_QUAD8 0x1204 +#define AL_FORMAT_QUAD16 0x1205 +#define AL_FORMAT_QUAD32 0x1206 +#define AL_FORMAT_REAR8 0x1207 +#define AL_FORMAT_REAR16 0x1208 +#define AL_FORMAT_REAR32 0x1209 +#define AL_FORMAT_51CHN8 0x120A +#define AL_FORMAT_51CHN16 0x120B +#define AL_FORMAT_51CHN32 0x120C +#define AL_FORMAT_61CHN8 0x120D +#define AL_FORMAT_61CHN16 0x120E +#define AL_FORMAT_61CHN32 0x120F +#define AL_FORMAT_71CHN8 0x1210 +#define AL_FORMAT_71CHN16 0x1211 +#define AL_FORMAT_71CHN32 0x1212 +#endif + +#ifndef AL_EXT_MULAW_MCFORMATS +#define AL_EXT_MULAW_MCFORMATS 1 +#define AL_FORMAT_MONO_MULAW 0x10014 +#define AL_FORMAT_STEREO_MULAW 0x10015 +#define AL_FORMAT_QUAD_MULAW 0x10021 +#define AL_FORMAT_REAR_MULAW 0x10022 +#define AL_FORMAT_51CHN_MULAW 0x10023 +#define AL_FORMAT_61CHN_MULAW 0x10024 +#define AL_FORMAT_71CHN_MULAW 0x10025 +#endif + +#ifndef AL_EXT_IMA4 +#define AL_EXT_IMA4 1 +#define AL_FORMAT_MONO_IMA4 0x1300 +#define AL_FORMAT_STEREO_IMA4 0x1301 +#endif + +#ifndef AL_EXT_STATIC_BUFFER +#define AL_EXT_STATIC_BUFFER 1 +typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei); +#ifdef AL_ALEXT_PROTOTYPES +AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq); +#endif +#endif + +#ifndef ALC_EXT_EFX +#define ALC_EXT_EFX 1 +#include "efx.h" +#endif + +#ifndef ALC_EXT_disconnect +#define ALC_EXT_disconnect 1 +#define ALC_CONNECTED 0x313 +#endif + +#ifndef ALC_EXT_thread_local_context +#define ALC_EXT_thread_local_context 1 +typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context); +typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context); +ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void); +#endif +#endif + +#ifndef AL_EXT_source_distance_model +#define AL_EXT_source_distance_model 1 +#define AL_SOURCE_DISTANCE_MODEL 0x200 +#endif + +#ifndef AL_SOFT_buffer_sub_data +#define AL_SOFT_buffer_sub_data 1 +#define AL_BYTE_RW_OFFSETS_SOFT 0x1031 +#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032 +typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei); +#ifdef AL_ALEXT_PROTOTYPES +AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length); +#endif +#endif + +#ifndef AL_SOFT_loop_points +#define AL_SOFT_loop_points 1 +#define AL_LOOP_POINTS_SOFT 0x2015 +#endif + +#ifndef AL_EXT_FOLDBACK +#define AL_EXT_FOLDBACK 1 +#define AL_EXT_FOLDBACK_NAME "AL_EXT_FOLDBACK" +#define AL_FOLDBACK_EVENT_BLOCK 0x4112 +#define AL_FOLDBACK_EVENT_START 0x4111 +#define AL_FOLDBACK_EVENT_STOP 0x4113 +#define AL_FOLDBACK_MODE_MONO 0x4101 +#define AL_FOLDBACK_MODE_STEREO 0x4102 +typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei); +typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK); +typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void); +#ifdef AL_ALEXT_PROTOTYPES +AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback); +AL_API void AL_APIENTRY alRequestFoldbackStop(void); +#endif +#endif + +#ifndef ALC_EXT_DEDICATED +#define ALC_EXT_DEDICATED 1 +#define AL_DEDICATED_GAIN 0x0001 +#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001 +#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000 +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/AL/efx-creative.h b/allegro-5.0.10-mingw-4.7.0/include/AL/efx-creative.h new file mode 100644 index 0000000..0a04c98 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/AL/efx-creative.h @@ -0,0 +1,3 @@ +/* The tokens that would be defined here are already defined in efx.h. This + * empty file is here to provide compatibility with Windows-based projects + * that would include it. */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/AL/efx.h b/allegro-5.0.10-mingw-4.7.0/include/AL/efx.h new file mode 100644 index 0000000..0ccef95 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/AL/efx.h @@ -0,0 +1,758 @@ +#ifndef AL_EFX_H +#define AL_EFX_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#define ALC_EXT_EFX_NAME "ALC_EXT_EFX" + +#define ALC_EFX_MAJOR_VERSION 0x20001 +#define ALC_EFX_MINOR_VERSION 0x20002 +#define ALC_MAX_AUXILIARY_SENDS 0x20003 + + +/* Listener properties. */ +#define AL_METERS_PER_UNIT 0x20004 + +/* Source properties. */ +#define AL_DIRECT_FILTER 0x20005 +#define AL_AUXILIARY_SEND_FILTER 0x20006 +#define AL_AIR_ABSORPTION_FACTOR 0x20007 +#define AL_ROOM_ROLLOFF_FACTOR 0x20008 +#define AL_CONE_OUTER_GAINHF 0x20009 +#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A +#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B +#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C + + +/* Effect properties. */ + +/* Reverb effect parameters */ +#define AL_REVERB_DENSITY 0x0001 +#define AL_REVERB_DIFFUSION 0x0002 +#define AL_REVERB_GAIN 0x0003 +#define AL_REVERB_GAINHF 0x0004 +#define AL_REVERB_DECAY_TIME 0x0005 +#define AL_REVERB_DECAY_HFRATIO 0x0006 +#define AL_REVERB_REFLECTIONS_GAIN 0x0007 +#define AL_REVERB_REFLECTIONS_DELAY 0x0008 +#define AL_REVERB_LATE_REVERB_GAIN 0x0009 +#define AL_REVERB_LATE_REVERB_DELAY 0x000A +#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B +#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C +#define AL_REVERB_DECAY_HFLIMIT 0x000D + +/* EAX Reverb effect parameters */ +#define AL_EAXREVERB_DENSITY 0x0001 +#define AL_EAXREVERB_DIFFUSION 0x0002 +#define AL_EAXREVERB_GAIN 0x0003 +#define AL_EAXREVERB_GAINHF 0x0004 +#define AL_EAXREVERB_GAINLF 0x0005 +#define AL_EAXREVERB_DECAY_TIME 0x0006 +#define AL_EAXREVERB_DECAY_HFRATIO 0x0007 +#define AL_EAXREVERB_DECAY_LFRATIO 0x0008 +#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009 +#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A +#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B +#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C +#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D +#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E +#define AL_EAXREVERB_ECHO_TIME 0x000F +#define AL_EAXREVERB_ECHO_DEPTH 0x0010 +#define AL_EAXREVERB_MODULATION_TIME 0x0011 +#define AL_EAXREVERB_MODULATION_DEPTH 0x0012 +#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013 +#define AL_EAXREVERB_HFREFERENCE 0x0014 +#define AL_EAXREVERB_LFREFERENCE 0x0015 +#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016 +#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017 + +/* Chorus effect parameters */ +#define AL_CHORUS_WAVEFORM 0x0001 +#define AL_CHORUS_PHASE 0x0002 +#define AL_CHORUS_RATE 0x0003 +#define AL_CHORUS_DEPTH 0x0004 +#define AL_CHORUS_FEEDBACK 0x0005 +#define AL_CHORUS_DELAY 0x0006 + +/* Distortion effect parameters */ +#define AL_DISTORTION_EDGE 0x0001 +#define AL_DISTORTION_GAIN 0x0002 +#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003 +#define AL_DISTORTION_EQCENTER 0x0004 +#define AL_DISTORTION_EQBANDWIDTH 0x0005 + +/* Echo effect parameters */ +#define AL_ECHO_DELAY 0x0001 +#define AL_ECHO_LRDELAY 0x0002 +#define AL_ECHO_DAMPING 0x0003 +#define AL_ECHO_FEEDBACK 0x0004 +#define AL_ECHO_SPREAD 0x0005 + +/* Flanger effect parameters */ +#define AL_FLANGER_WAVEFORM 0x0001 +#define AL_FLANGER_PHASE 0x0002 +#define AL_FLANGER_RATE 0x0003 +#define AL_FLANGER_DEPTH 0x0004 +#define AL_FLANGER_FEEDBACK 0x0005 +#define AL_FLANGER_DELAY 0x0006 + +/* Frequency shifter effect parameters */ +#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001 +#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002 +#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003 + +/* Vocal morpher effect parameters */ +#define AL_VOCAL_MORPHER_PHONEMEA 0x0001 +#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002 +#define AL_VOCAL_MORPHER_PHONEMEB 0x0003 +#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004 +#define AL_VOCAL_MORPHER_WAVEFORM 0x0005 +#define AL_VOCAL_MORPHER_RATE 0x0006 + +/* Pitchshifter effect parameters */ +#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001 +#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002 + +/* Ringmodulator effect parameters */ +#define AL_RING_MODULATOR_FREQUENCY 0x0001 +#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002 +#define AL_RING_MODULATOR_WAVEFORM 0x0003 + +/* Autowah effect parameters */ +#define AL_AUTOWAH_ATTACK_TIME 0x0001 +#define AL_AUTOWAH_RELEASE_TIME 0x0002 +#define AL_AUTOWAH_RESONANCE 0x0003 +#define AL_AUTOWAH_PEAK_GAIN 0x0004 + +/* Compressor effect parameters */ +#define AL_COMPRESSOR_ONOFF 0x0001 + +/* Equalizer effect parameters */ +#define AL_EQUALIZER_LOW_GAIN 0x0001 +#define AL_EQUALIZER_LOW_CUTOFF 0x0002 +#define AL_EQUALIZER_MID1_GAIN 0x0003 +#define AL_EQUALIZER_MID1_CENTER 0x0004 +#define AL_EQUALIZER_MID1_WIDTH 0x0005 +#define AL_EQUALIZER_MID2_GAIN 0x0006 +#define AL_EQUALIZER_MID2_CENTER 0x0007 +#define AL_EQUALIZER_MID2_WIDTH 0x0008 +#define AL_EQUALIZER_HIGH_GAIN 0x0009 +#define AL_EQUALIZER_HIGH_CUTOFF 0x000A + +/* Effect type */ +#define AL_EFFECT_FIRST_PARAMETER 0x0000 +#define AL_EFFECT_LAST_PARAMETER 0x8000 +#define AL_EFFECT_TYPE 0x8001 + +/* Effect types, used with the AL_EFFECT_TYPE property */ +#define AL_EFFECT_NULL 0x0000 +#define AL_EFFECT_REVERB 0x0001 +#define AL_EFFECT_CHORUS 0x0002 +#define AL_EFFECT_DISTORTION 0x0003 +#define AL_EFFECT_ECHO 0x0004 +#define AL_EFFECT_FLANGER 0x0005 +#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006 +#define AL_EFFECT_VOCAL_MORPHER 0x0007 +#define AL_EFFECT_PITCH_SHIFTER 0x0008 +#define AL_EFFECT_RING_MODULATOR 0x0009 +#define AL_EFFECT_AUTOWAH 0x000A +#define AL_EFFECT_COMPRESSOR 0x000B +#define AL_EFFECT_EQUALIZER 0x000C +#define AL_EFFECT_EAXREVERB 0x8000 + +/* Auxiliary Effect Slot properties. */ +#define AL_EFFECTSLOT_EFFECT 0x0001 +#define AL_EFFECTSLOT_GAIN 0x0002 +#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003 + +/* NULL Auxiliary Slot ID to disable a source send. */ +#define AL_EFFECTSLOT_NULL 0x0000 + + +/* Filter properties. */ + +/* Lowpass filter parameters */ +#define AL_LOWPASS_GAIN 0x0001 +#define AL_LOWPASS_GAINHF 0x0002 + +/* Highpass filter parameters */ +#define AL_HIGHPASS_GAIN 0x0001 +#define AL_HIGHPASS_GAINLF 0x0002 + +/* Bandpass filter parameters */ +#define AL_BANDPASS_GAIN 0x0001 +#define AL_BANDPASS_GAINLF 0x0002 +#define AL_BANDPASS_GAINHF 0x0003 + +/* Filter type */ +#define AL_FILTER_FIRST_PARAMETER 0x0000 +#define AL_FILTER_LAST_PARAMETER 0x8000 +#define AL_FILTER_TYPE 0x8001 + +/* Filter types, used with the AL_FILTER_TYPE property */ +#define AL_FILTER_NULL 0x0000 +#define AL_FILTER_LOWPASS 0x0001 +#define AL_FILTER_HIGHPASS 0x0002 +#define AL_FILTER_BANDPASS 0x0003 + + +/* Effect object function types. */ +typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*); +typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*); +typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint); +typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint); +typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat); +typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*); + +/* Filter object function types. */ +typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*); +typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, ALuint*); +typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint); +typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint); +typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat); +typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*); + +/* Auxiliary Effect Slot object function types. */ +typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*); +typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*); +typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint); +typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint); +typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat); +typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*); +typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*); +typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*); + +#ifdef AL_ALEXT_PROTOTYPES +AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects); +AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects); +AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect); +AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue); +AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue); +AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues); +AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue); +AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue); +AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues); + +AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters); +AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters); +AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter); +AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue); +AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue); +AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues); +AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue); +AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue); +AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues); + +AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots); +AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots); +AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot); +AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue); +AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue); +AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues); +AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue); +AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues); +AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue); +AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues); +#endif + +/* Filter ranges and defaults. */ + +/* Lowpass filter */ +#define LOWPASS_MIN_GAIN (0.0f) +#define LOWPASS_MAX_GAIN (1.0f) +#define LOWPASS_DEFAULT_GAIN (1.0f) + +#define LOWPASS_MIN_GAINHF (0.0f) +#define LOWPASS_MAX_GAINHF (1.0f) +#define LOWPASS_DEFAULT_GAINHF (1.0f) + +/* Highpass filter */ +#define HIGHPASS_MIN_GAIN (0.0f) +#define HIGHPASS_MAX_GAIN (1.0f) +#define HIGHPASS_DEFAULT_GAIN (1.0f) + +#define HIGHPASS_MIN_GAINLF (0.0f) +#define HIGHPASS_MAX_GAINLF (1.0f) +#define HIGHPASS_DEFAULT_GAINLF (1.0f) + +/* Bandpass filter */ +#define BANDPASS_MIN_GAIN (0.0f) +#define BANDPASS_MAX_GAIN (1.0f) +#define BANDPASS_DEFAULT_GAIN (1.0f) + +#define BANDPASS_MIN_GAINHF (0.0f) +#define BANDPASS_MAX_GAINHF (1.0f) +#define BANDPASS_DEFAULT_GAINHF (1.0f) + +#define BANDPASS_MIN_GAINLF (0.0f) +#define BANDPASS_MAX_GAINLF (1.0f) +#define BANDPASS_DEFAULT_GAINLF (1.0f) + + +/* Effect parameter ranges and defaults. */ + +/* Standard reverb effect */ +#define AL_REVERB_MIN_DENSITY (0.0f) +#define AL_REVERB_MAX_DENSITY (1.0f) +#define AL_REVERB_DEFAULT_DENSITY (1.0f) + +#define AL_REVERB_MIN_DIFFUSION (0.0f) +#define AL_REVERB_MAX_DIFFUSION (1.0f) +#define AL_REVERB_DEFAULT_DIFFUSION (1.0f) + +#define AL_REVERB_MIN_GAIN (0.0f) +#define AL_REVERB_MAX_GAIN (1.0f) +#define AL_REVERB_DEFAULT_GAIN (0.32f) + +#define AL_REVERB_MIN_GAINHF (0.0f) +#define AL_REVERB_MAX_GAINHF (1.0f) +#define AL_REVERB_DEFAULT_GAINHF (0.89f) + +#define AL_REVERB_MIN_DECAY_TIME (0.1f) +#define AL_REVERB_MAX_DECAY_TIME (20.0f) +#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f) + +#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f) +#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f) +#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f) + +#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f) +#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f) +#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) + +#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f) +#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f) +#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) + +#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f) +#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f) +#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) + +#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f) +#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f) +#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) + +#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) +#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) +#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) + +#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) +#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) +#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + +#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE +#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE +#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE + +/* EAX reverb effect */ +#define AL_EAXREVERB_MIN_DENSITY (0.0f) +#define AL_EAXREVERB_MAX_DENSITY (1.0f) +#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f) + +#define AL_EAXREVERB_MIN_DIFFUSION (0.0f) +#define AL_EAXREVERB_MAX_DIFFUSION (1.0f) +#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f) + +#define AL_EAXREVERB_MIN_GAIN (0.0f) +#define AL_EAXREVERB_MAX_GAIN (1.0f) +#define AL_EAXREVERB_DEFAULT_GAIN (0.32f) + +#define AL_EAXREVERB_MIN_GAINHF (0.0f) +#define AL_EAXREVERB_MAX_GAINHF (1.0f) +#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f) + +#define AL_EAXREVERB_MIN_GAINLF (0.0f) +#define AL_EAXREVERB_MAX_GAINLF (1.0f) +#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f) + +#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f) +#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f) +#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f) + +#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f) +#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f) +#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f) + +#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f) +#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f) +#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f) + +#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f) +#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f) +#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) + +#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f) +#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f) +#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) + +#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f) + +#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f) +#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f) +#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) + +#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f) +#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f) +#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) + +#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f) + +#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f) +#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f) +#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f) + +#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f) +#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f) +#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f) + +#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f) +#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f) +#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f) + +#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f) +#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f) +#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f) + +#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) +#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) +#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) + +#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f) +#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f) +#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f) + +#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f) +#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f) +#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f) + +#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) +#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) +#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + +#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE +#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE +#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE + +/* Chorus effect */ +#define AL_CHORUS_WAVEFORM_SINUSOID (0) +#define AL_CHORUS_WAVEFORM_TRIANGLE (1) + +#define AL_CHORUS_MIN_WAVEFORM (0) +#define AL_CHORUS_MAX_WAVEFORM (1) +#define AL_CHORUS_DEFAULT_WAVEFORM (1) + +#define AL_CHORUS_MIN_PHASE (-180) +#define AL_CHORUS_MAX_PHASE (180) +#define AL_CHORUS_DEFAULT_PHASE (90) + +#define AL_CHORUS_MIN_RATE (0.0f) +#define AL_CHORUS_MAX_RATE (10.0f) +#define AL_CHORUS_DEFAULT_RATE (1.1f) + +#define AL_CHORUS_MIN_DEPTH (0.0f) +#define AL_CHORUS_MAX_DEPTH (1.0f) +#define AL_CHORUS_DEFAULT_DEPTH (0.1f) + +#define AL_CHORUS_MIN_FEEDBACK (-1.0f) +#define AL_CHORUS_MAX_FEEDBACK (1.0f) +#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f) + +#define AL_CHORUS_MIN_DELAY (0.0f) +#define AL_CHORUS_MAX_DELAY (0.016f) +#define AL_CHORUS_DEFAULT_DELAY (0.016f) + +/* Distortion effect */ +#define AL_DISTORTION_MIN_EDGE (0.0f) +#define AL_DISTORTION_MAX_EDGE (1.0f) +#define AL_DISTORTION_DEFAULT_EDGE (0.2f) + +#define AL_DISTORTION_MIN_GAIN (0.01f) +#define AL_DISTORTION_MAX_GAIN (1.0f) +#define AL_DISTORTION_DEFAULT_GAIN (0.05f) + +#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f) +#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f) +#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f) + +#define AL_DISTORTION_MIN_EQCENTER (80.0f) +#define AL_DISTORTION_MAX_EQCENTER (24000.0f) +#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f) + +#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f) +#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f) +#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f) + +/* Echo effect */ +#define AL_ECHO_MIN_DELAY (0.0f) +#define AL_ECHO_MAX_DELAY (0.207f) +#define AL_ECHO_DEFAULT_DELAY (0.1f) + +#define AL_ECHO_MIN_LRDELAY (0.0f) +#define AL_ECHO_MAX_LRDELAY (0.404f) +#define AL_ECHO_DEFAULT_LRDELAY (0.1f) + +#define AL_ECHO_MIN_DAMPING (0.0f) +#define AL_ECHO_MAX_DAMPING (0.99f) +#define AL_ECHO_DEFAULT_DAMPING (0.5f) + +#define AL_ECHO_MIN_FEEDBACK (0.0f) +#define AL_ECHO_MAX_FEEDBACK (1.0f) +#define AL_ECHO_DEFAULT_FEEDBACK (0.5f) + +#define AL_ECHO_MIN_SPREAD (-1.0f) +#define AL_ECHO_MAX_SPREAD (1.0f) +#define AL_ECHO_DEFAULT_SPREAD (-1.0f) + +/* Flanger effect */ +#define AL_FLANGER_WAVEFORM_SINUSOID (0) +#define AL_FLANGER_WAVEFORM_TRIANGLE (1) + +#define AL_FLANGER_MIN_WAVEFORM (0) +#define AL_FLANGER_MAX_WAVEFORM (1) +#define AL_FLANGER_DEFAULT_WAVEFORM (1) + +#define AL_FLANGER_MIN_PHASE (-180) +#define AL_FLANGER_MAX_PHASE (180) +#define AL_FLANGER_DEFAULT_PHASE (0) + +#define AL_FLANGER_MIN_RATE (0.0f) +#define AL_FLANGER_MAX_RATE (10.0f) +#define AL_FLANGER_DEFAULT_RATE (0.27f) + +#define AL_FLANGER_MIN_DEPTH (0.0f) +#define AL_FLANGER_MAX_DEPTH (1.0f) +#define AL_FLANGER_DEFAULT_DEPTH (1.0f) + +#define AL_FLANGER_MIN_FEEDBACK (-1.0f) +#define AL_FLANGER_MAX_FEEDBACK (1.0f) +#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f) + +#define AL_FLANGER_MIN_DELAY (0.0f) +#define AL_FLANGER_MAX_DELAY (0.004f) +#define AL_FLANGER_DEFAULT_DELAY (0.002f) + +/* Frequency shifter effect */ +#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f) +#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f) +#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f) + +#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0) +#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2) +#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0) + +#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0) +#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1) +#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2) + +#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0) +#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2) +#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0) + +/* Vocal morpher effect */ +#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0) +#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29) +#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0) + +#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24) +#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24) +#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0) + +#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0) +#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29) +#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10) + +#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24) +#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24) +#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0) + +#define AL_VOCAL_MORPHER_PHONEME_A (0) +#define AL_VOCAL_MORPHER_PHONEME_E (1) +#define AL_VOCAL_MORPHER_PHONEME_I (2) +#define AL_VOCAL_MORPHER_PHONEME_O (3) +#define AL_VOCAL_MORPHER_PHONEME_U (4) +#define AL_VOCAL_MORPHER_PHONEME_AA (5) +#define AL_VOCAL_MORPHER_PHONEME_AE (6) +#define AL_VOCAL_MORPHER_PHONEME_AH (7) +#define AL_VOCAL_MORPHER_PHONEME_AO (8) +#define AL_VOCAL_MORPHER_PHONEME_EH (9) +#define AL_VOCAL_MORPHER_PHONEME_ER (10) +#define AL_VOCAL_MORPHER_PHONEME_IH (11) +#define AL_VOCAL_MORPHER_PHONEME_IY (12) +#define AL_VOCAL_MORPHER_PHONEME_UH (13) +#define AL_VOCAL_MORPHER_PHONEME_UW (14) +#define AL_VOCAL_MORPHER_PHONEME_B (15) +#define AL_VOCAL_MORPHER_PHONEME_D (16) +#define AL_VOCAL_MORPHER_PHONEME_F (17) +#define AL_VOCAL_MORPHER_PHONEME_G (18) +#define AL_VOCAL_MORPHER_PHONEME_J (19) +#define AL_VOCAL_MORPHER_PHONEME_K (20) +#define AL_VOCAL_MORPHER_PHONEME_L (21) +#define AL_VOCAL_MORPHER_PHONEME_M (22) +#define AL_VOCAL_MORPHER_PHONEME_N (23) +#define AL_VOCAL_MORPHER_PHONEME_P (24) +#define AL_VOCAL_MORPHER_PHONEME_R (25) +#define AL_VOCAL_MORPHER_PHONEME_S (26) +#define AL_VOCAL_MORPHER_PHONEME_T (27) +#define AL_VOCAL_MORPHER_PHONEME_V (28) +#define AL_VOCAL_MORPHER_PHONEME_Z (29) + +#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0) +#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1) +#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2) + +#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0) +#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2) +#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0) + +#define AL_VOCAL_MORPHER_MIN_RATE (0.0f) +#define AL_VOCAL_MORPHER_MAX_RATE (10.0f) +#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f) + +/* Pitch shifter effect */ +#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12) +#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12) +#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12) + +#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50) +#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50) +#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0) + +/* Ring modulator effect */ +#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f) +#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f) +#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f) + +#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f) +#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f) +#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f) + +#define AL_RING_MODULATOR_SINUSOID (0) +#define AL_RING_MODULATOR_SAWTOOTH (1) +#define AL_RING_MODULATOR_SQUARE (2) + +#define AL_RING_MODULATOR_MIN_WAVEFORM (0) +#define AL_RING_MODULATOR_MAX_WAVEFORM (2) +#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0) + +/* Autowah effect */ +#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f) +#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f) +#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f) + +#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f) +#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f) +#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f) + +#define AL_AUTOWAH_MIN_RESONANCE (2.0f) +#define AL_AUTOWAH_MAX_RESONANCE (1000.0f) +#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f) + +#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f) +#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f) +#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f) + +/* Compressor effect */ +#define AL_COMPRESSOR_MIN_ONOFF (0) +#define AL_COMPRESSOR_MAX_ONOFF (1) +#define AL_COMPRESSOR_DEFAULT_ONOFF (1) + +/* Equalizer effect */ +#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f) +#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f) +#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f) + +#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f) +#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f) +#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f) + +#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f) +#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f) +#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f) + +#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f) +#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f) +#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f) + +#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f) +#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f) +#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f) + +#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f) +#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f) +#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f) + +#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f) +#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f) +#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f) + +#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f) +#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f) +#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f) + +#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f) +#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f) +#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f) + +#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f) +#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f) +#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f) + + +/* Source parameter value ranges and defaults. */ +#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f) +#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f) +#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f) + +#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f) +#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f) +#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) + +#define AL_MIN_CONE_OUTER_GAINHF (0.0f) +#define AL_MAX_CONE_OUTER_GAINHF (1.0f) +#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f) + +#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE +#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE +#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE + +#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE +#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE +#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE + +#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE +#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE +#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE + + +/* Listener parameter value ranges and defaults. */ +#define AL_MIN_METERS_PER_UNIT FLT_MIN +#define AL_MAX_METERS_PER_UNIT FLT_MAX +#define AL_DEFAULT_METERS_PER_UNIT (1.0f) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* AL_EFX_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/all.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/all.h new file mode 100644 index 0000000..c542c0d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/all.h @@ -0,0 +1,370 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__ALL_H +#define FLAC__ALL_H + +#include "export.h" + +#include "assert.h" +#include "callback.h" +#include "format.h" +#include "metadata.h" +#include "ordinals.h" +#include "stream_decoder.h" +#include "stream_encoder.h" + +/** \mainpage + * + * \section intro Introduction + * + * This is the documentation for the FLAC C and C++ APIs. It is + * highly interconnected; this introduction should give you a top + * level idea of the structure and how to find the information you + * need. As a prerequisite you should have at least a basic + * knowledge of the FLAC format, documented + * here. + * + * \section c_api FLAC C API + * + * The FLAC C API is the interface to libFLAC, a set of structures + * describing the components of FLAC streams, and functions for + * encoding and decoding streams, as well as manipulating FLAC + * metadata in files. The public include files will be installed + * in your include area (for example /usr/include/FLAC/...). + * + * By writing a little code and linking against libFLAC, it is + * relatively easy to add FLAC support to another program. The + * library is licensed under Xiph's BSD license. + * Complete source code of libFLAC as well as the command-line + * encoder and plugins is available and is a useful source of + * examples. + * + * Aside from encoders and decoders, libFLAC provides a powerful + * metadata interface for manipulating metadata in FLAC files. It + * allows the user to add, delete, and modify FLAC metadata blocks + * and it can automatically take advantage of PADDING blocks to avoid + * rewriting the entire FLAC file when changing the size of the + * metadata. + * + * libFLAC usually only requires the standard C library and C math + * library. In particular, threading is not used so there is no + * dependency on a thread library. However, libFLAC does not use + * global variables and should be thread-safe. + * + * libFLAC also supports encoding to and decoding from Ogg FLAC. + * However the metadata editing interfaces currently have limited + * read-only support for Ogg FLAC files. + * + * \section cpp_api FLAC C++ API + * + * The FLAC C++ API is a set of classes that encapsulate the + * structures and functions in libFLAC. They provide slightly more + * functionality with respect to metadata but are otherwise + * equivalent. For the most part, they share the same usage as + * their counterparts in libFLAC, and the FLAC C API documentation + * can be used as a supplement. The public include files + * for the C++ API will be installed in your include area (for + * example /usr/include/FLAC++/...). + * + * libFLAC++ is also licensed under + * Xiph's BSD license. + * + * \section getting_started Getting Started + * + * A good starting point for learning the API is to browse through + * the modules. Modules are logical + * groupings of related functions or classes, which correspond roughly + * to header files or sections of header files. Each module includes a + * detailed description of the general usage of its functions or + * classes. + * + * From there you can go on to look at the documentation of + * individual functions. You can see different views of the individual + * functions through the links in top bar across this page. + * + * If you prefer a more hands-on approach, you can jump right to some + * example code. + * + * \section porting_guide Porting Guide + * + * Starting with FLAC 1.1.3 a \link porting Porting Guide \endlink + * has been introduced which gives detailed instructions on how to + * port your code to newer versions of FLAC. + * + * \section embedded_developers Embedded Developers + * + * libFLAC has grown larger over time as more functionality has been + * included, but much of it may be unnecessary for a particular embedded + * implementation. Unused parts may be pruned by some simple editing of + * src/libFLAC/Makefile.am. In general, the decoders, encoders, and + * metadata interface are all independent from each other. + * + * It is easiest to just describe the dependencies: + * + * - All modules depend on the \link flac_format Format \endlink module. + * - The decoders and encoders depend on the bitbuffer. + * - The decoder is independent of the encoder. The encoder uses the + * decoder because of the verify feature, but this can be removed if + * not needed. + * - Parts of the metadata interface require the stream decoder (but not + * the encoder). + * - Ogg support is selectable through the compile time macro + * \c FLAC__HAS_OGG. + * + * For example, if your application only requires the stream decoder, no + * encoder, and no metadata interface, you can remove the stream encoder + * and the metadata interface, which will greatly reduce the size of the + * library. + * + * Also, there are several places in the libFLAC code with comments marked + * with "OPT:" where a #define can be changed to enable code that might be + * faster on a specific platform. Experimenting with these can yield faster + * binaries. + */ + +/** \defgroup porting Porting Guide for New Versions + * + * This module describes differences in the library interfaces from + * version to version. It assists in the porting of code that uses + * the libraries to newer versions of FLAC. + * + * One simple facility for making porting easier that has been added + * in FLAC 1.1.3 is a set of \c #defines in \c export.h of each + * library's includes (e.g. \c include/FLAC/export.h). The + * \c #defines mirror the libraries' + * libtool version numbers, + * e.g. in libFLAC there are \c FLAC_API_VERSION_CURRENT, + * \c FLAC_API_VERSION_REVISION, and \c FLAC_API_VERSION_AGE. + * These can be used to support multiple versions of an API during the + * transition phase, e.g. + * + * \code + * #if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7 + * legacy code + * #else + * new code + * #endif + * \endcode + * + * The the source will work for multiple versions and the legacy code can + * easily be removed when the transition is complete. + * + * Another available symbol is FLAC_API_SUPPORTS_OGG_FLAC (defined in + * include/FLAC/export.h), which can be used to determine whether or not + * the library has been compiled with support for Ogg FLAC. This is + * simpler than trying to call an Ogg init function and catching the + * error. + */ + +/** \defgroup porting_1_1_2_to_1_1_3 Porting from FLAC 1.1.2 to 1.1.3 + * \ingroup porting + * + * \brief + * This module describes porting from FLAC 1.1.2 to FLAC 1.1.3. + * + * The main change between the APIs in 1.1.2 and 1.1.3 is that they have + * been simplified. First, libOggFLAC has been merged into libFLAC and + * libOggFLAC++ has been merged into libFLAC++. Second, both the three + * decoding layers and three encoding layers have been merged into a + * single stream decoder and stream encoder. That is, the functionality + * of FLAC__SeekableStreamDecoder and FLAC__FileDecoder has been merged + * into FLAC__StreamDecoder, and FLAC__SeekableStreamEncoder and + * FLAC__FileEncoder into FLAC__StreamEncoder. Only the + * FLAC__StreamDecoder and FLAC__StreamEncoder remain. What this means + * is there is now a single API that can be used to encode or decode + * streams to/from native FLAC or Ogg FLAC and the single API can work + * on both seekable and non-seekable streams. + * + * Instead of creating an encoder or decoder of a certain layer, now the + * client will always create a FLAC__StreamEncoder or + * FLAC__StreamDecoder. The old layers are now differentiated by the + * initialization function. For example, for the decoder, + * FLAC__stream_decoder_init() has been replaced by + * FLAC__stream_decoder_init_stream(). This init function takes + * callbacks for the I/O, and the seeking callbacks are optional. This + * allows the client to use the same object for seekable and + * non-seekable streams. For decoding a FLAC file directly, the client + * can use FLAC__stream_decoder_init_file() and pass just a filename + * and fewer callbacks; most of the other callbacks are supplied + * internally. For situations where fopen()ing by filename is not + * possible (e.g. Unicode filenames on Windows) the client can instead + * open the file itself and supply the FILE* to + * FLAC__stream_decoder_init_FILE(). The init functions now returns a + * FLAC__StreamDecoderInitStatus instead of FLAC__StreamDecoderState. + * Since the callbacks and client data are now passed to the init + * function, the FLAC__stream_decoder_set_*_callback() functions and + * FLAC__stream_decoder_set_client_data() are no longer needed. The + * rest of the calls to the decoder are the same as before. + * + * There are counterpart init functions for Ogg FLAC, e.g. + * FLAC__stream_decoder_init_ogg_stream(). All the rest of the calls + * and callbacks are the same as for native FLAC. + * + * As an example, in FLAC 1.1.2 a seekable stream decoder would have + * been set up like so: + * + * \code + * FLAC__SeekableStreamDecoder *decoder = FLAC__seekable_stream_decoder_new(); + * if(decoder == NULL) do_something; + * FLAC__seekable_stream_decoder_set_md5_checking(decoder, true); + * [... other settings ...] + * FLAC__seekable_stream_decoder_set_read_callback(decoder, my_read_callback); + * FLAC__seekable_stream_decoder_set_seek_callback(decoder, my_seek_callback); + * FLAC__seekable_stream_decoder_set_tell_callback(decoder, my_tell_callback); + * FLAC__seekable_stream_decoder_set_length_callback(decoder, my_length_callback); + * FLAC__seekable_stream_decoder_set_eof_callback(decoder, my_eof_callback); + * FLAC__seekable_stream_decoder_set_write_callback(decoder, my_write_callback); + * FLAC__seekable_stream_decoder_set_metadata_callback(decoder, my_metadata_callback); + * FLAC__seekable_stream_decoder_set_error_callback(decoder, my_error_callback); + * FLAC__seekable_stream_decoder_set_client_data(decoder, my_client_data); + * if(FLAC__seekable_stream_decoder_init(decoder) != FLAC__SEEKABLE_STREAM_DECODER_OK) do_something; + * \endcode + * + * In FLAC 1.1.3 it is like this: + * + * \code + * FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new(); + * if(decoder == NULL) do_something; + * FLAC__stream_decoder_set_md5_checking(decoder, true); + * [... other settings ...] + * if(FLAC__stream_decoder_init_stream( + * decoder, + * my_read_callback, + * my_seek_callback, // or NULL + * my_tell_callback, // or NULL + * my_length_callback, // or NULL + * my_eof_callback, // or NULL + * my_write_callback, + * my_metadata_callback, // or NULL + * my_error_callback, + * my_client_data + * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something; + * \endcode + * + * or you could do; + * + * \code + * [...] + * FILE *file = fopen("somefile.flac","rb"); + * if(file == NULL) do_somthing; + * if(FLAC__stream_decoder_init_FILE( + * decoder, + * file, + * my_write_callback, + * my_metadata_callback, // or NULL + * my_error_callback, + * my_client_data + * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something; + * \endcode + * + * or just: + * + * \code + * [...] + * if(FLAC__stream_decoder_init_file( + * decoder, + * "somefile.flac", + * my_write_callback, + * my_metadata_callback, // or NULL + * my_error_callback, + * my_client_data + * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something; + * \endcode + * + * Another small change to the decoder is in how it handles unparseable + * streams. Before, when the decoder found an unparseable stream + * (reserved for when the decoder encounters a stream from a future + * encoder that it can't parse), it changed the state to + * \c FLAC__STREAM_DECODER_UNPARSEABLE_STREAM. Now the decoder instead + * drops sync and calls the error callback with a new error code + * \c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM. This is + * more robust. If your error callback does not discriminate on the the + * error state, your code does not need to be changed. + * + * The encoder now has a new setting: + * FLAC__stream_encoder_set_apodization(). This is for setting the + * method used to window the data before LPC analysis. You only need to + * add a call to this function if the default is not suitable. There + * are also two new convenience functions that may be useful: + * FLAC__metadata_object_cuesheet_calculate_cddb_id() and + * FLAC__metadata_get_cuesheet(). + * + * The \a bytes parameter to FLAC__StreamDecoderReadCallback, + * FLAC__StreamEncoderReadCallback, and FLAC__StreamEncoderWriteCallback + * is now \c size_t instead of \c unsigned. + */ + +/** \defgroup porting_1_1_3_to_1_1_4 Porting from FLAC 1.1.3 to 1.1.4 + * \ingroup porting + * + * \brief + * This module describes porting from FLAC 1.1.3 to FLAC 1.1.4. + * + * There were no changes to any of the interfaces from 1.1.3 to 1.1.4. + * There was a slight change in the implementation of + * FLAC__stream_encoder_set_metadata(); the function now makes a copy + * of the \a metadata array of pointers so the client no longer needs + * to maintain it after the call. The objects themselves that are + * pointed to by the array are still not copied though and must be + * maintained until the call to FLAC__stream_encoder_finish(). + */ + +/** \defgroup porting_1_1_4_to_1_2_0 Porting from FLAC 1.1.4 to 1.2.0 + * \ingroup porting + * + * \brief + * This module describes porting from FLAC 1.1.4 to FLAC 1.2.0. + * + * There were only very minor changes to the interfaces from 1.1.4 to 1.2.0. + * In libFLAC, \c FLAC__format_sample_rate_is_subset() was added. + * In libFLAC++, \c FLAC::Decoder::Stream::get_decode_position() was added. + * + * Finally, value of the constant \c FLAC__FRAME_HEADER_RESERVED_LEN + * has changed to reflect the conversion of one of the reserved bits + * into active use. It used to be \c 2 and now is \c 1. However the + * FLAC frame header length has not changed, so to skip the proper + * number of bits, use \c FLAC__FRAME_HEADER_RESERVED_LEN + + * \c FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN + */ + +/** \defgroup flac FLAC C API + * + * The FLAC C API is the interface to libFLAC, a set of structures + * describing the components of FLAC streams, and functions for + * encoding and decoding streams, as well as manipulating FLAC + * metadata in files. + * + * You should start with the format components as all other modules + * are dependent on it. + */ + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/assert.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/assert.h new file mode 100644 index 0000000..3fc03f3 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/assert.h @@ -0,0 +1,45 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__ASSERT_H +#define FLAC__ASSERT_H + +/* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ +#ifdef DEBUG +#include +#define FLAC__ASSERT(x) assert(x) +#define FLAC__ASSERT_DECLARATION(x) x +#else +#define FLAC__ASSERT(x) +#define FLAC__ASSERT_DECLARATION(x) +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/callback.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/callback.h new file mode 100644 index 0000000..c954121 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/callback.h @@ -0,0 +1,184 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__CALLBACK_H +#define FLAC__CALLBACK_H + +#include "ordinals.h" +#include /* for size_t */ + +/** \file include/FLAC/callback.h + * + * \brief + * This module defines the structures for describing I/O callbacks + * to the other FLAC interfaces. + * + * See the detailed documentation for callbacks in the + * \link flac_callbacks callbacks \endlink module. + */ + +/** \defgroup flac_callbacks FLAC/callback.h: I/O callback structures + * \ingroup flac + * + * \brief + * This module defines the structures for describing I/O callbacks + * to the other FLAC interfaces. + * + * The purpose of the I/O callback functions is to create a common way + * for the metadata interfaces to handle I/O. + * + * Originally the metadata interfaces required filenames as the way of + * specifying FLAC files to operate on. This is problematic in some + * environments so there is an additional option to specify a set of + * callbacks for doing I/O on the FLAC file, instead of the filename. + * + * In addition to the callbacks, a FLAC__IOHandle type is defined as an + * opaque structure for a data source. + * + * The callback function prototypes are similar (but not identical) to the + * stdio functions fread, fwrite, fseek, ftell, feof, and fclose. If you use + * stdio streams to implement the callbacks, you can pass fread, fwrite, and + * fclose anywhere a FLAC__IOCallback_Read, FLAC__IOCallback_Write, or + * FLAC__IOCallback_Close is required, and a FILE* anywhere a FLAC__IOHandle + * is required. \warning You generally CANNOT directly use fseek or ftell + * for FLAC__IOCallback_Seek or FLAC__IOCallback_Tell since on most systems + * these use 32-bit offsets and FLAC requires 64-bit offsets to deal with + * large files. You will have to find an equivalent function (e.g. ftello), + * or write a wrapper. The same is true for feof() since this is usually + * implemented as a macro, not as a function whose address can be taken. + * + * \{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** This is the opaque handle type used by the callbacks. Typically + * this is a \c FILE* or address of a file descriptor. + */ +typedef void* FLAC__IOHandle; + +/** Signature for the read callback. + * The signature and semantics match POSIX fread() implementations + * and can generally be used interchangeably. + * + * \param ptr The address of the read buffer. + * \param size The size of the records to be read. + * \param nmemb The number of records to be read. + * \param handle The handle to the data source. + * \retval size_t + * The number of records read. + */ +typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle); + +/** Signature for the write callback. + * The signature and semantics match POSIX fwrite() implementations + * and can generally be used interchangeably. + * + * \param ptr The address of the write buffer. + * \param size The size of the records to be written. + * \param nmemb The number of records to be written. + * \param handle The handle to the data source. + * \retval size_t + * The number of records written. + */ +typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle); + +/** Signature for the seek callback. + * The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT + * EXCEPTION: the offset is a 64-bit type whereas fseek() is generally 'long' + * and 32-bits wide. + * + * \param handle The handle to the data source. + * \param offset The new position, relative to \a whence + * \param whence \c SEEK_SET, \c SEEK_CUR, or \c SEEK_END + * \retval int + * \c 0 on success, \c -1 on error. + */ +typedef int (*FLAC__IOCallback_Seek) (FLAC__IOHandle handle, FLAC__int64 offset, int whence); + +/** Signature for the tell callback. + * The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT + * EXCEPTION: the offset is a 64-bit type whereas ftell() is generally 'long' + * and 32-bits wide. + * + * \param handle The handle to the data source. + * \retval FLAC__int64 + * The current position on success, \c -1 on error. + */ +typedef FLAC__int64 (*FLAC__IOCallback_Tell) (FLAC__IOHandle handle); + +/** Signature for the EOF callback. + * The signature and semantics mostly match POSIX feof() but WATCHOUT: + * on many systems, feof() is a macro, so in this case a wrapper function + * must be provided instead. + * + * \param handle The handle to the data source. + * \retval int + * \c 0 if not at end of file, nonzero if at end of file. + */ +typedef int (*FLAC__IOCallback_Eof) (FLAC__IOHandle handle); + +/** Signature for the close callback. + * The signature and semantics match POSIX fclose() implementations + * and can generally be used interchangeably. + * + * \param handle The handle to the data source. + * \retval int + * \c 0 on success, \c EOF on error. + */ +typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle); + +/** A structure for holding a set of callbacks. + * Each FLAC interface that requires a FLAC__IOCallbacks structure will + * describe which of the callbacks are required. The ones that are not + * required may be set to NULL. + * + * If the seek requirement for an interface is optional, you can signify that + * a data sorce is not seekable by setting the \a seek field to \c NULL. + */ +typedef struct { + FLAC__IOCallback_Read read; + FLAC__IOCallback_Write write; + FLAC__IOCallback_Seek seek; + FLAC__IOCallback_Tell tell; + FLAC__IOCallback_Eof eof; + FLAC__IOCallback_Close close; +} FLAC__IOCallbacks; + +/* \} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/export.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/export.h new file mode 100644 index 0000000..a525f29 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/export.h @@ -0,0 +1,91 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__EXPORT_H +#define FLAC__EXPORT_H + +/** \file include/FLAC/export.h + * + * \brief + * This module contains #defines and symbols for exporting function + * calls, and providing version information and compiled-in features. + * + * See the \link flac_export export \endlink module. + */ + +/** \defgroup flac_export FLAC/export.h: export symbols + * \ingroup flac + * + * \brief + * This module contains #defines and symbols for exporting function + * calls, and providing version information and compiled-in features. + * + * If you are compiling with MSVC and will link to the static library + * (libFLAC.lib) you should define FLAC__NO_DLL in your project to + * make sure the symbols are exported properly. + * + * \{ + */ + +#if defined(FLAC__NO_DLL) || !defined(_MSC_VER) +#define FLAC_API + +#else + +#ifdef FLAC_API_EXPORTS +#define FLAC_API _declspec(dllexport) +#else +#define FLAC_API _declspec(dllimport) + +#endif +#endif + +/** These #defines will mirror the libtool-based library version number, see + * http://www.gnu.org/software/libtool/manual.html#Libtool-versioning + */ +#define FLAC_API_VERSION_CURRENT 10 +#define FLAC_API_VERSION_REVISION 0 /**< see above */ +#define FLAC_API_VERSION_AGE 2 /**< see above */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** \c 1 if the library has been compiled with support for Ogg FLAC, else \c 0. */ +extern FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC; + +#ifdef __cplusplus +} +#endif + +/* \} */ + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/format.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/format.h new file mode 100644 index 0000000..77e2d01 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/format.h @@ -0,0 +1,1010 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__FORMAT_H +#define FLAC__FORMAT_H + +#include "export.h" +#include "ordinals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file include/FLAC/format.h + * + * \brief + * This module contains structure definitions for the representation + * of FLAC format components in memory. These are the basic + * structures used by the rest of the interfaces. + * + * See the detailed documentation in the + * \link flac_format format \endlink module. + */ + +/** \defgroup flac_format FLAC/format.h: format components + * \ingroup flac + * + * \brief + * This module contains structure definitions for the representation + * of FLAC format components in memory. These are the basic + * structures used by the rest of the interfaces. + * + * First, you should be familiar with the + * FLAC format. Many of the values here + * follow directly from the specification. As a user of libFLAC, the + * interesting parts really are the structures that describe the frame + * header and metadata blocks. + * + * The format structures here are very primitive, designed to store + * information in an efficient way. Reading information from the + * structures is easy but creating or modifying them directly is + * more complex. For the most part, as a user of a library, editing + * is not necessary; however, for metadata blocks it is, so there are + * convenience functions provided in the \link flac_metadata metadata + * module \endlink to simplify the manipulation of metadata blocks. + * + * \note + * It's not the best convention, but symbols ending in _LEN are in bits + * and _LENGTH are in bytes. _LENGTH symbols are \#defines instead of + * global variables because they are usually used when declaring byte + * arrays and some compilers require compile-time knowledge of array + * sizes when declared on the stack. + * + * \{ + */ + + +/* + Most of the values described in this file are defined by the FLAC + format specification. There is nothing to tune here. +*/ + +/** The largest legal metadata type code. */ +#define FLAC__MAX_METADATA_TYPE_CODE (126u) + +/** The minimum block size, in samples, permitted by the format. */ +#define FLAC__MIN_BLOCK_SIZE (16u) + +/** The maximum block size, in samples, permitted by the format. */ +#define FLAC__MAX_BLOCK_SIZE (65535u) + +/** The maximum block size, in samples, permitted by the FLAC subset for + * sample rates up to 48kHz. */ +#define FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ (4608u) + +/** The maximum number of channels permitted by the format. */ +#define FLAC__MAX_CHANNELS (8u) + +/** The minimum sample resolution permitted by the format. */ +#define FLAC__MIN_BITS_PER_SAMPLE (4u) + +/** The maximum sample resolution permitted by the format. */ +#define FLAC__MAX_BITS_PER_SAMPLE (32u) + +/** The maximum sample resolution permitted by libFLAC. + * + * \warning + * FLAC__MAX_BITS_PER_SAMPLE is the limit of the FLAC format. However, + * the reference encoder/decoder is currently limited to 24 bits because + * of prevalent 32-bit math, so make sure and use this value when + * appropriate. + */ +#define FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u) + +/** The maximum sample rate permitted by the format. The value is + * ((2 ^ 16) - 1) * 10; see FLAC format + * as to why. + */ +#define FLAC__MAX_SAMPLE_RATE (655350u) + +/** The maximum LPC order permitted by the format. */ +#define FLAC__MAX_LPC_ORDER (32u) + +/** The maximum LPC order permitted by the FLAC subset for sample rates + * up to 48kHz. */ +#define FLAC__SUBSET_MAX_LPC_ORDER_48000HZ (12u) + +/** The minimum quantized linear predictor coefficient precision + * permitted by the format. + */ +#define FLAC__MIN_QLP_COEFF_PRECISION (5u) + +/** The maximum quantized linear predictor coefficient precision + * permitted by the format. + */ +#define FLAC__MAX_QLP_COEFF_PRECISION (15u) + +/** The maximum order of the fixed predictors permitted by the format. */ +#define FLAC__MAX_FIXED_ORDER (4u) + +/** The maximum Rice partition order permitted by the format. */ +#define FLAC__MAX_RICE_PARTITION_ORDER (15u) + +/** The maximum Rice partition order permitted by the FLAC Subset. */ +#define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u) + +/** The version string of the release, stamped onto the libraries and binaries. + * + * \note + * This does not correspond to the shared library version number, which + * is used to determine binary compatibility. + */ +extern FLAC_API const char *FLAC__VERSION_STRING; + +/** The vendor string inserted by the encoder into the VORBIS_COMMENT block. + * This is a NUL-terminated ASCII string; when inserted into the + * VORBIS_COMMENT the trailing null is stripped. + */ +extern FLAC_API const char *FLAC__VENDOR_STRING; + +/** The byte string representation of the beginning of a FLAC stream. */ +extern FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4]; /* = "fLaC" */ + +/** The 32-bit integer big-endian representation of the beginning of + * a FLAC stream. + */ +extern FLAC_API const unsigned FLAC__STREAM_SYNC; /* = 0x664C6143 */ + +/** The length of the FLAC signature in bits. */ +extern FLAC_API const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */ + +/** The length of the FLAC signature in bytes. */ +#define FLAC__STREAM_SYNC_LENGTH (4u) + + +/***************************************************************************** + * + * Subframe structures + * + *****************************************************************************/ + +/*****************************************************************************/ + +/** An enumeration of the available entropy coding methods. */ +typedef enum { + FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0, + /**< Residual is coded by partitioning into contexts, each with it's own + * 4-bit Rice parameter. */ + + FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2 = 1 + /**< Residual is coded by partitioning into contexts, each with it's own + * 5-bit Rice parameter. */ +} FLAC__EntropyCodingMethodType; + +/** Maps a FLAC__EntropyCodingMethodType to a C string. + * + * Using a FLAC__EntropyCodingMethodType as the index to this array will + * give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__EntropyCodingMethodTypeString[]; + + +/** Contents of a Rice partitioned residual + */ +typedef struct { + + unsigned *parameters; + /**< The Rice parameters for each context. */ + + unsigned *raw_bits; + /**< Widths for escape-coded partitions. Will be non-zero for escaped + * partitions and zero for unescaped partitions. + */ + + unsigned capacity_by_order; + /**< The capacity of the \a parameters and \a raw_bits arrays + * specified as an order, i.e. the number of array elements + * allocated is 2 ^ \a capacity_by_order. + */ +} FLAC__EntropyCodingMethod_PartitionedRiceContents; + +/** Header for a Rice partitioned residual. (c.f. format specification) + */ +typedef struct { + + unsigned order; + /**< The partition order, i.e. # of contexts = 2 ^ \a order. */ + + const FLAC__EntropyCodingMethod_PartitionedRiceContents *contents; + /**< The context's Rice parameters and/or raw bits. */ + +} FLAC__EntropyCodingMethod_PartitionedRice; + +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN; /**< == 5 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN; /**< == 5 (bits) */ + +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER; +/**< == (1<format specification) + */ +typedef struct { + FLAC__EntropyCodingMethodType type; + union { + FLAC__EntropyCodingMethod_PartitionedRice partitioned_rice; + } data; +} FLAC__EntropyCodingMethod; + +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN; /**< == 2 (bits) */ + +/*****************************************************************************/ + +/** An enumeration of the available subframe types. */ +typedef enum { + FLAC__SUBFRAME_TYPE_CONSTANT = 0, /**< constant signal */ + FLAC__SUBFRAME_TYPE_VERBATIM = 1, /**< uncompressed signal */ + FLAC__SUBFRAME_TYPE_FIXED = 2, /**< fixed polynomial prediction */ + FLAC__SUBFRAME_TYPE_LPC = 3 /**< linear prediction */ +} FLAC__SubframeType; + +/** Maps a FLAC__SubframeType to a C string. + * + * Using a FLAC__SubframeType as the index to this array will + * give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__SubframeTypeString[]; + + +/** CONSTANT subframe. (c.f. format specification) + */ +typedef struct { + FLAC__int32 value; /**< The constant signal value. */ +} FLAC__Subframe_Constant; + + +/** VERBATIM subframe. (c.f. format specification) + */ +typedef struct { + const FLAC__int32 *data; /**< A pointer to verbatim signal. */ +} FLAC__Subframe_Verbatim; + + +/** FIXED subframe. (c.f. format specification) + */ +typedef struct { + FLAC__EntropyCodingMethod entropy_coding_method; + /**< The residual coding method. */ + + unsigned order; + /**< The polynomial order. */ + + FLAC__int32 warmup[FLAC__MAX_FIXED_ORDER]; + /**< Warmup samples to prime the predictor, length == order. */ + + const FLAC__int32 *residual; + /**< The residual signal, length == (blocksize minus order) samples. */ +} FLAC__Subframe_Fixed; + + +/** LPC subframe. (c.f. format specification) + */ +typedef struct { + FLAC__EntropyCodingMethod entropy_coding_method; + /**< The residual coding method. */ + + unsigned order; + /**< The FIR order. */ + + unsigned qlp_coeff_precision; + /**< Quantized FIR filter coefficient precision in bits. */ + + int quantization_level; + /**< The qlp coeff shift needed. */ + + FLAC__int32 qlp_coeff[FLAC__MAX_LPC_ORDER]; + /**< FIR filter coefficients. */ + + FLAC__int32 warmup[FLAC__MAX_LPC_ORDER]; + /**< Warmup samples to prime the predictor, length == order. */ + + const FLAC__int32 *residual; + /**< The residual signal, length == (blocksize minus order) samples. */ +} FLAC__Subframe_LPC; + +extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN; /**< == 5 (bits) */ + + +/** FLAC subframe structure. (c.f. format specification) + */ +typedef struct { + FLAC__SubframeType type; + union { + FLAC__Subframe_Constant constant; + FLAC__Subframe_Fixed fixed; + FLAC__Subframe_LPC lpc; + FLAC__Subframe_Verbatim verbatim; + } data; + unsigned wasted_bits; +} FLAC__Subframe; + +/** == 1 (bit) + * + * This used to be a zero-padding bit (hence the name + * FLAC__SUBFRAME_ZERO_PAD_LEN) but is now a reserved bit. It still has a + * mandatory value of \c 0 but in the future may take on the value \c 0 or \c 1 + * to mean something else. + */ +extern FLAC_API const unsigned FLAC__SUBFRAME_ZERO_PAD_LEN; +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LEN; /**< == 6 (bits) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN; /**< == 1 (bit) */ + +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK; /**< = 0x00 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK; /**< = 0x02 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK; /**< = 0x10 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK; /**< = 0x40 */ + +/*****************************************************************************/ + + +/***************************************************************************** + * + * Frame structures + * + *****************************************************************************/ + +/** An enumeration of the available channel assignments. */ +typedef enum { + FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT = 0, /**< independent channels */ + FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE = 1, /**< left+side stereo */ + FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE = 2, /**< right+side stereo */ + FLAC__CHANNEL_ASSIGNMENT_MID_SIDE = 3 /**< mid+side stereo */ +} FLAC__ChannelAssignment; + +/** Maps a FLAC__ChannelAssignment to a C string. + * + * Using a FLAC__ChannelAssignment as the index to this array will + * give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__ChannelAssignmentString[]; + +/** An enumeration of the possible frame numbering methods. */ +typedef enum { + FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER, /**< number contains the frame number */ + FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER /**< number contains the sample number of first sample in frame */ +} FLAC__FrameNumberType; + +/** Maps a FLAC__FrameNumberType to a C string. + * + * Using a FLAC__FrameNumberType as the index to this array will + * give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__FrameNumberTypeString[]; + + +/** FLAC frame header structure. (c.f. format specification) + */ +typedef struct { + unsigned blocksize; + /**< The number of samples per subframe. */ + + unsigned sample_rate; + /**< The sample rate in Hz. */ + + unsigned channels; + /**< The number of channels (== number of subframes). */ + + FLAC__ChannelAssignment channel_assignment; + /**< The channel assignment for the frame. */ + + unsigned bits_per_sample; + /**< The sample resolution. */ + + FLAC__FrameNumberType number_type; + /**< The numbering scheme used for the frame. As a convenience, the + * decoder will always convert a frame number to a sample number because + * the rules are complex. */ + + union { + FLAC__uint32 frame_number; + FLAC__uint64 sample_number; + } number; + /**< The frame number or sample number of first sample in frame; + * use the \a number_type value to determine which to use. */ + + FLAC__uint8 crc; + /**< CRC-8 (polynomial = x^8 + x^2 + x^1 + x^0, initialized with 0) + * of the raw frame header bytes, meaning everything before the CRC byte + * including the sync code. + */ +} FLAC__FrameHeader; + +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC; /**< == 0x3ffe; the frame header sync code */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC_LEN; /**< == 14 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_RESERVED_LEN; /**< == 1 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN; /**< == 1 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN; /**< == 3 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_CRC_LEN; /**< == 8 (bits) */ + + +/** FLAC frame footer structure. (c.f. format specification) + */ +typedef struct { + FLAC__uint16 crc; + /**< CRC-16 (polynomial = x^16 + x^15 + x^2 + x^0, initialized with + * 0) of the bytes before the crc, back to and including the frame header + * sync code. + */ +} FLAC__FrameFooter; + +extern FLAC_API const unsigned FLAC__FRAME_FOOTER_CRC_LEN; /**< == 16 (bits) */ + + +/** FLAC frame structure. (c.f. format specification) + */ +typedef struct { + FLAC__FrameHeader header; + FLAC__Subframe subframes[FLAC__MAX_CHANNELS]; + FLAC__FrameFooter footer; +} FLAC__Frame; + +/*****************************************************************************/ + + +/***************************************************************************** + * + * Meta-data structures + * + *****************************************************************************/ + +/** An enumeration of the available metadata block types. */ +typedef enum { + + FLAC__METADATA_TYPE_STREAMINFO = 0, + /**< STREAMINFO block */ + + FLAC__METADATA_TYPE_PADDING = 1, + /**< PADDING block */ + + FLAC__METADATA_TYPE_APPLICATION = 2, + /**< APPLICATION block */ + + FLAC__METADATA_TYPE_SEEKTABLE = 3, + /**< SEEKTABLE block */ + + FLAC__METADATA_TYPE_VORBIS_COMMENT = 4, + /**< VORBISCOMMENT block (a.k.a. FLAC tags) */ + + FLAC__METADATA_TYPE_CUESHEET = 5, + /**< CUESHEET block */ + + FLAC__METADATA_TYPE_PICTURE = 6, + /**< PICTURE block */ + + FLAC__METADATA_TYPE_UNDEFINED = 7 + /**< marker to denote beginning of undefined type range; this number will increase as new metadata types are added */ + +} FLAC__MetadataType; + +/** Maps a FLAC__MetadataType to a C string. + * + * Using a FLAC__MetadataType as the index to this array will + * give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__MetadataTypeString[]; + + +/** FLAC STREAMINFO structure. (c.f. format specification) + */ +typedef struct { + unsigned min_blocksize, max_blocksize; + unsigned min_framesize, max_framesize; + unsigned sample_rate; + unsigned channels; + unsigned bits_per_sample; + FLAC__uint64 total_samples; + FLAC__byte md5sum[16]; +} FLAC__StreamMetadata_StreamInfo; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN; /**< == 24 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN; /**< == 24 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN; /**< == 20 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN; /**< == 3 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN; /**< == 5 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN; /**< == 36 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN; /**< == 128 (bits) */ + +/** The total stream length of the STREAMINFO block in bytes. */ +#define FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u) + +/** FLAC PADDING structure. (c.f. format specification) + */ +typedef struct { + int dummy; + /**< Conceptually this is an empty struct since we don't store the + * padding bytes. Empty structs are not allowed by some C compilers, + * hence the dummy. + */ +} FLAC__StreamMetadata_Padding; + + +/** FLAC APPLICATION structure. (c.f. format specification) + */ +typedef struct { + FLAC__byte id[4]; + FLAC__byte *data; +} FLAC__StreamMetadata_Application; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN; /**< == 32 (bits) */ + +/** SeekPoint structure used in SEEKTABLE blocks. (c.f. format specification) + */ +typedef struct { + FLAC__uint64 sample_number; + /**< The sample number of the target frame. */ + + FLAC__uint64 stream_offset; + /**< The offset, in bytes, of the target frame with respect to + * beginning of the first frame. */ + + unsigned frame_samples; + /**< The number of samples in the target frame. */ +} FLAC__StreamMetadata_SeekPoint; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN; /**< == 16 (bits) */ + +/** The total stream length of a seek point in bytes. */ +#define FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u) + +/** The value used in the \a sample_number field of + * FLAC__StreamMetadataSeekPoint used to indicate a placeholder + * point (== 0xffffffffffffffff). + */ +extern FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; + + +/** FLAC SEEKTABLE structure. (c.f. format specification) + * + * \note From the format specification: + * - The seek points must be sorted by ascending sample number. + * - Each seek point's sample number must be the first sample of the + * target frame. + * - Each seek point's sample number must be unique within the table. + * - Existence of a SEEKTABLE block implies a correct setting of + * total_samples in the stream_info block. + * - Behavior is undefined when more than one SEEKTABLE block is + * present in a stream. + */ +typedef struct { + unsigned num_points; + FLAC__StreamMetadata_SeekPoint *points; +} FLAC__StreamMetadata_SeekTable; + + +/** Vorbis comment entry structure used in VORBIS_COMMENT blocks. (c.f. format specification) + * + * For convenience, the APIs maintain a trailing NUL character at the end of + * \a entry which is not counted toward \a length, i.e. + * \code strlen(entry) == length \endcode + */ +typedef struct { + FLAC__uint32 length; + FLAC__byte *entry; +} FLAC__StreamMetadata_VorbisComment_Entry; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN; /**< == 32 (bits) */ + + +/** FLAC VORBIS_COMMENT structure. (c.f. format specification) + */ +typedef struct { + FLAC__StreamMetadata_VorbisComment_Entry vendor_string; + FLAC__uint32 num_comments; + FLAC__StreamMetadata_VorbisComment_Entry *comments; +} FLAC__StreamMetadata_VorbisComment; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN; /**< == 32 (bits) */ + + +/** FLAC CUESHEET track index structure. (See the + * format specification for + * the full description of each field.) + */ +typedef struct { + FLAC__uint64 offset; + /**< Offset in samples, relative to the track offset, of the index + * point. + */ + + FLAC__byte number; + /**< The index point number. */ +} FLAC__StreamMetadata_CueSheet_Index; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN; /**< == 8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN; /**< == 3*8 (bits) */ + + +/** FLAC CUESHEET track structure. (See the + * format specification for + * the full description of each field.) + */ +typedef struct { + FLAC__uint64 offset; + /**< Track offset in samples, relative to the beginning of the FLAC audio stream. */ + + FLAC__byte number; + /**< The track number. */ + + char isrc[13]; + /**< Track ISRC. This is a 12-digit alphanumeric code plus a trailing \c NUL byte */ + + unsigned type:1; + /**< The track type: 0 for audio, 1 for non-audio. */ + + unsigned pre_emphasis:1; + /**< The pre-emphasis flag: 0 for no pre-emphasis, 1 for pre-emphasis. */ + + FLAC__byte num_indices; + /**< The number of track index points. */ + + FLAC__StreamMetadata_CueSheet_Index *indices; + /**< NULL if num_indices == 0, else pointer to array of index points. */ + +} FLAC__StreamMetadata_CueSheet_Track; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN; /**< == 8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN; /**< == 12*8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN; /**< == 6+13*8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN; /**< == 8 (bits) */ + + +/** FLAC CUESHEET structure. (See the + * format specification + * for the full description of each field.) + */ +typedef struct { + char media_catalog_number[129]; + /**< Media catalog number, in ASCII printable characters 0x20-0x7e. In + * general, the media catalog number may be 0 to 128 bytes long; any + * unused characters should be right-padded with NUL characters. + */ + + FLAC__uint64 lead_in; + /**< The number of lead-in samples. */ + + FLAC__bool is_cd; + /**< \c true if CUESHEET corresponds to a Compact Disc, else \c false. */ + + unsigned num_tracks; + /**< The number of tracks. */ + + FLAC__StreamMetadata_CueSheet_Track *tracks; + /**< NULL if num_tracks == 0, else pointer to array of tracks. */ + +} FLAC__StreamMetadata_CueSheet; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN; /**< == 128*8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN; /**< == 7+258*8 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN; /**< == 8 (bits) */ + + +/** An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag). */ +typedef enum { + FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER = 0, /**< Other */ + FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD = 1, /**< 32x32 pixels 'file icon' (PNG only) */ + FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON = 2, /**< Other file icon */ + FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER = 3, /**< Cover (front) */ + FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER = 4, /**< Cover (back) */ + FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE = 5, /**< Leaflet page */ + FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA = 6, /**< Media (e.g. label side of CD) */ + FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST = 7, /**< Lead artist/lead performer/soloist */ + FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST = 8, /**< Artist/performer */ + FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR = 9, /**< Conductor */ + FLAC__STREAM_METADATA_PICTURE_TYPE_BAND = 10, /**< Band/Orchestra */ + FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER = 11, /**< Composer */ + FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST = 12, /**< Lyricist/text writer */ + FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION = 13, /**< Recording Location */ + FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING = 14, /**< During recording */ + FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE = 15, /**< During performance */ + FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE = 16, /**< Movie/video screen capture */ + FLAC__STREAM_METADATA_PICTURE_TYPE_FISH = 17, /**< A bright coloured fish */ + FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION = 18, /**< Illustration */ + FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE = 19, /**< Band/artist logotype */ + FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE = 20, /**< Publisher/Studio logotype */ + FLAC__STREAM_METADATA_PICTURE_TYPE_UNDEFINED +} FLAC__StreamMetadata_Picture_Type; + +/** Maps a FLAC__StreamMetadata_Picture_Type to a C string. + * + * Using a FLAC__StreamMetadata_Picture_Type as the index to this array + * will give the string equivalent. The contents should not be + * modified. + */ +extern FLAC_API const char * const FLAC__StreamMetadata_Picture_TypeString[]; + +/** FLAC PICTURE structure. (See the + * format specification + * for the full description of each field.) + */ +typedef struct { + FLAC__StreamMetadata_Picture_Type type; + /**< The kind of picture stored. */ + + char *mime_type; + /**< Picture data's MIME type, in ASCII printable characters + * 0x20-0x7e, NUL terminated. For best compatibility with players, + * use picture data of MIME type \c image/jpeg or \c image/png. A + * MIME type of '-->' is also allowed, in which case the picture + * data should be a complete URL. In file storage, the MIME type is + * stored as a 32-bit length followed by the ASCII string with no NUL + * terminator, but is converted to a plain C string in this structure + * for convenience. + */ + + FLAC__byte *description; + /**< Picture's description in UTF-8, NUL terminated. In file storage, + * the description is stored as a 32-bit length followed by the UTF-8 + * string with no NUL terminator, but is converted to a plain C string + * in this structure for convenience. + */ + + FLAC__uint32 width; + /**< Picture's width in pixels. */ + + FLAC__uint32 height; + /**< Picture's height in pixels. */ + + FLAC__uint32 depth; + /**< Picture's color depth in bits-per-pixel. */ + + FLAC__uint32 colors; + /**< For indexed palettes (like GIF), picture's number of colors (the + * number of palette entries), or \c 0 for non-indexed (i.e. 2^depth). + */ + + FLAC__uint32 data_length; + /**< Length of binary picture data in bytes. */ + + FLAC__byte *data; + /**< Binary picture data. */ + +} FLAC__StreamMetadata_Picture; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_TYPE_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_COLORS_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN; /**< == 32 (bits) */ + + +/** Structure that is used when a metadata block of unknown type is loaded. + * The contents are opaque. The structure is used only internally to + * correctly handle unknown metadata. + */ +typedef struct { + FLAC__byte *data; +} FLAC__StreamMetadata_Unknown; + + +/** FLAC metadata block structure. (c.f. format specification) + */ +typedef struct { + FLAC__MetadataType type; + /**< The type of the metadata block; used determine which member of the + * \a data union to dereference. If type >= FLAC__METADATA_TYPE_UNDEFINED + * then \a data.unknown must be used. */ + + FLAC__bool is_last; + /**< \c true if this metadata block is the last, else \a false */ + + unsigned length; + /**< Length, in bytes, of the block data as it appears in the stream. */ + + union { + FLAC__StreamMetadata_StreamInfo stream_info; + FLAC__StreamMetadata_Padding padding; + FLAC__StreamMetadata_Application application; + FLAC__StreamMetadata_SeekTable seek_table; + FLAC__StreamMetadata_VorbisComment vorbis_comment; + FLAC__StreamMetadata_CueSheet cue_sheet; + FLAC__StreamMetadata_Picture picture; + FLAC__StreamMetadata_Unknown unknown; + } data; + /**< Polymorphic block data; use the \a type value to determine which + * to use. */ +} FLAC__StreamMetadata; + +extern FLAC_API const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_TYPE_LEN; /**< == 7 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bits) */ + +/** The total stream length of a metadata block header in bytes. */ +#define FLAC__STREAM_METADATA_HEADER_LENGTH (4u) + +/*****************************************************************************/ + + +/***************************************************************************** + * + * Utility functions + * + *****************************************************************************/ + +/** Tests that a sample rate is valid for FLAC. + * + * \param sample_rate The sample rate to test for compliance. + * \retval FLAC__bool + * \c true if the given sample rate conforms to the specification, else + * \c false. + */ +FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate); + +/** Tests that a sample rate is valid for the FLAC subset. The subset rules + * for valid sample rates are slightly more complex since the rate has to + * be expressible completely in the frame header. + * + * \param sample_rate The sample rate to test for compliance. + * \retval FLAC__bool + * \c true if the given sample rate conforms to the specification for the + * subset, else \c false. + */ +FLAC_API FLAC__bool FLAC__format_sample_rate_is_subset(unsigned sample_rate); + +/** Check a Vorbis comment entry name to see if it conforms to the Vorbis + * comment specification. + * + * Vorbis comment names must be composed only of characters from + * [0x20-0x3C,0x3E-0x7D]. + * + * \param name A NUL-terminated string to be checked. + * \assert + * \code name != NULL \endcode + * \retval FLAC__bool + * \c false if entry name is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_name_is_legal(const char *name); + +/** Check a Vorbis comment entry value to see if it conforms to the Vorbis + * comment specification. + * + * Vorbis comment values must be valid UTF-8 sequences. + * + * \param value A string to be checked. + * \param length A the length of \a value in bytes. May be + * \c (unsigned)(-1) to indicate that \a value is a plain + * UTF-8 NUL-terminated string. + * \assert + * \code value != NULL \endcode + * \retval FLAC__bool + * \c false if entry name is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_value_is_legal(const FLAC__byte *value, unsigned length); + +/** Check a Vorbis comment entry to see if it conforms to the Vorbis + * comment specification. + * + * Vorbis comment entries must be of the form 'name=value', and 'name' and + * 'value' must be legal according to + * FLAC__format_vorbiscomment_entry_name_is_legal() and + * FLAC__format_vorbiscomment_entry_value_is_legal() respectively. + * + * \param entry An entry to be checked. + * \param length The length of \a entry in bytes. + * \assert + * \code value != NULL \endcode + * \retval FLAC__bool + * \c false if entry name is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_is_legal(const FLAC__byte *entry, unsigned length); + +/** Check a seek table to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * seek table. + * + * \param seek_table A pointer to a seek table to be checked. + * \assert + * \code seek_table != NULL \endcode + * \retval FLAC__bool + * \c false if seek table is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table); + +/** Sort a seek table's seek points according to the format specification. + * This includes a "unique-ification" step to remove duplicates, i.e. + * seek points with identical \a sample_number values. Duplicate seek + * points are converted into placeholder points and sorted to the end of + * the table. + * + * \param seek_table A pointer to a seek table to be sorted. + * \assert + * \code seek_table != NULL \endcode + * \retval unsigned + * The number of duplicate seek points converted into placeholders. + */ +FLAC_API unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table); + +/** Check a cue sheet to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * cue sheet. + * + * \param cue_sheet A pointer to an existing cue sheet to be checked. + * \param check_cd_da_subset If \c true, check CUESHEET against more + * stringent requirements for a CD-DA (audio) disc. + * \param violation Address of a pointer to a string. If there is a + * violation, a pointer to a string explanation of the + * violation will be returned here. \a violation may be + * \c NULL if you don't need the returned string. Do not + * free the returned string; it will always point to static + * data. + * \assert + * \code cue_sheet != NULL \endcode + * \retval FLAC__bool + * \c false if cue sheet is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_CueSheet *cue_sheet, FLAC__bool check_cd_da_subset, const char **violation); + +/** Check picture data to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * PICTURE block. + * + * \param picture A pointer to existing picture data to be checked. + * \param violation Address of a pointer to a string. If there is a + * violation, a pointer to a string explanation of the + * violation will be returned here. \a violation may be + * \c NULL if you don't need the returned string. Do not + * free the returned string; it will always point to static + * data. + * \assert + * \code picture != NULL \endcode + * \retval FLAC__bool + * \c false if picture data is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__format_picture_is_legal(const FLAC__StreamMetadata_Picture *picture, const char **violation); + +/* \} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/metadata.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/metadata.h new file mode 100644 index 0000000..fff90b0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/metadata.h @@ -0,0 +1,2181 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__METADATA_H +#define FLAC__METADATA_H + +#include /* for off_t */ +#include "export.h" +#include "callback.h" +#include "format.h" + +/* -------------------------------------------------------------------- + (For an example of how all these routines are used, see the source + code for the unit tests in src/test_libFLAC/metadata_*.c, or + metaflac in src/metaflac/) + ------------------------------------------------------------------*/ + +/** \file include/FLAC/metadata.h + * + * \brief + * This module provides functions for creating and manipulating FLAC + * metadata blocks in memory, and three progressively more powerful + * interfaces for traversing and editing metadata in FLAC files. + * + * See the detailed documentation for each interface in the + * \link flac_metadata metadata \endlink module. + */ + +/** \defgroup flac_metadata FLAC/metadata.h: metadata interfaces + * \ingroup flac + * + * \brief + * This module provides functions for creating and manipulating FLAC + * metadata blocks in memory, and three progressively more powerful + * interfaces for traversing and editing metadata in native FLAC files. + * Note that currently only the Chain interface (level 2) supports Ogg + * FLAC files, and it is read-only i.e. no writing back changed + * metadata to file. + * + * There are three metadata interfaces of increasing complexity: + * + * Level 0: + * Read-only access to the STREAMINFO, VORBIS_COMMENT, CUESHEET, and + * PICTURE blocks. + * + * Level 1: + * Read-write access to all metadata blocks. This level is write- + * efficient in most cases (more on this below), and uses less memory + * than level 2. + * + * Level 2: + * Read-write access to all metadata blocks. This level is write- + * efficient in all cases, but uses more memory since all metadata for + * the whole file is read into memory and manipulated before writing + * out again. + * + * What do we mean by efficient? Since FLAC metadata appears at the + * beginning of the file, when writing metadata back to a FLAC file + * it is possible to grow or shrink the metadata such that the entire + * file must be rewritten. However, if the size remains the same during + * changes or PADDING blocks are utilized, only the metadata needs to be + * overwritten, which is much faster. + * + * Efficient means the whole file is rewritten at most one time, and only + * when necessary. Level 1 is not efficient only in the case that you + * cause more than one metadata block to grow or shrink beyond what can + * be accomodated by padding. In this case you should probably use level + * 2, which allows you to edit all the metadata for a file in memory and + * write it out all at once. + * + * All levels know how to skip over and not disturb an ID3v2 tag at the + * front of the file. + * + * All levels access files via their filenames. In addition, level 2 + * has additional alternative read and write functions that take an I/O + * handle and callbacks, for situations where access by filename is not + * possible. + * + * In addition to the three interfaces, this module defines functions for + * creating and manipulating various metadata objects in memory. As we see + * from the Format module, FLAC metadata blocks in memory are very primitive + * structures for storing information in an efficient way. Reading + * information from the structures is easy but creating or modifying them + * directly is more complex. The metadata object routines here facilitate + * this by taking care of the consistency and memory management drudgery. + * + * Unless you will be using the level 1 or 2 interfaces to modify existing + * metadata however, you will not probably not need these. + * + * From a dependency standpoint, none of the encoders or decoders require + * the metadata module. This is so that embedded users can strip out the + * metadata module from libFLAC to reduce the size and complexity. + */ + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \defgroup flac_metadata_level0 FLAC/metadata.h: metadata level 0 interface + * \ingroup flac_metadata + * + * \brief + * The level 0 interface consists of individual routines to read the + * STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring + * only a filename. + * + * They try to skip any ID3v2 tag at the head of the file. + * + * \{ + */ + +/** Read the STREAMINFO metadata block of the given FLAC file. This function + * will try to skip any ID3v2 tag at the head of the file. + * + * \param filename The path to the FLAC file to read. + * \param streaminfo A pointer to space for the STREAMINFO block. Since + * FLAC__StreamMetadata is a simple structure with no + * memory allocation involved, you pass the address of + * an existing structure. It need not be initialized. + * \assert + * \code filename != NULL \endcode + * \code streaminfo != NULL \endcode + * \retval FLAC__bool + * \c true if a valid STREAMINFO block was read from \a filename. Returns + * \c false if there was a memory allocation error, a file decoder error, + * or the file contained no STREAMINFO block. (A memory allocation error + * is possible because this function must set up a file decoder.) + */ +FLAC_API FLAC__bool FLAC__metadata_get_streaminfo(const char *filename, FLAC__StreamMetadata *streaminfo); + +/** Read the VORBIS_COMMENT metadata block of the given FLAC file. This + * function will try to skip any ID3v2 tag at the head of the file. + * + * \param filename The path to the FLAC file to read. + * \param tags The address where the returned pointer will be + * stored. The \a tags object must be deleted by + * the caller using FLAC__metadata_object_delete(). + * \assert + * \code filename != NULL \endcode + * \code tags != NULL \endcode + * \retval FLAC__bool + * \c true if a valid VORBIS_COMMENT block was read from \a filename, + * and \a *tags will be set to the address of the metadata structure. + * Returns \c false if there was a memory allocation error, a file + * decoder error, or the file contained no VORBIS_COMMENT block, and + * \a *tags will be set to \c NULL. + */ +FLAC_API FLAC__bool FLAC__metadata_get_tags(const char *filename, FLAC__StreamMetadata **tags); + +/** Read the CUESHEET metadata block of the given FLAC file. This + * function will try to skip any ID3v2 tag at the head of the file. + * + * \param filename The path to the FLAC file to read. + * \param cuesheet The address where the returned pointer will be + * stored. The \a cuesheet object must be deleted by + * the caller using FLAC__metadata_object_delete(). + * \assert + * \code filename != NULL \endcode + * \code cuesheet != NULL \endcode + * \retval FLAC__bool + * \c true if a valid CUESHEET block was read from \a filename, + * and \a *cuesheet will be set to the address of the metadata + * structure. Returns \c false if there was a memory allocation + * error, a file decoder error, or the file contained no CUESHEET + * block, and \a *cuesheet will be set to \c NULL. + */ +FLAC_API FLAC__bool FLAC__metadata_get_cuesheet(const char *filename, FLAC__StreamMetadata **cuesheet); + +/** Read a PICTURE metadata block of the given FLAC file. This + * function will try to skip any ID3v2 tag at the head of the file. + * Since there can be more than one PICTURE block in a file, this + * function takes a number of parameters that act as constraints to + * the search. The PICTURE block with the largest area matching all + * the constraints will be returned, or \a *picture will be set to + * \c NULL if there was no such block. + * + * \param filename The path to the FLAC file to read. + * \param picture The address where the returned pointer will be + * stored. The \a picture object must be deleted by + * the caller using FLAC__metadata_object_delete(). + * \param type The desired picture type. Use \c -1 to mean + * "any type". + * \param mime_type The desired MIME type, e.g. "image/jpeg". The + * string will be matched exactly. Use \c NULL to + * mean "any MIME type". + * \param description The desired description. The string will be + * matched exactly. Use \c NULL to mean "any + * description". + * \param max_width The maximum width in pixels desired. Use + * \c (unsigned)(-1) to mean "any width". + * \param max_height The maximum height in pixels desired. Use + * \c (unsigned)(-1) to mean "any height". + * \param max_depth The maximum color depth in bits-per-pixel desired. + * Use \c (unsigned)(-1) to mean "any depth". + * \param max_colors The maximum number of colors desired. Use + * \c (unsigned)(-1) to mean "any number of colors". + * \assert + * \code filename != NULL \endcode + * \code picture != NULL \endcode + * \retval FLAC__bool + * \c true if a valid PICTURE block was read from \a filename, + * and \a *picture will be set to the address of the metadata + * structure. Returns \c false if there was a memory allocation + * error, a file decoder error, or the file contained no PICTURE + * block, and \a *picture will be set to \c NULL. + */ +FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors); + +/* \} */ + + +/** \defgroup flac_metadata_level1 FLAC/metadata.h: metadata level 1 interface + * \ingroup flac_metadata + * + * \brief + * The level 1 interface provides read-write access to FLAC file metadata and + * operates directly on the FLAC file. + * + * The general usage of this interface is: + * + * - Create an iterator using FLAC__metadata_simple_iterator_new() + * - Attach it to a file using FLAC__metadata_simple_iterator_init() and check + * the exit code. Call FLAC__metadata_simple_iterator_is_writable() to + * see if the file is writable, or only read access is allowed. + * - Use FLAC__metadata_simple_iterator_next() and + * FLAC__metadata_simple_iterator_prev() to traverse the blocks. + * This is does not read the actual blocks themselves. + * FLAC__metadata_simple_iterator_next() is relatively fast. + * FLAC__metadata_simple_iterator_prev() is slower since it needs to search + * forward from the front of the file. + * - Use FLAC__metadata_simple_iterator_get_block_type() or + * FLAC__metadata_simple_iterator_get_block() to access the actual data at + * the current iterator position. The returned object is yours to modify + * and free. + * - Use FLAC__metadata_simple_iterator_set_block() to write a modified block + * back. You must have write permission to the original file. Make sure to + * read the whole comment to FLAC__metadata_simple_iterator_set_block() + * below. + * - Use FLAC__metadata_simple_iterator_insert_block_after() to add new blocks. + * Use the object creation functions from + * \link flac_metadata_object here \endlink to generate new objects. + * - Use FLAC__metadata_simple_iterator_delete_block() to remove the block + * currently referred to by the iterator, or replace it with padding. + * - Destroy the iterator with FLAC__metadata_simple_iterator_delete() when + * finished. + * + * \note + * The FLAC file remains open the whole time between + * FLAC__metadata_simple_iterator_init() and + * FLAC__metadata_simple_iterator_delete(), so make sure you are not altering + * the file during this time. + * + * \note + * Do not modify the \a is_last, \a length, or \a type fields of returned + * FLAC__StreamMetadata objects. These are managed automatically. + * + * \note + * If any of the modification functions + * (FLAC__metadata_simple_iterator_set_block(), + * FLAC__metadata_simple_iterator_delete_block(), + * FLAC__metadata_simple_iterator_insert_block_after(), etc.) return \c false, + * you should delete the iterator as it may no longer be valid. + * + * \{ + */ + +struct FLAC__Metadata_SimpleIterator; +/** The opaque structure definition for the level 1 iterator type. + * See the + * \link flac_metadata_level1 metadata level 1 module \endlink + * for a detailed description. + */ +typedef struct FLAC__Metadata_SimpleIterator FLAC__Metadata_SimpleIterator; + +/** Status type for FLAC__Metadata_SimpleIterator. + * + * The iterator's current status can be obtained by calling FLAC__metadata_simple_iterator_status(). + */ +typedef enum { + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK = 0, + /**< The iterator is in the normal OK state */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT, + /**< The data passed into a function violated the function's usage criteria */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE, + /**< The iterator could not open the target file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE, + /**< The iterator could not find the FLAC signature at the start of the file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE, + /**< The iterator tried to write to a file that was not writable */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA, + /**< The iterator encountered input that does not conform to the FLAC metadata specification */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR, + /**< The iterator encountered an error while reading the FLAC file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR, + /**< The iterator encountered an error while seeking in the FLAC file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR, + /**< The iterator encountered an error while writing the FLAC file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR, + /**< The iterator encountered an error renaming the FLAC file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR, + /**< The iterator encountered an error removing the temporary file */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR, + /**< Memory allocation failed */ + + FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR + /**< The caller violated an assertion or an unexpected error occurred */ + +} FLAC__Metadata_SimpleIteratorStatus; + +/** Maps a FLAC__Metadata_SimpleIteratorStatus to a C string. + * + * Using a FLAC__Metadata_SimpleIteratorStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__Metadata_SimpleIteratorStatusString[]; + + +/** Create a new iterator instance. + * + * \retval FLAC__Metadata_SimpleIterator* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void); + +/** Free an iterator instance. Deletes the object pointed to by \a iterator. + * + * \param iterator A pointer to an existing iterator. + * \assert + * \code iterator != NULL \endcode + */ +FLAC_API void FLAC__metadata_simple_iterator_delete(FLAC__Metadata_SimpleIterator *iterator); + +/** Get the current status of the iterator. Call this after a function + * returns \c false to get the reason for the error. Also resets the status + * to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK. + * + * \param iterator A pointer to an existing iterator. + * \assert + * \code iterator != NULL \endcode + * \retval FLAC__Metadata_SimpleIteratorStatus + * The current status of the iterator. + */ +FLAC_API FLAC__Metadata_SimpleIteratorStatus FLAC__metadata_simple_iterator_status(FLAC__Metadata_SimpleIterator *iterator); + +/** Initialize the iterator to point to the first metadata block in the + * given FLAC file. + * + * \param iterator A pointer to an existing iterator. + * \param filename The path to the FLAC file. + * \param read_only If \c true, the FLAC file will be opened + * in read-only mode; if \c false, the FLAC + * file will be opened for edit even if no + * edits are performed. + * \param preserve_file_stats If \c true, the owner and modification + * time will be preserved even if the FLAC + * file is written to. + * \assert + * \code iterator != NULL \endcode + * \code filename != NULL \endcode + * \retval FLAC__bool + * \c false if a memory allocation error occurs, the file can't be + * opened, or another error occurs, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats); + +/** Returns \c true if the FLAC file is writable. If \c false, calls to + * FLAC__metadata_simple_iterator_set_block() and + * FLAC__metadata_simple_iterator_insert_block_after() will fail. + * + * \param iterator A pointer to an existing iterator. + * \assert + * \code iterator != NULL \endcode + * \retval FLAC__bool + * See above. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_SimpleIterator *iterator); + +/** Moves the iterator forward one metadata block, returning \c false if + * already at the end. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__bool + * \c false if already at the last metadata block of the chain, else + * \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator); + +/** Moves the iterator backward one metadata block, returning \c false if + * already at the beginning. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__bool + * \c false if already at the first metadata block of the chain, else + * \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator); + +/** Returns a flag telling if the current metadata block is the last. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__bool + * \c true if the current metadata block is the last in the file, + * else \c false. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_last(const FLAC__Metadata_SimpleIterator *iterator); + +/** Get the offset of the metadata block at the current position. This + * avoids reading the actual block data which can save time for large + * blocks. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval off_t + * The offset of the metadata block at the current iterator position. + * This is the byte offset relative to the beginning of the file of + * the current metadata block's header. + */ +FLAC_API off_t FLAC__metadata_simple_iterator_get_block_offset(const FLAC__Metadata_SimpleIterator *iterator); + +/** Get the type of the metadata block at the current position. This + * avoids reading the actual block data which can save time for large + * blocks. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__MetadataType + * The type of the metadata block at the current iterator position. + */ +FLAC_API FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Metadata_SimpleIterator *iterator); + +/** Get the length of the metadata block at the current position. This + * avoids reading the actual block data which can save time for large + * blocks. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval unsigned + * The length of the metadata block at the current iterator position. + * The is same length as that in the + * metadata block header, + * i.e. the length of the metadata body that follows the header. + */ +FLAC_API unsigned FLAC__metadata_simple_iterator_get_block_length(const FLAC__Metadata_SimpleIterator *iterator); + +/** Get the application ID of the \c APPLICATION block at the current + * position. This avoids reading the actual block data which can save + * time for large blocks. + * + * \param iterator A pointer to an existing initialized iterator. + * \param id A pointer to a buffer of at least \c 4 bytes where + * the ID will be stored. + * \assert + * \code iterator != NULL \endcode + * \code id != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__bool + * \c true if the ID was successfully read, else \c false, in which + * case you should check FLAC__metadata_simple_iterator_status() to + * find out why. If the status is + * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT, then the + * current metadata block is not an \c APPLICATION block. Otherwise + * if the status is + * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR or + * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR, an I/O error + * occurred and the iterator can no longer be used. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_get_application_id(FLAC__Metadata_SimpleIterator *iterator, FLAC__byte *id); + +/** Get the metadata block at the current position. You can modify the + * block but must use FLAC__metadata_simple_iterator_set_block() to + * write it back to the FLAC file. + * + * You must call FLAC__metadata_object_delete() on the returned object + * when you are finished with it. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__StreamMetadata* + * The current metadata block, or \c NULL if there was a memory + * allocation error. + */ +FLAC_API FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_SimpleIterator *iterator); + +/** Write a block back to the FLAC file. This function tries to be + * as efficient as possible; how the block is actually written is + * shown by the following: + * + * Existing block is a STREAMINFO block and the new block is a + * STREAMINFO block: the new block is written in place. Make sure + * you know what you're doing when changing the values of a + * STREAMINFO block. + * + * Existing block is a STREAMINFO block and the new block is a + * not a STREAMINFO block: this is an error since the first block + * must be a STREAMINFO block. Returns \c false without altering the + * file. + * + * Existing block is not a STREAMINFO block and the new block is a + * STREAMINFO block: this is an error since there may be only one + * STREAMINFO block. Returns \c false without altering the file. + * + * Existing block and new block are the same length: the existing + * block will be replaced by the new block, written in place. + * + * Existing block is longer than new block: if use_padding is \c true, + * the existing block will be overwritten in place with the new + * block followed by a PADDING block, if possible, to make the total + * size the same as the existing block. Remember that a padding + * block requires at least four bytes so if the difference in size + * between the new block and existing block is less than that, the + * entire file will have to be rewritten, using the new block's + * exact size. If use_padding is \c false, the entire file will be + * rewritten, replacing the existing block by the new block. + * + * Existing block is shorter than new block: if use_padding is \c true, + * the function will try and expand the new block into the following + * PADDING block, if it exists and doing so won't shrink the PADDING + * block to less than 4 bytes. If there is no following PADDING + * block, or it will shrink to less than 4 bytes, or use_padding is + * \c false, the entire file is rewritten, replacing the existing block + * with the new block. Note that in this case any following PADDING + * block is preserved as is. + * + * After writing the block, the iterator will remain in the same + * place, i.e. pointing to the new block. + * + * \param iterator A pointer to an existing initialized iterator. + * \param block The block to set. + * \param use_padding See above. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \code block != NULL \endcode + * \retval FLAC__bool + * \c true if successful, else \c false. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_set_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding); + +/** This is similar to FLAC__metadata_simple_iterator_set_block() + * except that instead of writing over an existing block, it appends + * a block after the existing block. \a use_padding is again used to + * tell the function to try an expand into following padding in an + * attempt to avoid rewriting the entire file. + * + * This function will fail and return \c false if given a STREAMINFO + * block. + * + * After writing the block, the iterator will be pointing to the + * new block. + * + * \param iterator A pointer to an existing initialized iterator. + * \param block The block to set. + * \param use_padding See above. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \code block != NULL \endcode + * \retval FLAC__bool + * \c true if successful, else \c false. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding); + +/** Deletes the block at the current position. This will cause the + * entire FLAC file to be rewritten, unless \a use_padding is \c true, + * in which case the block will be replaced by an equal-sized PADDING + * block. The iterator will be left pointing to the block before the + * one just deleted. + * + * You may not delete the STREAMINFO block. + * + * \param iterator A pointer to an existing initialized iterator. + * \param use_padding See above. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_simple_iterator_init() + * \retval FLAC__bool + * \c true if successful, else \c false. + */ +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_delete_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__bool use_padding); + +/* \} */ + + +/** \defgroup flac_metadata_level2 FLAC/metadata.h: metadata level 2 interface + * \ingroup flac_metadata + * + * \brief + * The level 2 interface provides read-write access to FLAC file metadata; + * all metadata is read into memory, operated on in memory, and then written + * to file, which is more efficient than level 1 when editing multiple blocks. + * + * Currently Ogg FLAC is supported for read only, via + * FLAC__metadata_chain_read_ogg() but a subsequent + * FLAC__metadata_chain_write() will fail. + * + * The general usage of this interface is: + * + * - Create a new chain using FLAC__metadata_chain_new(). A chain is a + * linked list of FLAC metadata blocks. + * - Read all metadata into the the chain from a FLAC file using + * FLAC__metadata_chain_read() or FLAC__metadata_chain_read_ogg() and + * check the status. + * - Optionally, consolidate the padding using + * FLAC__metadata_chain_merge_padding() or + * FLAC__metadata_chain_sort_padding(). + * - Create a new iterator using FLAC__metadata_iterator_new() + * - Initialize the iterator to point to the first element in the chain + * using FLAC__metadata_iterator_init() + * - Traverse the chain using FLAC__metadata_iterator_next and + * FLAC__metadata_iterator_prev(). + * - Get a block for reading or modification using + * FLAC__metadata_iterator_get_block(). The pointer to the object + * inside the chain is returned, so the block is yours to modify. + * Changes will be reflected in the FLAC file when you write the + * chain. You can also add and delete blocks (see functions below). + * - When done, write out the chain using FLAC__metadata_chain_write(). + * Make sure to read the whole comment to the function below. + * - Delete the chain using FLAC__metadata_chain_delete(). + * + * \note + * Even though the FLAC file is not open while the chain is being + * manipulated, you must not alter the file externally during + * this time. The chain assumes the FLAC file will not change + * between the time of FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg() + * and FLAC__metadata_chain_write(). + * + * \note + * Do not modify the is_last, length, or type fields of returned + * FLAC__StreamMetadata objects. These are managed automatically. + * + * \note + * The metadata objects returned by FLAC__metadata_iterator_get_block() + * are owned by the chain; do not FLAC__metadata_object_delete() them. + * In the same way, blocks passed to FLAC__metadata_iterator_set_block() + * become owned by the chain and they will be deleted when the chain is + * deleted. + * + * \{ + */ + +struct FLAC__Metadata_Chain; +/** The opaque structure definition for the level 2 chain type. + */ +typedef struct FLAC__Metadata_Chain FLAC__Metadata_Chain; + +struct FLAC__Metadata_Iterator; +/** The opaque structure definition for the level 2 iterator type. + */ +typedef struct FLAC__Metadata_Iterator FLAC__Metadata_Iterator; + +typedef enum { + FLAC__METADATA_CHAIN_STATUS_OK = 0, + /**< The chain is in the normal OK state */ + + FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT, + /**< The data passed into a function violated the function's usage criteria */ + + FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE, + /**< The chain could not open the target file */ + + FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE, + /**< The chain could not find the FLAC signature at the start of the file */ + + FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE, + /**< The chain tried to write to a file that was not writable */ + + FLAC__METADATA_CHAIN_STATUS_BAD_METADATA, + /**< The chain encountered input that does not conform to the FLAC metadata specification */ + + FLAC__METADATA_CHAIN_STATUS_READ_ERROR, + /**< The chain encountered an error while reading the FLAC file */ + + FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR, + /**< The chain encountered an error while seeking in the FLAC file */ + + FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR, + /**< The chain encountered an error while writing the FLAC file */ + + FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR, + /**< The chain encountered an error renaming the FLAC file */ + + FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR, + /**< The chain encountered an error removing the temporary file */ + + FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR, + /**< Memory allocation failed */ + + FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR, + /**< The caller violated an assertion or an unexpected error occurred */ + + FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS, + /**< One or more of the required callbacks was NULL */ + + FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH, + /**< FLAC__metadata_chain_write() was called on a chain read by + * FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), + * or + * FLAC__metadata_chain_write_with_callbacks()/FLAC__metadata_chain_write_with_callbacks_and_tempfile() + * was called on a chain read by + * FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). + * Matching read/write methods must always be used. */ + + FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL + /**< FLAC__metadata_chain_write_with_callbacks() was called when the + * chain write requires a tempfile; use + * FLAC__metadata_chain_write_with_callbacks_and_tempfile() instead. + * Or, FLAC__metadata_chain_write_with_callbacks_and_tempfile() was + * called when the chain write does not require a tempfile; use + * FLAC__metadata_chain_write_with_callbacks() instead. + * Always check FLAC__metadata_chain_check_if_tempfile_needed() + * before writing via callbacks. */ + +} FLAC__Metadata_ChainStatus; + +/** Maps a FLAC__Metadata_ChainStatus to a C string. + * + * Using a FLAC__Metadata_ChainStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__Metadata_ChainStatusString[]; + +/*********** FLAC__Metadata_Chain ***********/ + +/** Create a new chain instance. + * + * \retval FLAC__Metadata_Chain* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(void); + +/** Free a chain instance. Deletes the object pointed to by \a chain. + * + * \param chain A pointer to an existing chain. + * \assert + * \code chain != NULL \endcode + */ +FLAC_API void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain); + +/** Get the current status of the chain. Call this after a function + * returns \c false to get the reason for the error. Also resets the + * status to FLAC__METADATA_CHAIN_STATUS_OK. + * + * \param chain A pointer to an existing chain. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__Metadata_ChainStatus + * The current status of the chain. + */ +FLAC_API FLAC__Metadata_ChainStatus FLAC__metadata_chain_status(FLAC__Metadata_Chain *chain); + +/** Read all metadata from a FLAC file into the chain. + * + * \param chain A pointer to an existing chain. + * \param filename The path to the FLAC file to read. + * \assert + * \code chain != NULL \endcode + * \code filename != NULL \endcode + * \retval FLAC__bool + * \c true if a valid list of metadata blocks was read from + * \a filename, else \c false. On failure, check the status with + * FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_read(FLAC__Metadata_Chain *chain, const char *filename); + +/** Read all metadata from an Ogg FLAC file into the chain. + * + * \note Ogg FLAC metadata data writing is not supported yet and + * FLAC__metadata_chain_write() will fail. + * + * \param chain A pointer to an existing chain. + * \param filename The path to the Ogg FLAC file to read. + * \assert + * \code chain != NULL \endcode + * \code filename != NULL \endcode + * \retval FLAC__bool + * \c true if a valid list of metadata blocks was read from + * \a filename, else \c false. On failure, check the status with + * FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_read_ogg(FLAC__Metadata_Chain *chain, const char *filename); + +/** Read all metadata from a FLAC stream into the chain via I/O callbacks. + * + * The \a handle need only be open for reading, but must be seekable. + * The equivalent minimum stdio fopen() file mode is \c "r" (or \c "rb" + * for Windows). + * + * \param chain A pointer to an existing chain. + * \param handle The I/O handle of the FLAC stream to read. The + * handle will NOT be closed after the metadata is read; + * that is the duty of the caller. + * \param callbacks + * A set of callbacks to use for I/O. The mandatory + * callbacks are \a read, \a seek, and \a tell. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if a valid list of metadata blocks was read from + * \a handle, else \c false. On failure, check the status with + * FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_read_with_callbacks(FLAC__Metadata_Chain *chain, FLAC__IOHandle handle, FLAC__IOCallbacks callbacks); + +/** Read all metadata from an Ogg FLAC stream into the chain via I/O callbacks. + * + * The \a handle need only be open for reading, but must be seekable. + * The equivalent minimum stdio fopen() file mode is \c "r" (or \c "rb" + * for Windows). + * + * \note Ogg FLAC metadata data writing is not supported yet and + * FLAC__metadata_chain_write() will fail. + * + * \param chain A pointer to an existing chain. + * \param handle The I/O handle of the Ogg FLAC stream to read. The + * handle will NOT be closed after the metadata is read; + * that is the duty of the caller. + * \param callbacks + * A set of callbacks to use for I/O. The mandatory + * callbacks are \a read, \a seek, and \a tell. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if a valid list of metadata blocks was read from + * \a handle, else \c false. On failure, check the status with + * FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_read_ogg_with_callbacks(FLAC__Metadata_Chain *chain, FLAC__IOHandle handle, FLAC__IOCallbacks callbacks); + +/** Checks if writing the given chain would require the use of a + * temporary file, or if it could be written in place. + * + * Under certain conditions, padding can be utilized so that writing + * edited metadata back to the FLAC file does not require rewriting the + * entire file. If rewriting is required, then a temporary workfile is + * required. When writing metadata using callbacks, you must check + * this function to know whether to call + * FLAC__metadata_chain_write_with_callbacks() or + * FLAC__metadata_chain_write_with_callbacks_and_tempfile(). When + * writing with FLAC__metadata_chain_write(), the temporary file is + * handled internally. + * + * \param chain A pointer to an existing chain. + * \param use_padding + * Whether or not padding will be allowed to be used + * during the write. The value of \a use_padding given + * here must match the value later passed to + * FLAC__metadata_chain_write_with_callbacks() or + * FLAC__metadata_chain_write_with_callbacks_with_tempfile(). + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if writing the current chain would require a tempfile, or + * \c false if metadata can be written in place. + */ +FLAC_API FLAC__bool FLAC__metadata_chain_check_if_tempfile_needed(FLAC__Metadata_Chain *chain, FLAC__bool use_padding); + +/** Write all metadata out to the FLAC file. This function tries to be as + * efficient as possible; how the metadata is actually written is shown by + * the following: + * + * If the current chain is the same size as the existing metadata, the new + * data is written in place. + * + * If the current chain is longer than the existing metadata, and + * \a use_padding is \c true, and the last block is a PADDING block of + * sufficient length, the function will truncate the final padding block + * so that the overall size of the metadata is the same as the existing + * metadata, and then just rewrite the metadata. Otherwise, if not all of + * the above conditions are met, the entire FLAC file must be rewritten. + * If you want to use padding this way it is a good idea to call + * FLAC__metadata_chain_sort_padding() first so that you have the maximum + * amount of padding to work with, unless you need to preserve ordering + * of the PADDING blocks for some reason. + * + * If the current chain is shorter than the existing metadata, and + * \a use_padding is \c true, and the final block is a PADDING block, the padding + * is extended to make the overall size the same as the existing data. If + * \a use_padding is \c true and the last block is not a PADDING block, a new + * PADDING block is added to the end of the new data to make it the same + * size as the existing data (if possible, see the note to + * FLAC__metadata_simple_iterator_set_block() about the four byte limit) + * and the new data is written in place. If none of the above apply or + * \a use_padding is \c false, the entire FLAC file is rewritten. + * + * If \a preserve_file_stats is \c true, the owner and modification time will + * be preserved even if the FLAC file is written. + * + * For this write function to be used, the chain must have been read with + * FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(), not + * FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(). + * + * \param chain A pointer to an existing chain. + * \param use_padding See above. + * \param preserve_file_stats See above. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if the write succeeded, else \c false. On failure, + * check the status with FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__bool preserve_file_stats); + +/** Write all metadata out to a FLAC stream via callbacks. + * + * (See FLAC__metadata_chain_write() for the details on how padding is + * used to write metadata in place if possible.) + * + * The \a handle must be open for updating and be seekable. The + * equivalent minimum stdio fopen() file mode is \c "r+" (or \c "r+b" + * for Windows). + * + * For this write function to be used, the chain must have been read with + * FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), + * not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). + * Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned + * \c false. + * + * \param chain A pointer to an existing chain. + * \param use_padding See FLAC__metadata_chain_write() + * \param handle The I/O handle of the FLAC stream to write. The + * handle will NOT be closed after the metadata is + * written; that is the duty of the caller. + * \param callbacks A set of callbacks to use for I/O. The mandatory + * callbacks are \a write and \a seek. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if the write succeeded, else \c false. On failure, + * check the status with FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_write_with_callbacks(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__IOHandle handle, FLAC__IOCallbacks callbacks); + +/** Write all metadata out to a FLAC stream via callbacks. + * + * (See FLAC__metadata_chain_write() for the details on how padding is + * used to write metadata in place if possible.) + * + * This version of the write-with-callbacks function must be used when + * FLAC__metadata_chain_check_if_tempfile_needed() returns true. In + * this function, you must supply an I/O handle corresponding to the + * FLAC file to edit, and a temporary handle to which the new FLAC + * file will be written. It is the caller's job to move this temporary + * FLAC file on top of the original FLAC file to complete the metadata + * edit. + * + * The \a handle must be open for reading and be seekable. The + * equivalent minimum stdio fopen() file mode is \c "r" (or \c "rb" + * for Windows). + * + * The \a temp_handle must be open for writing. The + * equivalent minimum stdio fopen() file mode is \c "w" (or \c "wb" + * for Windows). It should be an empty stream, or at least positioned + * at the start-of-file (in which case it is the caller's duty to + * truncate it on return). + * + * For this write function to be used, the chain must have been read with + * FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), + * not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). + * Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned + * \c true. + * + * \param chain A pointer to an existing chain. + * \param use_padding See FLAC__metadata_chain_write() + * \param handle The I/O handle of the original FLAC stream to read. + * The handle will NOT be closed after the metadata is + * written; that is the duty of the caller. + * \param callbacks A set of callbacks to use for I/O on \a handle. + * The mandatory callbacks are \a read, \a seek, and + * \a eof. + * \param temp_handle The I/O handle of the FLAC stream to write. The + * handle will NOT be closed after the metadata is + * written; that is the duty of the caller. + * \param temp_callbacks + * A set of callbacks to use for I/O on temp_handle. + * The only mandatory callback is \a write. + * \assert + * \code chain != NULL \endcode + * \retval FLAC__bool + * \c true if the write succeeded, else \c false. On failure, + * check the status with FLAC__metadata_chain_status(). + */ +FLAC_API FLAC__bool FLAC__metadata_chain_write_with_callbacks_and_tempfile(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__IOHandle handle, FLAC__IOCallbacks callbacks, FLAC__IOHandle temp_handle, FLAC__IOCallbacks temp_callbacks); + +/** Merge adjacent PADDING blocks into a single block. + * + * \note This function does not write to the FLAC file, it only + * modifies the chain. + * + * \warning Any iterator on the current chain will become invalid after this + * call. You should delete the iterator and get a new one. + * + * \param chain A pointer to an existing chain. + * \assert + * \code chain != NULL \endcode + */ +FLAC_API void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain); + +/** This function will move all PADDING blocks to the end on the metadata, + * then merge them into a single block. + * + * \note This function does not write to the FLAC file, it only + * modifies the chain. + * + * \warning Any iterator on the current chain will become invalid after this + * call. You should delete the iterator and get a new one. + * + * \param chain A pointer to an existing chain. + * \assert + * \code chain != NULL \endcode + */ +FLAC_API void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); + + +/*********** FLAC__Metadata_Iterator ***********/ + +/** Create a new iterator instance. + * + * \retval FLAC__Metadata_Iterator* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void); + +/** Free an iterator instance. Deletes the object pointed to by \a iterator. + * + * \param iterator A pointer to an existing iterator. + * \assert + * \code iterator != NULL \endcode + */ +FLAC_API void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator); + +/** Initialize the iterator to point to the first metadata block in the + * given chain. + * + * \param iterator A pointer to an existing iterator. + * \param chain A pointer to an existing and initialized (read) chain. + * \assert + * \code iterator != NULL \endcode + * \code chain != NULL \endcode + */ +FLAC_API void FLAC__metadata_iterator_init(FLAC__Metadata_Iterator *iterator, FLAC__Metadata_Chain *chain); + +/** Moves the iterator forward one metadata block, returning \c false if + * already at the end. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__bool + * \c false if already at the last metadata block of the chain, else + * \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator); + +/** Moves the iterator backward one metadata block, returning \c false if + * already at the beginning. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__bool + * \c false if already at the first metadata block of the chain, else + * \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator); + +/** Get the type of the metadata block at the current position. + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__MetadataType + * The type of the metadata block at the current iterator position. + */ +FLAC_API FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__Metadata_Iterator *iterator); + +/** Get the metadata block at the current position. You can modify + * the block in place but must write the chain before the changes + * are reflected to the FLAC file. You do not need to call + * FLAC__metadata_iterator_set_block() to reflect the changes; + * the pointer returned by FLAC__metadata_iterator_get_block() + * points directly into the chain. + * + * \warning + * Do not call FLAC__metadata_object_delete() on the returned object; + * to delete a block use FLAC__metadata_iterator_delete_block(). + * + * \param iterator A pointer to an existing initialized iterator. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__StreamMetadata* + * The current metadata block. + */ +FLAC_API FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator *iterator); + +/** Set the metadata block at the current position, replacing the existing + * block. The new block passed in becomes owned by the chain and it will be + * deleted when the chain is deleted. + * + * \param iterator A pointer to an existing initialized iterator. + * \param block A pointer to a metadata block. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \code block != NULL \endcode + * \retval FLAC__bool + * \c false if the conditions in the above description are not met, or + * a memory allocation error occurs, otherwise \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_set_block(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block); + +/** Removes the current block from the chain. If \a replace_with_padding is + * \c true, the block will instead be replaced with a padding block of equal + * size. You can not delete the STREAMINFO block. The iterator will be + * left pointing to the block before the one just "deleted", even if + * \a replace_with_padding is \c true. + * + * \param iterator A pointer to an existing initialized iterator. + * \param replace_with_padding See above. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__bool + * \c false if the conditions in the above description are not met, + * otherwise \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_delete_block(FLAC__Metadata_Iterator *iterator, FLAC__bool replace_with_padding); + +/** Insert a new block before the current block. You cannot insert a block + * before the first STREAMINFO block. You cannot insert a STREAMINFO block + * as there can be only one, the one that already exists at the head when you + * read in a chain. The chain takes ownership of the new block and it will be + * deleted when the chain is deleted. The iterator will be left pointing to + * the new block. + * + * \param iterator A pointer to an existing initialized iterator. + * \param block A pointer to a metadata block to insert. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__bool + * \c false if the conditions in the above description are not met, or + * a memory allocation error occurs, otherwise \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_insert_block_before(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block); + +/** Insert a new block after the current block. You cannot insert a STREAMINFO + * block as there can be only one, the one that already exists at the head when + * you read in a chain. The chain takes ownership of the new block and it will + * be deleted when the chain is deleted. The iterator will be left pointing to + * the new block. + * + * \param iterator A pointer to an existing initialized iterator. + * \param block A pointer to a metadata block to insert. + * \assert + * \code iterator != NULL \endcode + * \a iterator has been successfully initialized with + * FLAC__metadata_iterator_init() + * \retval FLAC__bool + * \c false if the conditions in the above description are not met, or + * a memory allocation error occurs, otherwise \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block); + +/* \} */ + + +/** \defgroup flac_metadata_object FLAC/metadata.h: metadata object methods + * \ingroup flac_metadata + * + * \brief + * This module contains methods for manipulating FLAC metadata objects. + * + * Since many are variable length we have to be careful about the memory + * management. We decree that all pointers to data in the object are + * owned by the object and memory-managed by the object. + * + * Use the FLAC__metadata_object_new() and FLAC__metadata_object_delete() + * functions to create all instances. When using the + * FLAC__metadata_object_set_*() functions to set pointers to data, set + * \a copy to \c true to have the function make it's own copy of the data, or + * to \c false to give the object ownership of your data. In the latter case + * your pointer must be freeable by free() and will be free()d when the object + * is FLAC__metadata_object_delete()d. It is legal to pass a null pointer as + * the data pointer to a FLAC__metadata_object_set_*() function as long as + * the length argument is 0 and the \a copy argument is \c false. + * + * The FLAC__metadata_object_new() and FLAC__metadata_object_clone() function + * will return \c NULL in the case of a memory allocation error, otherwise a new + * object. The FLAC__metadata_object_set_*() functions return \c false in the + * case of a memory allocation error. + * + * We don't have the convenience of C++ here, so note that the library relies + * on you to keep the types straight. In other words, if you pass, for + * example, a FLAC__StreamMetadata* that represents a STREAMINFO block to + * FLAC__metadata_object_application_set_data(), you will get an assertion + * failure. + * + * For convenience the FLAC__metadata_object_vorbiscomment_*() functions + * maintain a trailing NUL on each Vorbis comment entry. This is not counted + * toward the length or stored in the stream, but it can make working with plain + * comments (those that don't contain embedded-NULs in the value) easier. + * Entries passed into these functions have trailing NULs added if missing, and + * returned entries are guaranteed to have a trailing NUL. + * + * The FLAC__metadata_object_vorbiscomment_*() functions that take a Vorbis + * comment entry/name/value will first validate that it complies with the Vorbis + * comment specification and return false if it does not. + * + * There is no need to recalculate the length field on metadata blocks you + * have modified. They will be calculated automatically before they are + * written back to a file. + * + * \{ + */ + + +/** Create a new metadata object instance of the given type. + * + * The object will be "empty"; i.e. values and data pointers will be \c 0, + * with the exception of FLAC__METADATA_TYPE_VORBIS_COMMENT, which will have + * the vendor string set (but zero comments). + * + * Do not pass in a value greater than or equal to + * \a FLAC__METADATA_TYPE_UNDEFINED unless you really know what you're + * doing. + * + * \param type Type of object to create + * \retval FLAC__StreamMetadata* + * \c NULL if there was an error allocating memory or the type code is + * greater than FLAC__MAX_METADATA_TYPE_CODE, else the new instance. + */ +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type); + +/** Create a copy of an existing metadata object. + * + * The copy is a "deep" copy, i.e. dynamically allocated data within the + * object is also copied. The caller takes ownership of the new block and + * is responsible for freeing it with FLAC__metadata_object_delete(). + * + * \param object Pointer to object to copy. + * \assert + * \code object != NULL \endcode + * \retval FLAC__StreamMetadata* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object); + +/** Free a metadata object. Deletes the object pointed to by \a object. + * + * The delete is a "deep" delete, i.e. dynamically allocated data within the + * object is also deleted. + * + * \param object A pointer to an existing object. + * \assert + * \code object != NULL \endcode + */ +FLAC_API void FLAC__metadata_object_delete(FLAC__StreamMetadata *object); + +/** Compares two metadata objects. + * + * The compare is "deep", i.e. dynamically allocated data within the + * object is also compared. + * + * \param block1 A pointer to an existing object. + * \param block2 A pointer to an existing object. + * \assert + * \code block1 != NULL \endcode + * \code block2 != NULL \endcode + * \retval FLAC__bool + * \c true if objects are identical, else \c false. + */ +FLAC_API FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, const FLAC__StreamMetadata *block2); + +/** Sets the application data of an APPLICATION block. + * + * If \a copy is \c true, a copy of the data is stored; otherwise, the object + * takes ownership of the pointer. The existing data will be freed if this + * function is successful, otherwise the original data will remain if \a copy + * is \c true and malloc() fails. + * + * \note It is safe to pass a const pointer to \a data if \a copy is \c true. + * + * \param object A pointer to an existing APPLICATION object. + * \param data A pointer to the data to set. + * \param length The length of \a data in bytes. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_APPLICATION \endcode + * \code (data != NULL && length > 0) || + * (data == NULL && length == 0 && copy == false) \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *object, FLAC__byte *data, unsigned length, FLAC__bool copy); + +/** Resize the seekpoint array. + * + * If the size shrinks, elements will truncated; if it grows, new placeholder + * points will be added to the end. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param new_num_points The desired length of the array; may be \c 0. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code (object->data.seek_table.points == NULL && object->data.seek_table.num_points == 0) || + * (object->data.seek_table.points != NULL && object->data.seek_table.num_points > 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation error, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *object, unsigned new_num_points); + +/** Set a seekpoint in a seektable. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param point_num Index into seekpoint array to set. + * \param point The point to set. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code object->data.seek_table.num_points > point_num \endcode + */ +FLAC_API void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point); + +/** Insert a seekpoint into a seektable. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param point_num Index into seekpoint array to set. + * \param point The point to set. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code object->data.seek_table.num_points >= point_num \endcode + * \retval FLAC__bool + * \c false if memory allocation error, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point); + +/** Delete a seekpoint from a seektable. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param point_num Index into seekpoint array to set. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code object->data.seek_table.num_points > point_num \endcode + * \retval FLAC__bool + * \c false if memory allocation error, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *object, unsigned point_num); + +/** Check a seektable to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * seektable. + * + * \param object A pointer to an existing SEEKTABLE object. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \retval FLAC__bool + * \c false if seek table is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata *object); + +/** Append a number of placeholder points to the end of a seek table. + * + * \note + * As with the other ..._seektable_template_... functions, you should + * call FLAC__metadata_object_seektable_template_sort() when finished + * to make the seek table legal. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param num The number of placeholder points to append. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__StreamMetadata *object, unsigned num); + +/** Append a specific seek point template to the end of a seek table. + * + * \note + * As with the other ..._seektable_template_... functions, you should + * call FLAC__metadata_object_seektable_template_sort() when finished + * to make the seek table legal. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param sample_number The sample number of the seek point template. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMetadata *object, FLAC__uint64 sample_number); + +/** Append specific seek point templates to the end of a seek table. + * + * \note + * As with the other ..._seektable_template_... functions, you should + * call FLAC__metadata_object_seektable_template_sort() when finished + * to make the seek table legal. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param sample_numbers An array of sample numbers for the seek points. + * \param num The number of seek point templates to append. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMetadata *object, FLAC__uint64 sample_numbers[], unsigned num); + +/** Append a set of evenly-spaced seek point templates to the end of a + * seek table. + * + * \note + * As with the other ..._seektable_template_... functions, you should + * call FLAC__metadata_object_seektable_template_sort() when finished + * to make the seek table legal. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param num The number of placeholder points to append. + * \param total_samples The total number of samples to be encoded; + * the seekpoints will be spaced approximately + * \a total_samples / \a num samples apart. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code total_samples > 0 \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__StreamMetadata *object, unsigned num, FLAC__uint64 total_samples); + +/** Append a set of evenly-spaced seek point templates to the end of a + * seek table. + * + * \note + * As with the other ..._seektable_template_... functions, you should + * call FLAC__metadata_object_seektable_template_sort() when finished + * to make the seek table legal. + * + * \param object A pointer to an existing SEEKTABLE object. + * \param samples The number of samples apart to space the placeholder + * points. The first point will be at sample \c 0, the + * second at sample \a samples, then 2*\a samples, and + * so on. As long as \a samples and \a total_samples + * are greater than \c 0, there will always be at least + * one seekpoint at sample \c 0. + * \param total_samples The total number of samples to be encoded; + * the seekpoints will be spaced + * \a samples samples apart. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \code samples > 0 \endcode + * \code total_samples > 0 \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points_by_samples(FLAC__StreamMetadata *object, unsigned samples, FLAC__uint64 total_samples); + +/** Sort a seek table's seek points according to the format specification, + * removing duplicates. + * + * \param object A pointer to a seek table to be sorted. + * \param compact If \c false, behaves like FLAC__format_seektable_sort(). + * If \c true, duplicates are deleted and the seek table is + * shrunk appropriately; the number of placeholder points + * present in the seek table will be the same after the call + * as before. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *object, FLAC__bool compact); + +/** Sets the vendor string in a VORBIS_COMMENT block. + * + * For convenience, a trailing NUL is added to the entry if it doesn't have + * one already. + * + * If \a copy is \c true, a copy of the entry is stored; otherwise, the object + * takes ownership of the \c entry.entry pointer. + * + * \note If this function returns \c false, the caller still owns the + * pointer. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param entry The entry to set the vendor string to. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code (entry.entry != NULL && entry.length > 0) || + * (entry.entry == NULL && entry.length == 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy); + +/** Resize the comment array. + * + * If the size shrinks, elements will truncated; if it grows, new empty + * fields will be added to the end. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param new_num_comments The desired length of the array; may be \c 0. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code (object->data.vorbis_comment.comments == NULL && object->data.vorbis_comment.num_comments == 0) || + * (object->data.vorbis_comment.comments != NULL && object->data.vorbis_comment.num_comments > 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetadata *object, unsigned new_num_comments); + +/** Sets a comment in a VORBIS_COMMENT block. + * + * For convenience, a trailing NUL is added to the entry if it doesn't have + * one already. + * + * If \a copy is \c true, a copy of the entry is stored; otherwise, the object + * takes ownership of the \c entry.entry pointer. + * + * \note If this function returns \c false, the caller still owns the + * pointer. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param comment_num Index into comment array to set. + * \param entry The entry to set the comment to. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code comment_num < object->data.vorbis_comment.num_comments \endcode + * \code (entry.entry != NULL && entry.length > 0) || + * (entry.entry == NULL && entry.length == 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy); + +/** Insert a comment in a VORBIS_COMMENT block at the given index. + * + * For convenience, a trailing NUL is added to the entry if it doesn't have + * one already. + * + * If \a copy is \c true, a copy of the entry is stored; otherwise, the object + * takes ownership of the \c entry.entry pointer. + * + * \note If this function returns \c false, the caller still owns the + * pointer. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param comment_num The index at which to insert the comment. The comments + * at and after \a comment_num move right one position. + * To append a comment to the end, set \a comment_num to + * \c object->data.vorbis_comment.num_comments . + * \param entry The comment to insert. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code object->data.vorbis_comment.num_comments >= comment_num \endcode + * \code (entry.entry != NULL && entry.length > 0) || + * (entry.entry == NULL && entry.length == 0 && copy == false) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy); + +/** Appends a comment to a VORBIS_COMMENT block. + * + * For convenience, a trailing NUL is added to the entry if it doesn't have + * one already. + * + * If \a copy is \c true, a copy of the entry is stored; otherwise, the object + * takes ownership of the \c entry.entry pointer. + * + * \note If this function returns \c false, the caller still owns the + * pointer. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param entry The comment to insert. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code (entry.entry != NULL && entry.length > 0) || + * (entry.entry == NULL && entry.length == 0 && copy == false) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_append_comment(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy); + +/** Replaces comments in a VORBIS_COMMENT block with a new one. + * + * For convenience, a trailing NUL is added to the entry if it doesn't have + * one already. + * + * Depending on the the value of \a all, either all or just the first comment + * whose field name(s) match the given entry's name will be replaced by the + * given entry. If no comments match, \a entry will simply be appended. + * + * If \a copy is \c true, a copy of the entry is stored; otherwise, the object + * takes ownership of the \c entry.entry pointer. + * + * \note If this function returns \c false, the caller still owns the + * pointer. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param entry The comment to insert. + * \param all If \c true, all comments whose field name matches + * \a entry's field name will be removed, and \a entry will + * be inserted at the position of the first matching + * comment. If \c false, only the first comment whose + * field name matches \a entry's field name will be + * replaced with \a entry. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code (entry.entry != NULL && entry.length > 0) || + * (entry.entry == NULL && entry.length == 0 && copy == false) \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_replace_comment(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool all, FLAC__bool copy); + +/** Delete a comment in a VORBIS_COMMENT block at the given index. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param comment_num The index of the comment to delete. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code object->data.vorbis_comment.num_comments > comment_num \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_delete_comment(FLAC__StreamMetadata *object, unsigned comment_num); + +/** Creates a Vorbis comment entry from NUL-terminated name and value strings. + * + * On return, the filled-in \a entry->entry pointer will point to malloc()ed + * memory and shall be owned by the caller. For convenience the entry will + * have a terminating NUL. + * + * \param entry A pointer to a Vorbis comment entry. The entry's + * \c entry pointer should not point to allocated + * memory as it will be overwritten. + * \param field_name The field name in ASCII, \c NUL terminated. + * \param field_value The field value in UTF-8, \c NUL terminated. + * \assert + * \code entry != NULL \endcode + * \code field_name != NULL \endcode + * \code field_value != NULL \endcode + * \retval FLAC__bool + * \c false if malloc() fails, or if \a field_name or \a field_value does + * not comply with the Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(FLAC__StreamMetadata_VorbisComment_Entry *entry, const char *field_name, const char *field_value); + +/** Splits a Vorbis comment entry into NUL-terminated name and value strings. + * + * The returned pointers to name and value will be allocated by malloc() + * and shall be owned by the caller. + * + * \param entry An existing Vorbis comment entry. + * \param field_name The address of where the returned pointer to the + * field name will be stored. + * \param field_value The address of where the returned pointer to the + * field value will be stored. + * \assert + * \code (entry.entry != NULL && entry.length > 0) \endcode + * \code memchr(entry.entry, '=', entry.length) != NULL \endcode + * \code field_name != NULL \endcode + * \code field_value != NULL \endcode + * \retval FLAC__bool + * \c false if memory allocation fails or \a entry does not comply with the + * Vorbis comment specification, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_to_name_value_pair(const FLAC__StreamMetadata_VorbisComment_Entry entry, char **field_name, char **field_value); + +/** Check if the given Vorbis comment entry's field name matches the given + * field name. + * + * \param entry An existing Vorbis comment entry. + * \param field_name The field name to check. + * \param field_name_length The length of \a field_name, not including the + * terminating \c NUL. + * \assert + * \code (entry.entry != NULL && entry.length > 0) \endcode + * \retval FLAC__bool + * \c true if the field names match, else \c false + */ +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_matches(const FLAC__StreamMetadata_VorbisComment_Entry entry, const char *field_name, unsigned field_name_length); + +/** Find a Vorbis comment with the given field name. + * + * The search begins at entry number \a offset; use an offset of 0 to + * search from the beginning of the comment array. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param offset The offset into the comment array from where to start + * the search. + * \param field_name The field name of the comment to find. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \code field_name != NULL \endcode + * \retval int + * The offset in the comment array of the first comment whose field + * name matches \a field_name, or \c -1 if no match was found. + */ +FLAC_API int FLAC__metadata_object_vorbiscomment_find_entry_from(const FLAC__StreamMetadata *object, unsigned offset, const char *field_name); + +/** Remove first Vorbis comment matching the given field name. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param field_name The field name of comment to delete. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \retval int + * \c -1 for memory allocation error, \c 0 for no matching entries, + * \c 1 for one matching entry deleted. + */ +FLAC_API int FLAC__metadata_object_vorbiscomment_remove_entry_matching(FLAC__StreamMetadata *object, const char *field_name); + +/** Remove all Vorbis comments matching the given field name. + * + * \param object A pointer to an existing VORBIS_COMMENT object. + * \param field_name The field name of comments to delete. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode + * \retval int + * \c -1 for memory allocation error, \c 0 for no matching entries, + * else the number of matching entries deleted. + */ +FLAC_API int FLAC__metadata_object_vorbiscomment_remove_entries_matching(FLAC__StreamMetadata *object, const char *field_name); + +/** Create a new CUESHEET track instance. + * + * The object will be "empty"; i.e. values and data pointers will be \c 0. + * + * \retval FLAC__StreamMetadata_CueSheet_Track* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void); + +/** Create a copy of an existing CUESHEET track object. + * + * The copy is a "deep" copy, i.e. dynamically allocated data within the + * object is also copied. The caller takes ownership of the new object and + * is responsible for freeing it with + * FLAC__metadata_object_cuesheet_track_delete(). + * + * \param object Pointer to object to copy. + * \assert + * \code object != NULL \endcode + * \retval FLAC__StreamMetadata_CueSheet_Track* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_clone(const FLAC__StreamMetadata_CueSheet_Track *object); + +/** Delete a CUESHEET track object + * + * \param object A pointer to an existing CUESHEET track object. + * \assert + * \code object != NULL \endcode + */ +FLAC_API void FLAC__metadata_object_cuesheet_track_delete(FLAC__StreamMetadata_CueSheet_Track *object); + +/** Resize a track's index point array. + * + * If the size shrinks, elements will truncated; if it grows, new blank + * indices will be added to the end. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index of the track to modify. NOTE: this is not + * necessarily the same as the track's \a number field. + * \param new_num_indices The desired length of the array; may be \c 0. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks > track_num \endcode + * \code (object->data.cue_sheet.tracks[track_num].indices == NULL && object->data.cue_sheet.tracks[track_num].num_indices == 0) || + * (object->data.cue_sheet.tracks[track_num].indices != NULL && object->data.cue_sheet.tracks[track_num].num_indices > 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation error, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_resize_indices(FLAC__StreamMetadata *object, unsigned track_num, unsigned new_num_indices); + +/** Insert an index point in a CUESHEET track at the given index. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index of the track to modify. NOTE: this is not + * necessarily the same as the track's \a number field. + * \param index_num The index into the track's index array at which to + * insert the index point. NOTE: this is not necessarily + * the same as the index point's \a number field. The + * indices at and after \a index_num move right one + * position. To append an index point to the end, set + * \a index_num to + * \c object->data.cue_sheet.tracks[track_num].num_indices . + * \param index The index point to insert. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks > track_num \endcode + * \code object->data.cue_sheet.tracks[track_num].num_indices >= index_num \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_insert_index(FLAC__StreamMetadata *object, unsigned track_num, unsigned index_num, FLAC__StreamMetadata_CueSheet_Index index); + +/** Insert a blank index point in a CUESHEET track at the given index. + * + * A blank index point is one in which all field values are zero. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index of the track to modify. NOTE: this is not + * necessarily the same as the track's \a number field. + * \param index_num The index into the track's index array at which to + * insert the index point. NOTE: this is not necessarily + * the same as the index point's \a number field. The + * indices at and after \a index_num move right one + * position. To append an index point to the end, set + * \a index_num to + * \c object->data.cue_sheet.tracks[track_num].num_indices . + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks > track_num \endcode + * \code object->data.cue_sheet.tracks[track_num].num_indices >= index_num \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_insert_blank_index(FLAC__StreamMetadata *object, unsigned track_num, unsigned index_num); + +/** Delete an index point in a CUESHEET track at the given index. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index into the track array of the track to + * modify. NOTE: this is not necessarily the same + * as the track's \a number field. + * \param index_num The index into the track's index array of the index + * to delete. NOTE: this is not necessarily the same + * as the index's \a number field. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks > track_num \endcode + * \code object->data.cue_sheet.tracks[track_num].num_indices > index_num \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_delete_index(FLAC__StreamMetadata *object, unsigned track_num, unsigned index_num); + +/** Resize the track array. + * + * If the size shrinks, elements will truncated; if it grows, new blank + * tracks will be added to the end. + * + * \param object A pointer to an existing CUESHEET object. + * \param new_num_tracks The desired length of the array; may be \c 0. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code (object->data.cue_sheet.tracks == NULL && object->data.cue_sheet.num_tracks == 0) || + * (object->data.cue_sheet.tracks != NULL && object->data.cue_sheet.num_tracks > 0) \endcode + * \retval FLAC__bool + * \c false if memory allocation error, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_resize_tracks(FLAC__StreamMetadata *object, unsigned new_num_tracks); + +/** Sets a track in a CUESHEET block. + * + * If \a copy is \c true, a copy of the track is stored; otherwise, the object + * takes ownership of the \a track pointer. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num Index into track array to set. NOTE: this is not + * necessarily the same as the track's \a number field. + * \param track The track to set the track to. You may safely pass in + * a const pointer if \a copy is \c true. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code track_num < object->data.cue_sheet.num_tracks \endcode + * \code (track->indices != NULL && track->num_indices > 0) || + * (track->indices == NULL && track->num_indices == 0) + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_set_track(FLAC__StreamMetadata *object, unsigned track_num, FLAC__StreamMetadata_CueSheet_Track *track, FLAC__bool copy); + +/** Insert a track in a CUESHEET block at the given index. + * + * If \a copy is \c true, a copy of the track is stored; otherwise, the object + * takes ownership of the \a track pointer. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index at which to insert the track. NOTE: this + * is not necessarily the same as the track's \a number + * field. The tracks at and after \a track_num move right + * one position. To append a track to the end, set + * \a track_num to \c object->data.cue_sheet.num_tracks . + * \param track The track to insert. You may safely pass in a const + * pointer if \a copy is \c true. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks >= track_num \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_insert_track(FLAC__StreamMetadata *object, unsigned track_num, FLAC__StreamMetadata_CueSheet_Track *track, FLAC__bool copy); + +/** Insert a blank track in a CUESHEET block at the given index. + * + * A blank track is one in which all field values are zero. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index at which to insert the track. NOTE: this + * is not necessarily the same as the track's \a number + * field. The tracks at and after \a track_num move right + * one position. To append a track to the end, set + * \a track_num to \c object->data.cue_sheet.num_tracks . + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks >= track_num \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_insert_blank_track(FLAC__StreamMetadata *object, unsigned track_num); + +/** Delete a track in a CUESHEET block at the given index. + * + * \param object A pointer to an existing CUESHEET object. + * \param track_num The index into the track array of the track to + * delete. NOTE: this is not necessarily the same + * as the track's \a number field. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \code object->data.cue_sheet.num_tracks > track_num \endcode + * \retval FLAC__bool + * \c false if realloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_delete_track(FLAC__StreamMetadata *object, unsigned track_num); + +/** Check a cue sheet to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * cue sheet. + * + * \param object A pointer to an existing CUESHEET object. + * \param check_cd_da_subset If \c true, check CUESHEET against more + * stringent requirements for a CD-DA (audio) disc. + * \param violation Address of a pointer to a string. If there is a + * violation, a pointer to a string explanation of the + * violation will be returned here. \a violation may be + * \c NULL if you don't need the returned string. Do not + * free the returned string; it will always point to static + * data. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \retval FLAC__bool + * \c false if cue sheet is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_is_legal(const FLAC__StreamMetadata *object, FLAC__bool check_cd_da_subset, const char **violation); + +/** Calculate and return the CDDB/freedb ID for a cue sheet. The function + * assumes the cue sheet corresponds to a CD; the result is undefined + * if the cuesheet's is_cd bit is not set. + * + * \param object A pointer to an existing CUESHEET object. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode + * \retval FLAC__uint32 + * The unsigned integer representation of the CDDB/freedb ID + */ +FLAC_API FLAC__uint32 FLAC__metadata_object_cuesheet_calculate_cddb_id(const FLAC__StreamMetadata *object); + +/** Sets the MIME type of a PICTURE block. + * + * If \a copy is \c true, a copy of the string is stored; otherwise, the object + * takes ownership of the pointer. The existing string will be freed if this + * function is successful, otherwise the original string will remain if \a copy + * is \c true and malloc() fails. + * + * \note It is safe to pass a const pointer to \a mime_type if \a copy is \c true. + * + * \param object A pointer to an existing PICTURE object. + * \param mime_type A pointer to the MIME type string. The string must be + * ASCII characters 0x20-0x7e, NUL-terminated. No validation + * is done. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_PICTURE \endcode + * \code (mime_type != NULL) \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_picture_set_mime_type(FLAC__StreamMetadata *object, char *mime_type, FLAC__bool copy); + +/** Sets the description of a PICTURE block. + * + * If \a copy is \c true, a copy of the string is stored; otherwise, the object + * takes ownership of the pointer. The existing string will be freed if this + * function is successful, otherwise the original string will remain if \a copy + * is \c true and malloc() fails. + * + * \note It is safe to pass a const pointer to \a description if \a copy is \c true. + * + * \param object A pointer to an existing PICTURE object. + * \param description A pointer to the description string. The string must be + * valid UTF-8, NUL-terminated. No validation is done. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_PICTURE \endcode + * \code (description != NULL) \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_picture_set_description(FLAC__StreamMetadata *object, FLAC__byte *description, FLAC__bool copy); + +/** Sets the picture data of a PICTURE block. + * + * If \a copy is \c true, a copy of the data is stored; otherwise, the object + * takes ownership of the pointer. Also sets the \a data_length field of the + * metadata object to what is passed in as the \a length parameter. The + * existing data will be freed if this function is successful, otherwise the + * original data and data_length will remain if \a copy is \c true and + * malloc() fails. + * + * \note It is safe to pass a const pointer to \a data if \a copy is \c true. + * + * \param object A pointer to an existing PICTURE object. + * \param data A pointer to the data to set. + * \param length The length of \a data in bytes. + * \param copy See above. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_PICTURE \endcode + * \code (data != NULL && length > 0) || + * (data == NULL && length == 0 && copy == false) \endcode + * \retval FLAC__bool + * \c false if \a copy is \c true and malloc() fails, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_picture_set_data(FLAC__StreamMetadata *object, FLAC__byte *data, FLAC__uint32 length, FLAC__bool copy); + +/** Check a PICTURE block to see if it conforms to the FLAC specification. + * See the format specification for limits on the contents of the + * PICTURE block. + * + * \param object A pointer to existing PICTURE block to be checked. + * \param violation Address of a pointer to a string. If there is a + * violation, a pointer to a string explanation of the + * violation will be returned here. \a violation may be + * \c NULL if you don't need the returned string. Do not + * free the returned string; it will always point to static + * data. + * \assert + * \code object != NULL \endcode + * \code object->type == FLAC__METADATA_TYPE_PICTURE \endcode + * \retval FLAC__bool + * \c false if PICTURE block is illegal, else \c true. + */ +FLAC_API FLAC__bool FLAC__metadata_object_picture_is_legal(const FLAC__StreamMetadata *object, const char **violation); + +/* \} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/ordinals.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/ordinals.h new file mode 100644 index 0000000..a7a5cd9 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/ordinals.h @@ -0,0 +1,80 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__ORDINALS_H +#define FLAC__ORDINALS_H + +#if !(defined(_MSC_VER) || defined(__BORLANDC__) || defined(__EMX__)) +#include +#endif + +typedef signed char FLAC__int8; +typedef unsigned char FLAC__uint8; + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int16 FLAC__int16; +typedef __int32 FLAC__int32; +typedef __int64 FLAC__int64; +typedef unsigned __int16 FLAC__uint16; +typedef unsigned __int32 FLAC__uint32; +typedef unsigned __int64 FLAC__uint64; +#elif defined(__EMX__) +typedef short FLAC__int16; +typedef long FLAC__int32; +typedef long long FLAC__int64; +typedef unsigned short FLAC__uint16; +typedef unsigned long FLAC__uint32; +typedef unsigned long long FLAC__uint64; +#else +typedef int16_t FLAC__int16; +typedef int32_t FLAC__int32; +typedef int64_t FLAC__int64; +typedef uint16_t FLAC__uint16; +typedef uint32_t FLAC__uint32; +typedef uint64_t FLAC__uint64; +#endif + +typedef int FLAC__bool; + +typedef FLAC__uint8 FLAC__byte; + +#ifdef true +#undef true +#endif +#ifdef false +#undef false +#endif +#ifndef __cplusplus +#define true 1 +#define false 0 +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_decoder.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_decoder.h new file mode 100644 index 0000000..9ac1594 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_decoder.h @@ -0,0 +1,1559 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__STREAM_DECODER_H +#define FLAC__STREAM_DECODER_H + +#include /* for FILE */ +#include "export.h" +#include "format.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \file include/FLAC/stream_decoder.h + * + * \brief + * This module contains the functions which implement the stream + * decoder. + * + * See the detailed documentation in the + * \link flac_stream_decoder stream decoder \endlink module. + */ + +/** \defgroup flac_decoder FLAC/ \*_decoder.h: decoder interfaces + * \ingroup flac + * + * \brief + * This module describes the decoder layers provided by libFLAC. + * + * The stream decoder can be used to decode complete streams either from + * the client via callbacks, or directly from a file, depending on how + * it is initialized. When decoding via callbacks, the client provides + * callbacks for reading FLAC data and writing decoded samples, and + * handling metadata and errors. If the client also supplies seek-related + * callback, the decoder function for sample-accurate seeking within the + * FLAC input is also available. When decoding from a file, the client + * needs only supply a filename or open \c FILE* and write/metadata/error + * callbacks; the rest of the callbacks are supplied internally. For more + * info see the \link flac_stream_decoder stream decoder \endlink module. + */ + +/** \defgroup flac_stream_decoder FLAC/stream_decoder.h: stream decoder interface + * \ingroup flac_decoder + * + * \brief + * This module contains the functions which implement the stream + * decoder. + * + * The stream decoder can decode native FLAC, and optionally Ogg FLAC + * (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files. + * + * The basic usage of this decoder is as follows: + * - The program creates an instance of a decoder using + * FLAC__stream_decoder_new(). + * - The program overrides the default settings using + * FLAC__stream_decoder_set_*() functions. + * - The program initializes the instance to validate the settings and + * prepare for decoding using + * - FLAC__stream_decoder_init_stream() or FLAC__stream_decoder_init_FILE() + * or FLAC__stream_decoder_init_file() for native FLAC, + * - FLAC__stream_decoder_init_ogg_stream() or FLAC__stream_decoder_init_ogg_FILE() + * or FLAC__stream_decoder_init_ogg_file() for Ogg FLAC + * - The program calls the FLAC__stream_decoder_process_*() functions + * to decode data, which subsequently calls the callbacks. + * - The program finishes the decoding with FLAC__stream_decoder_finish(), + * which flushes the input and output and resets the decoder to the + * uninitialized state. + * - The instance may be used again or deleted with + * FLAC__stream_decoder_delete(). + * + * In more detail, the program will create a new instance by calling + * FLAC__stream_decoder_new(), then call FLAC__stream_decoder_set_*() + * functions to override the default decoder options, and call + * one of the FLAC__stream_decoder_init_*() functions. + * + * There are three initialization functions for native FLAC, one for + * setting up the decoder to decode FLAC data from the client via + * callbacks, and two for decoding directly from a FLAC file. + * + * For decoding via callbacks, use FLAC__stream_decoder_init_stream(). + * You must also supply several callbacks for handling I/O. Some (like + * seeking) are optional, depending on the capabilities of the input. + * + * For decoding directly from a file, use FLAC__stream_decoder_init_FILE() + * or FLAC__stream_decoder_init_file(). Then you must only supply an open + * \c FILE* or filename and fewer callbacks; the decoder will handle + * the other callbacks internally. + * + * There are three similarly-named init functions for decoding from Ogg + * FLAC streams. Check \c FLAC_API_SUPPORTS_OGG_FLAC to find out if the + * library has been built with Ogg support. + * + * Once the decoder is initialized, your program will call one of several + * functions to start the decoding process: + * + * - FLAC__stream_decoder_process_single() - Tells the decoder to process at + * most one metadata block or audio frame and return, calling either the + * metadata callback or write callback, respectively, once. If the decoder + * loses sync it will return with only the error callback being called. + * - FLAC__stream_decoder_process_until_end_of_metadata() - Tells the decoder + * to process the stream from the current location and stop upon reaching + * the first audio frame. The client will get one metadata, write, or error + * callback per metadata block, audio frame, or sync error, respectively. + * - FLAC__stream_decoder_process_until_end_of_stream() - Tells the decoder + * to process the stream from the current location until the read callback + * returns FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM or + * FLAC__STREAM_DECODER_READ_STATUS_ABORT. The client will get one metadata, + * write, or error callback per metadata block, audio frame, or sync error, + * respectively. + * + * When the decoder has finished decoding (normally or through an abort), + * the instance is finished by calling FLAC__stream_decoder_finish(), which + * ensures the decoder is in the correct state and frees memory. Then the + * instance may be deleted with FLAC__stream_decoder_delete() or initialized + * again to decode another stream. + * + * Seeking is exposed through the FLAC__stream_decoder_seek_absolute() method. + * At any point after the stream decoder has been initialized, the client can + * call this function to seek to an exact sample within the stream. + * Subsequently, the first time the write callback is called it will be + * passed a (possibly partial) block starting at that sample. + * + * If the client cannot seek via the callback interface provided, but still + * has another way of seeking, it can flush the decoder using + * FLAC__stream_decoder_flush() and start feeding data from the new position + * through the read callback. + * + * The stream decoder also provides MD5 signature checking. If this is + * turned on before initialization, FLAC__stream_decoder_finish() will + * report when the decoded MD5 signature does not match the one stored + * in the STREAMINFO block. MD5 checking is automatically turned off + * (until the next FLAC__stream_decoder_reset()) if there is no signature + * in the STREAMINFO block or when a seek is attempted. + * + * The FLAC__stream_decoder_set_metadata_*() functions deserve special + * attention. By default, the decoder only calls the metadata_callback for + * the STREAMINFO block. These functions allow you to tell the decoder + * explicitly which blocks to parse and return via the metadata_callback + * and/or which to skip. Use a FLAC__stream_decoder_set_metadata_respond_all(), + * FLAC__stream_decoder_set_metadata_ignore() ... or FLAC__stream_decoder_set_metadata_ignore_all(), + * FLAC__stream_decoder_set_metadata_respond() ... sequence to exactly specify + * which blocks to return. Remember that metadata blocks can potentially + * be big (for example, cover art) so filtering out the ones you don't + * use can reduce the memory requirements of the decoder. Also note the + * special forms FLAC__stream_decoder_set_metadata_respond_application(id) + * and FLAC__stream_decoder_set_metadata_ignore_application(id) for + * filtering APPLICATION blocks based on the application ID. + * + * STREAMINFO and SEEKTABLE blocks are always parsed and used internally, but + * they still can legally be filtered from the metadata_callback. + * + * \note + * The "set" functions may only be called when the decoder is in the + * state FLAC__STREAM_DECODER_UNINITIALIZED, i.e. after + * FLAC__stream_decoder_new() or FLAC__stream_decoder_finish(), but + * before FLAC__stream_decoder_init_*(). If this is the case they will + * return \c true, otherwise \c false. + * + * \note + * FLAC__stream_decoder_finish() resets all settings to the constructor + * defaults, including the callbacks. + * + * \{ + */ + + +/** State values for a FLAC__StreamDecoder + * + * The decoder's state can be obtained by calling FLAC__stream_decoder_get_state(). + */ +typedef enum { + + FLAC__STREAM_DECODER_SEARCH_FOR_METADATA = 0, + /**< The decoder is ready to search for metadata. */ + + FLAC__STREAM_DECODER_READ_METADATA, + /**< The decoder is ready to or is in the process of reading metadata. */ + + FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC, + /**< The decoder is ready to or is in the process of searching for the + * frame sync code. + */ + + FLAC__STREAM_DECODER_READ_FRAME, + /**< The decoder is ready to or is in the process of reading a frame. */ + + FLAC__STREAM_DECODER_END_OF_STREAM, + /**< The decoder has reached the end of the stream. */ + + FLAC__STREAM_DECODER_OGG_ERROR, + /**< An error occurred in the underlying Ogg layer. */ + + FLAC__STREAM_DECODER_SEEK_ERROR, + /**< An error occurred while seeking. The decoder must be flushed + * with FLAC__stream_decoder_flush() or reset with + * FLAC__stream_decoder_reset() before decoding can continue. + */ + + FLAC__STREAM_DECODER_ABORTED, + /**< The decoder was aborted by the read callback. */ + + FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR, + /**< An error occurred allocating memory. The decoder is in an invalid + * state and can no longer be used. + */ + + FLAC__STREAM_DECODER_UNINITIALIZED + /**< The decoder is in the uninitialized state; one of the + * FLAC__stream_decoder_init_*() functions must be called before samples + * can be processed. + */ + +} FLAC__StreamDecoderState; + +/** Maps a FLAC__StreamDecoderState to a C string. + * + * Using a FLAC__StreamDecoderState as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderStateString[]; + + +/** Possible return values for the FLAC__stream_decoder_init_*() functions. + */ +typedef enum { + + FLAC__STREAM_DECODER_INIT_STATUS_OK = 0, + /**< Initialization was successful. */ + + FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER, + /**< The library was not compiled with support for the given container + * format. + */ + + FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS, + /**< A required callback was not supplied. */ + + FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR, + /**< An error occurred allocating memory. */ + + FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE, + /**< fopen() failed in FLAC__stream_decoder_init_file() or + * FLAC__stream_decoder_init_ogg_file(). */ + + FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED + /**< FLAC__stream_decoder_init_*() was called when the decoder was + * already initialized, usually because + * FLAC__stream_decoder_finish() was not called. + */ + +} FLAC__StreamDecoderInitStatus; + +/** Maps a FLAC__StreamDecoderInitStatus to a C string. + * + * Using a FLAC__StreamDecoderInitStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderInitStatusString[]; + + +/** Return values for the FLAC__StreamDecoder read callback. + */ +typedef enum { + + FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, + /**< The read was OK and decoding can continue. */ + + FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM, + /**< The read was attempted while at the end of the stream. Note that + * the client must only return this value when the read callback was + * called when already at the end of the stream. Otherwise, if the read + * itself moves to the end of the stream, the client should still return + * the data and \c FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, and then on + * the next read callback it should return + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM with a byte count + * of \c 0. + */ + + FLAC__STREAM_DECODER_READ_STATUS_ABORT + /**< An unrecoverable error occurred. The decoder will return from the process call. */ + +} FLAC__StreamDecoderReadStatus; + +/** Maps a FLAC__StreamDecoderReadStatus to a C string. + * + * Using a FLAC__StreamDecoderReadStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderReadStatusString[]; + + +/** Return values for the FLAC__StreamDecoder seek callback. + */ +typedef enum { + + FLAC__STREAM_DECODER_SEEK_STATUS_OK, + /**< The seek was OK and decoding can continue. */ + + FLAC__STREAM_DECODER_SEEK_STATUS_ERROR, + /**< An unrecoverable error occurred. The decoder will return from the process call. */ + + FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED + /**< Client does not support seeking. */ + +} FLAC__StreamDecoderSeekStatus; + +/** Maps a FLAC__StreamDecoderSeekStatus to a C string. + * + * Using a FLAC__StreamDecoderSeekStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderSeekStatusString[]; + + +/** Return values for the FLAC__StreamDecoder tell callback. + */ +typedef enum { + + FLAC__STREAM_DECODER_TELL_STATUS_OK, + /**< The tell was OK and decoding can continue. */ + + FLAC__STREAM_DECODER_TELL_STATUS_ERROR, + /**< An unrecoverable error occurred. The decoder will return from the process call. */ + + FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED + /**< Client does not support telling the position. */ + +} FLAC__StreamDecoderTellStatus; + +/** Maps a FLAC__StreamDecoderTellStatus to a C string. + * + * Using a FLAC__StreamDecoderTellStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderTellStatusString[]; + + +/** Return values for the FLAC__StreamDecoder length callback. + */ +typedef enum { + + FLAC__STREAM_DECODER_LENGTH_STATUS_OK, + /**< The length call was OK and decoding can continue. */ + + FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR, + /**< An unrecoverable error occurred. The decoder will return from the process call. */ + + FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED + /**< Client does not support reporting the length. */ + +} FLAC__StreamDecoderLengthStatus; + +/** Maps a FLAC__StreamDecoderLengthStatus to a C string. + * + * Using a FLAC__StreamDecoderLengthStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderLengthStatusString[]; + + +/** Return values for the FLAC__StreamDecoder write callback. + */ +typedef enum { + + FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE, + /**< The write was OK and decoding can continue. */ + + FLAC__STREAM_DECODER_WRITE_STATUS_ABORT + /**< An unrecoverable error occurred. The decoder will return from the process call. */ + +} FLAC__StreamDecoderWriteStatus; + +/** Maps a FLAC__StreamDecoderWriteStatus to a C string. + * + * Using a FLAC__StreamDecoderWriteStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[]; + + +/** Possible values passed back to the FLAC__StreamDecoder error callback. + * \c FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC is the generic catch- + * all. The rest could be caused by bad sync (false synchronization on + * data that is not the start of a frame) or corrupted data. The error + * itself is the decoder's best guess at what happened assuming a correct + * sync. For example \c FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER + * could be caused by a correct sync on the start of a frame, but some + * data in the frame header was corrupted. Or it could be the result of + * syncing on a point the stream that looked like the starting of a frame + * but was not. \c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM + * could be because the decoder encountered a valid frame made by a future + * version of the encoder which it cannot parse, or because of a false + * sync making it appear as though an encountered frame was generated by + * a future encoder. + */ +typedef enum { + + FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC, + /**< An error in the stream caused the decoder to lose synchronization. */ + + FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER, + /**< The decoder encountered a corrupted frame header. */ + + FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH, + /**< The frame's data did not match the CRC in the footer. */ + + FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM + /**< The decoder encountered reserved fields in use in the stream. */ + +} FLAC__StreamDecoderErrorStatus; + +/** Maps a FLAC__StreamDecoderErrorStatus to a C string. + * + * Using a FLAC__StreamDecoderErrorStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[]; + + +/*********************************************************************** + * + * class FLAC__StreamDecoder + * + ***********************************************************************/ + +struct FLAC__StreamDecoderProtected; +struct FLAC__StreamDecoderPrivate; +/** The opaque structure definition for the stream decoder type. + * See the \link flac_stream_decoder stream decoder module \endlink + * for a detailed description. + */ +typedef struct { + struct FLAC__StreamDecoderProtected *protected_; /* avoid the C++ keyword 'protected' */ + struct FLAC__StreamDecoderPrivate *private_; /* avoid the C++ keyword 'private' */ +} FLAC__StreamDecoder; + +/** Signature for the read callback. + * + * A function pointer matching this signature must be passed to + * FLAC__stream_decoder_init*_stream(). The supplied function will be + * called when the decoder needs more input data. The address of the + * buffer to be filled is supplied, along with the number of bytes the + * buffer can hold. The callback may choose to supply less data and + * modify the byte count but must be careful not to overflow the buffer. + * The callback then returns a status code chosen from + * FLAC__StreamDecoderReadStatus. + * + * Here is an example of a read callback for stdio streams: + * \code + * FLAC__StreamDecoderReadStatus read_cb(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * if(*bytes > 0) { + * *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, file); + * if(ferror(file)) + * return FLAC__STREAM_DECODER_READ_STATUS_ABORT; + * else if(*bytes == 0) + * return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; + * else + * return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; + * } + * else + * return FLAC__STREAM_DECODER_READ_STATUS_ABORT; + * } + * \endcode + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param buffer A pointer to a location for the callee to store + * data to be decoded. + * \param bytes A pointer to the size of the buffer. On entry + * to the callback, it contains the maximum number + * of bytes that may be stored in \a buffer. The + * callee must set it to the actual number of bytes + * stored (0 in case of error or end-of-stream) before + * returning. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__StreamDecoderReadStatus + * The callee's return status. Note that the callback should return + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM if and only if + * zero bytes were read and there is no more data to be read. + */ +typedef FLAC__StreamDecoderReadStatus (*FLAC__StreamDecoderReadCallback)(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data); + +/** Signature for the seek callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_decoder_init*_stream(). The supplied function will be + * called when the decoder needs to seek the input stream. The decoder + * will pass the absolute byte offset to seek to, 0 meaning the + * beginning of the stream. + * + * Here is an example of a seek callback for stdio streams: + * \code + * FLAC__StreamDecoderSeekStatus seek_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * if(file == stdin) + * return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED; + * else if(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0) + * return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR; + * else + * return FLAC__STREAM_DECODER_SEEK_STATUS_OK; + * } + * \endcode + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param absolute_byte_offset The offset from the beginning of the stream + * to seek to. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__StreamDecoderSeekStatus + * The callee's return status. + */ +typedef FLAC__StreamDecoderSeekStatus (*FLAC__StreamDecoderSeekCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data); + +/** Signature for the tell callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_decoder_init*_stream(). The supplied function will be + * called when the decoder wants to know the current position of the + * stream. The callback should return the byte offset from the + * beginning of the stream. + * + * Here is an example of a tell callback for stdio streams: + * \code + * FLAC__StreamDecoderTellStatus tell_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * off_t pos; + * if(file == stdin) + * return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED; + * else if((pos = ftello(file)) < 0) + * return FLAC__STREAM_DECODER_TELL_STATUS_ERROR; + * else { + * *absolute_byte_offset = (FLAC__uint64)pos; + * return FLAC__STREAM_DECODER_TELL_STATUS_OK; + * } + * } + * \endcode + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param absolute_byte_offset A pointer to storage for the current offset + * from the beginning of the stream. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__StreamDecoderTellStatus + * The callee's return status. + */ +typedef FLAC__StreamDecoderTellStatus (*FLAC__StreamDecoderTellCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data); + +/** Signature for the length callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_decoder_init*_stream(). The supplied function will be + * called when the decoder wants to know the total length of the stream + * in bytes. + * + * Here is an example of a length callback for stdio streams: + * \code + * FLAC__StreamDecoderLengthStatus length_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * struct stat filestats; + * + * if(file == stdin) + * return FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED; + * else if(fstat(fileno(file), &filestats) != 0) + * return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR; + * else { + * *stream_length = (FLAC__uint64)filestats.st_size; + * return FLAC__STREAM_DECODER_LENGTH_STATUS_OK; + * } + * } + * \endcode + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param stream_length A pointer to storage for the length of the stream + * in bytes. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__StreamDecoderLengthStatus + * The callee's return status. + */ +typedef FLAC__StreamDecoderLengthStatus (*FLAC__StreamDecoderLengthCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data); + +/** Signature for the EOF callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_decoder_init*_stream(). The supplied function will be + * called when the decoder needs to know if the end of the stream has + * been reached. + * + * Here is an example of a EOF callback for stdio streams: + * FLAC__bool eof_cb(const FLAC__StreamDecoder *decoder, void *client_data) + * \code + * { + * FILE *file = ((MyClientData*)client_data)->file; + * return feof(file)? true : false; + * } + * \endcode + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__bool + * \c true if the currently at the end of the stream, else \c false. + */ +typedef FLAC__bool (*FLAC__StreamDecoderEofCallback)(const FLAC__StreamDecoder *decoder, void *client_data); + +/** Signature for the write callback. + * + * A function pointer matching this signature must be passed to one of + * the FLAC__stream_decoder_init_*() functions. + * The supplied function will be called when the decoder has decoded a + * single audio frame. The decoder will pass the frame metadata as well + * as an array of pointers (one for each channel) pointing to the + * decoded audio. + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param frame The description of the decoded frame. See + * FLAC__Frame. + * \param buffer An array of pointers to decoded channels of data. + * Each pointer will point to an array of signed + * samples of length \a frame->header.blocksize. + * Channels will be ordered according to the FLAC + * specification; see the documentation for the + * frame header. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + * \retval FLAC__StreamDecoderWriteStatus + * The callee's return status. + */ +typedef FLAC__StreamDecoderWriteStatus (*FLAC__StreamDecoderWriteCallback)(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data); + +/** Signature for the metadata callback. + * + * A function pointer matching this signature must be passed to one of + * the FLAC__stream_decoder_init_*() functions. + * The supplied function will be called when the decoder has decoded a + * metadata block. In a valid FLAC file there will always be one + * \c STREAMINFO block, followed by zero or more other metadata blocks. + * These will be supplied by the decoder in the same order as they + * appear in the stream and always before the first audio frame (i.e. + * write callback). The metadata block that is passed in must not be + * modified, and it doesn't live beyond the callback, so you should make + * a copy of it with FLAC__metadata_object_clone() if you will need it + * elsewhere. Since metadata blocks can potentially be large, by + * default the decoder only calls the metadata callback for the + * \c STREAMINFO block; you can instruct the decoder to pass or filter + * other blocks with FLAC__stream_decoder_set_metadata_*() calls. + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param metadata The decoded metadata block. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + */ +typedef void (*FLAC__StreamDecoderMetadataCallback)(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data); + +/** Signature for the error callback. + * + * A function pointer matching this signature must be passed to one of + * the FLAC__stream_decoder_init_*() functions. + * The supplied function will be called whenever an error occurs during + * decoding. + * + * \note In general, FLAC__StreamDecoder functions which change the + * state should not be called on the \a decoder while in the callback. + * + * \param decoder The decoder instance calling the callback. + * \param status The error encountered by the decoder. + * \param client_data The callee's client data set through + * FLAC__stream_decoder_init_*(). + */ +typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); + + +/*********************************************************************** + * + * Class constructor/destructor + * + ***********************************************************************/ + +/** Create a new stream decoder instance. The instance is created with + * default settings; see the individual FLAC__stream_decoder_set_*() + * functions for each setting's default. + * + * \retval FLAC__StreamDecoder* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void); + +/** Free a decoder instance. Deletes the object pointed to by \a decoder. + * + * \param decoder A pointer to an existing decoder. + * \assert + * \code decoder != NULL \endcode + */ +FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder); + + +/*********************************************************************** + * + * Public class method prototypes + * + ***********************************************************************/ + +/** Set the serial number for the FLAC stream within the Ogg container. + * The default behavior is to use the serial number of the first Ogg + * page. Setting a serial number here will explicitly specify which + * stream is to be decoded. + * + * \note + * This does not need to be set for native FLAC decoding. + * + * \default \c use serial number of first page + * \param decoder A decoder instance to set. + * \param serial_number See above. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder *decoder, long serial_number); + +/** Set the "MD5 signature checking" flag. If \c true, the decoder will + * compute the MD5 signature of the unencoded audio data while decoding + * and compare it to the signature from the STREAMINFO block, if it + * exists, during FLAC__stream_decoder_finish(). + * + * MD5 signature checking will be turned off (until the next + * FLAC__stream_decoder_reset()) if there is no signature in the + * STREAMINFO block or when a seek is attempted. + * + * Clients that do not use the MD5 check should leave this off to speed + * up decoding. + * + * \default \c false + * \param decoder A decoder instance to set. + * \param value Flag value (see above). + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool value); + +/** Direct the decoder to pass on all metadata blocks of type \a type. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \param type See above. + * \assert + * \code decoder != NULL \endcode + * \a type is valid + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type); + +/** Direct the decoder to pass on all APPLICATION metadata blocks of the + * given \a id. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \param id See above. + * \assert + * \code decoder != NULL \endcode + * \code id != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]); + +/** Direct the decoder to pass on all metadata blocks of any type. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder); + +/** Direct the decoder to filter out all metadata blocks of type \a type. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \param type See above. + * \assert + * \code decoder != NULL \endcode + * \a type is valid + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type); + +/** Direct the decoder to filter out all APPLICATION metadata blocks of + * the given \a id. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \param id See above. + * \assert + * \code decoder != NULL \endcode + * \code id != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]); + +/** Direct the decoder to filter out all metadata blocks of any type. + * + * \default By default, only the \c STREAMINFO block is returned via the + * metadata callback. + * \param decoder A decoder instance to set. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if the decoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder); + +/** Get the current decoder state. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__StreamDecoderState + * The current decoder state. + */ +FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder); + +/** Get the current decoder state as a C string. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval const char * + * The decoder state as a C string. Do not modify the contents. + */ +FLAC_API const char *FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder); + +/** Get the "MD5 signature checking" flag. + * This is the value of the setting, not whether or not the decoder is + * currently checking the MD5 (remember, it can be turned off automatically + * by a seek). When the decoder is reset the flag will be restored to the + * value returned by this function. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * See above. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder); + +/** Get the total number of samples in the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the \c STREAMINFO block. A value of \c 0 means "unknown". + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval unsigned + * See above. + */ +FLAC_API FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder); + +/** Get the current number of channels in the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the most recently decoded frame header. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval unsigned + * See above. + */ +FLAC_API unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder); + +/** Get the current channel assignment in the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the most recently decoded frame header. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__ChannelAssignment + * See above. + */ +FLAC_API FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder); + +/** Get the current sample resolution in the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the most recently decoded frame header. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval unsigned + * See above. + */ +FLAC_API unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder); + +/** Get the current sample rate in Hz of the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the most recently decoded frame header. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval unsigned + * See above. + */ +FLAC_API unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder); + +/** Get the current blocksize of the stream being decoded. + * Will only be valid after decoding has started and will contain the + * value from the most recently decoded frame header. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval unsigned + * See above. + */ +FLAC_API unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder); + +/** Returns the decoder's current read position within the stream. + * The position is the byte offset from the start of the stream. + * Bytes before this position have been fully decoded. Note that + * there may still be undecoded bytes in the decoder's read FIFO. + * The returned position is correct even after a seek. + * + * \warning This function currently only works for native FLAC, + * not Ogg FLAC streams. + * + * \param decoder A decoder instance to query. + * \param position Address at which to return the desired position. + * \assert + * \code decoder != NULL \endcode + * \code position != NULL \endcode + * \retval FLAC__bool + * \c true if successful, \c false if the stream is not native FLAC, + * or there was an error from the 'tell' callback or it returned + * \c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FLAC__uint64 *position); + +/** Initialize the decoder instance to decode native FLAC streams. + * + * This flavor of initialization sets up the decoder to decode from a + * native FLAC stream. I/O is performed via callbacks to the client. + * For decoding from a plain file via filename or open FILE*, + * FLAC__stream_decoder_init_file() and FLAC__stream_decoder_init_FILE() + * provide a simpler interface. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \param decoder An uninitialized decoder instance. + * \param read_callback See FLAC__StreamDecoderReadCallback. This + * pointer must not be \c NULL. + * \param seek_callback See FLAC__StreamDecoderSeekCallback. This + * pointer may be \c NULL if seeking is not + * supported. If \a seek_callback is not \c NULL then a + * \a tell_callback, \a length_callback, and \a eof_callback must also be supplied. + * Alternatively, a dummy seek callback that just + * returns \c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param tell_callback See FLAC__StreamDecoderTellCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a tell_callback must also be supplied. + * Alternatively, a dummy tell callback that just + * returns \c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param length_callback See FLAC__StreamDecoderLengthCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a length_callback must also be supplied. + * Alternatively, a dummy length callback that just + * returns \c FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param eof_callback See FLAC__StreamDecoderEofCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a eof_callback must also be supplied. + * Alternatively, a dummy length callback that just + * returns \c false + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream( + FLAC__StreamDecoder *decoder, + FLAC__StreamDecoderReadCallback read_callback, + FLAC__StreamDecoderSeekCallback seek_callback, + FLAC__StreamDecoderTellCallback tell_callback, + FLAC__StreamDecoderLengthCallback length_callback, + FLAC__StreamDecoderEofCallback eof_callback, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Initialize the decoder instance to decode Ogg FLAC streams. + * + * This flavor of initialization sets up the decoder to decode from a + * FLAC stream in an Ogg container. I/O is performed via callbacks to the + * client. For decoding from a plain file via filename or open FILE*, + * FLAC__stream_decoder_init_ogg_file() and FLAC__stream_decoder_init_ogg_FILE() + * provide a simpler interface. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \note Support for Ogg FLAC in the library is optional. If this + * library has been built without support for Ogg FLAC, this function + * will return \c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER. + * + * \param decoder An uninitialized decoder instance. + * \param read_callback See FLAC__StreamDecoderReadCallback. This + * pointer must not be \c NULL. + * \param seek_callback See FLAC__StreamDecoderSeekCallback. This + * pointer may be \c NULL if seeking is not + * supported. If \a seek_callback is not \c NULL then a + * \a tell_callback, \a length_callback, and \a eof_callback must also be supplied. + * Alternatively, a dummy seek callback that just + * returns \c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param tell_callback See FLAC__StreamDecoderTellCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a tell_callback must also be supplied. + * Alternatively, a dummy tell callback that just + * returns \c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param length_callback See FLAC__StreamDecoderLengthCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a length_callback must also be supplied. + * Alternatively, a dummy length callback that just + * returns \c FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param eof_callback See FLAC__StreamDecoderEofCallback. This + * pointer may be \c NULL if not supported by the client. If + * \a seek_callback is not \c NULL then a + * \a eof_callback must also be supplied. + * Alternatively, a dummy length callback that just + * returns \c false + * may also be supplied, all though this is slightly + * less efficient for the decoder. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_stream( + FLAC__StreamDecoder *decoder, + FLAC__StreamDecoderReadCallback read_callback, + FLAC__StreamDecoderSeekCallback seek_callback, + FLAC__StreamDecoderTellCallback tell_callback, + FLAC__StreamDecoderLengthCallback length_callback, + FLAC__StreamDecoderEofCallback eof_callback, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Initialize the decoder instance to decode native FLAC files. + * + * This flavor of initialization sets up the decoder to decode from a + * plain native FLAC file. For non-stdio streams, you must use + * FLAC__stream_decoder_init_stream() and provide callbacks for the I/O. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \param decoder An uninitialized decoder instance. + * \param file An open FLAC file. The file should have been + * opened with mode \c "rb" and rewound. The file + * becomes owned by the decoder and should not be + * manipulated by the client while decoding. + * Unless \a file is \c stdin, it will be closed + * when FLAC__stream_decoder_finish() is called. + * Note however that seeking will not work when + * decoding from \c stdout since it is not seekable. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \code file != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE( + FLAC__StreamDecoder *decoder, + FILE *file, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Initialize the decoder instance to decode Ogg FLAC files. + * + * This flavor of initialization sets up the decoder to decode from a + * plain Ogg FLAC file. For non-stdio streams, you must use + * FLAC__stream_decoder_init_ogg_stream() and provide callbacks for the I/O. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \note Support for Ogg FLAC in the library is optional. If this + * library has been built without support for Ogg FLAC, this function + * will return \c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER. + * + * \param decoder An uninitialized decoder instance. + * \param file An open FLAC file. The file should have been + * opened with mode \c "rb" and rewound. The file + * becomes owned by the decoder and should not be + * manipulated by the client while decoding. + * Unless \a file is \c stdin, it will be closed + * when FLAC__stream_decoder_finish() is called. + * Note however that seeking will not work when + * decoding from \c stdout since it is not seekable. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \code file != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_FILE( + FLAC__StreamDecoder *decoder, + FILE *file, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Initialize the decoder instance to decode native FLAC files. + * + * This flavor of initialization sets up the decoder to decode from a plain + * native FLAC file. If POSIX fopen() semantics are not sufficient, (for + * example, with Unicode filenames on Windows), you must use + * FLAC__stream_decoder_init_FILE(), or FLAC__stream_decoder_init_stream() + * and provide callbacks for the I/O. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \param decoder An uninitialized decoder instance. + * \param filename The name of the file to decode from. The file will + * be opened with fopen(). Use \c NULL to decode from + * \c stdin. Note that \c stdin is not seekable. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_file( + FLAC__StreamDecoder *decoder, + const char *filename, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Initialize the decoder instance to decode Ogg FLAC files. + * + * This flavor of initialization sets up the decoder to decode from a plain + * Ogg FLAC file. If POSIX fopen() semantics are not sufficient, (for + * example, with Unicode filenames on Windows), you must use + * FLAC__stream_decoder_init_ogg_FILE(), or FLAC__stream_decoder_init_ogg_stream() + * and provide callbacks for the I/O. + * + * This function should be called after FLAC__stream_decoder_new() and + * FLAC__stream_decoder_set_*() but before any of the + * FLAC__stream_decoder_process_*() functions. Will set and return the + * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA + * if initialization succeeded. + * + * \note Support for Ogg FLAC in the library is optional. If this + * library has been built without support for Ogg FLAC, this function + * will return \c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER. + * + * \param decoder An uninitialized decoder instance. + * \param filename The name of the file to decode from. The file will + * be opened with fopen(). Use \c NULL to decode from + * \c stdin. Note that \c stdin is not seekable. + * \param write_callback See FLAC__StreamDecoderWriteCallback. This + * pointer must not be \c NULL. + * \param metadata_callback See FLAC__StreamDecoderMetadataCallback. This + * pointer may be \c NULL if the callback is not + * desired. + * \param error_callback See FLAC__StreamDecoderErrorCallback. This + * pointer must not be \c NULL. + * \param client_data This value will be supplied to callbacks in their + * \a client_data argument. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__StreamDecoderInitStatus + * \c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful; + * see FLAC__StreamDecoderInitStatus for the meanings of other return values. + */ +FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file( + FLAC__StreamDecoder *decoder, + const char *filename, + FLAC__StreamDecoderWriteCallback write_callback, + FLAC__StreamDecoderMetadataCallback metadata_callback, + FLAC__StreamDecoderErrorCallback error_callback, + void *client_data +); + +/** Finish the decoding process. + * Flushes the decoding buffer, releases resources, resets the decoder + * settings to their defaults, and returns the decoder state to + * FLAC__STREAM_DECODER_UNINITIALIZED. + * + * In the event of a prematurely-terminated decode, it is not strictly + * necessary to call this immediately before FLAC__stream_decoder_delete() + * but it is good practice to match every FLAC__stream_decoder_init_*() + * with a FLAC__stream_decoder_finish(). + * + * \param decoder An uninitialized decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if MD5 checking is on AND a STREAMINFO block was available + * AND the MD5 signature in the STREAMINFO block was non-zero AND the + * signature does not match the one computed by the decoder; else + * \c true. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder); + +/** Flush the stream input. + * The decoder's input buffer will be cleared and the state set to + * \c FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC. This will also turn + * off MD5 checking. + * + * \param decoder A decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c true if successful, else \c false if a memory allocation + * error occurs (in which case the state will be set to + * \c FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder); + +/** Reset the decoding process. + * The decoder's input buffer will be cleared and the state set to + * \c FLAC__STREAM_DECODER_SEARCH_FOR_METADATA. This is similar to + * FLAC__stream_decoder_finish() except that the settings are + * preserved; there is no need to call FLAC__stream_decoder_init_*() + * before decoding again. MD5 checking will be restored to its original + * setting. + * + * If the decoder is seekable, or was initialized with + * FLAC__stream_decoder_init*_FILE() or FLAC__stream_decoder_init*_file(), + * the decoder will also attempt to seek to the beginning of the file. + * If this rewind fails, this function will return \c false. It follows + * that FLAC__stream_decoder_reset() cannot be used when decoding from + * \c stdin. + * + * If the decoder was initialized with FLAC__stream_encoder_init*_stream() + * and is not seekable (i.e. no seek callback was provided or the seek + * callback returns \c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED), it + * is the duty of the client to start feeding data from the beginning of + * the stream on the next FLAC__stream_decoder_process() or + * FLAC__stream_decoder_process_interleaved() call. + * + * \param decoder A decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c true if successful, else \c false if a memory allocation occurs + * (in which case the state will be set to + * \c FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR) or a seek error + * occurs (the state will be unchanged). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder); + +/** Decode one metadata block or audio frame. + * This version instructs the decoder to decode a either a single metadata + * block or a single frame and stop, unless the callbacks return a fatal + * error or the read callback returns + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM. + * + * As the decoder needs more input it will call the read callback. + * Depending on what was decoded, the metadata or write callback will be + * called with the decoded metadata block or audio frame. + * + * Unless there is a fatal read error or end of stream, this function + * will return once one whole frame is decoded. In other words, if the + * stream is not synchronized or points to a corrupt frame header, the + * decoder will continue to try and resync until it gets to a valid + * frame, then decode one frame, then return. If the decoder points to + * a frame whose frame CRC in the frame footer does not match the + * computed frame CRC, this function will issue a + * FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH error to the + * error callback, and return, having decoded one complete, although + * corrupt, frame. (Such corrupted frames are sent as silence of the + * correct length to the write callback.) + * + * \param decoder An initialized decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if any fatal read, write, or memory allocation error + * occurred (meaning decoding must stop), else \c true; for more + * information about the decoder, check the decoder state with + * FLAC__stream_decoder_get_state(). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder); + +/** Decode until the end of the metadata. + * This version instructs the decoder to decode from the current position + * and continue until all the metadata has been read, or until the + * callbacks return a fatal error or the read callback returns + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM. + * + * As the decoder needs more input it will call the read callback. + * As each metadata block is decoded, the metadata callback will be called + * with the decoded metadata. + * + * \param decoder An initialized decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if any fatal read, write, or memory allocation error + * occurred (meaning decoding must stop), else \c true; for more + * information about the decoder, check the decoder state with + * FLAC__stream_decoder_get_state(). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder); + +/** Decode until the end of the stream. + * This version instructs the decoder to decode from the current position + * and continue until the end of stream (the read callback returns + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM), or until the + * callbacks return a fatal error. + * + * As the decoder needs more input it will call the read callback. + * As each metadata block and frame is decoded, the metadata or write + * callback will be called with the decoded metadata or frame. + * + * \param decoder An initialized decoder instance. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if any fatal read, write, or memory allocation error + * occurred (meaning decoding must stop), else \c true; for more + * information about the decoder, check the decoder state with + * FLAC__stream_decoder_get_state(). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder); + +/** Skip one audio frame. + * This version instructs the decoder to 'skip' a single frame and stop, + * unless the callbacks return a fatal error or the read callback returns + * \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM. + * + * The decoding flow is the same as what occurs when + * FLAC__stream_decoder_process_single() is called to process an audio + * frame, except that this function does not decode the parsed data into + * PCM or call the write callback. The integrity of the frame is still + * checked the same way as in the other process functions. + * + * This function will return once one whole frame is skipped, in the + * same way that FLAC__stream_decoder_process_single() will return once + * one whole frame is decoded. + * + * This function can be used in more quickly determining FLAC frame + * boundaries when decoding of the actual data is not needed, for + * example when an application is separating a FLAC stream into frames + * for editing or storing in a container. To do this, the application + * can use FLAC__stream_decoder_skip_single_frame() to quickly advance + * to the next frame, then use + * FLAC__stream_decoder_get_decode_position() to find the new frame + * boundary. + * + * This function should only be called when the stream has advanced + * past all the metadata, otherwise it will return \c false. + * + * \param decoder An initialized decoder instance not in a metadata + * state. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c false if any fatal read, write, or memory allocation error + * occurred (meaning decoding must stop), or if the decoder + * is in the FLAC__STREAM_DECODER_SEARCH_FOR_METADATA or + * FLAC__STREAM_DECODER_READ_METADATA state, else \c true; for more + * information about the decoder, check the decoder state with + * FLAC__stream_decoder_get_state(). + */ +FLAC_API FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder); + +/** Flush the input and seek to an absolute sample. + * Decoding will resume at the given sample. Note that because of + * this, the next write callback may contain a partial block. The + * client must support seeking the input or this function will fail + * and return \c false. Furthermore, if the decoder state is + * \c FLAC__STREAM_DECODER_SEEK_ERROR, then the decoder must be flushed + * with FLAC__stream_decoder_flush() or reset with + * FLAC__stream_decoder_reset() before decoding can continue. + * + * \param decoder A decoder instance. + * \param sample The target sample number to seek to. + * \assert + * \code decoder != NULL \endcode + * \retval FLAC__bool + * \c true if successful, else \c false. + */ +FLAC_API FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder *decoder, FLAC__uint64 sample); + +/* \} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_encoder.h b/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_encoder.h new file mode 100644 index 0000000..dbbbb23 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/FLAC/stream_encoder.h @@ -0,0 +1,1768 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * 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 the Xiph.org Foundation 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 FOUNDATION 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. + */ + +#ifndef FLAC__STREAM_ENCODER_H +#define FLAC__STREAM_ENCODER_H + +#include /* for FILE */ +#include "export.h" +#include "format.h" +#include "stream_decoder.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \file include/FLAC/stream_encoder.h + * + * \brief + * This module contains the functions which implement the stream + * encoder. + * + * See the detailed documentation in the + * \link flac_stream_encoder stream encoder \endlink module. + */ + +/** \defgroup flac_encoder FLAC/ \*_encoder.h: encoder interfaces + * \ingroup flac + * + * \brief + * This module describes the encoder layers provided by libFLAC. + * + * The stream encoder can be used to encode complete streams either to the + * client via callbacks, or directly to a file, depending on how it is + * initialized. When encoding via callbacks, the client provides a write + * callback which will be called whenever FLAC data is ready to be written. + * If the client also supplies a seek callback, the encoder will also + * automatically handle the writing back of metadata discovered while + * encoding, like stream info, seek points offsets, etc. When encoding to + * a file, the client needs only supply a filename or open \c FILE* and an + * optional progress callback for periodic notification of progress; the + * write and seek callbacks are supplied internally. For more info see the + * \link flac_stream_encoder stream encoder \endlink module. + */ + +/** \defgroup flac_stream_encoder FLAC/stream_encoder.h: stream encoder interface + * \ingroup flac_encoder + * + * \brief + * This module contains the functions which implement the stream + * encoder. + * + * The stream encoder can encode to native FLAC, and optionally Ogg FLAC + * (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files. + * + * The basic usage of this encoder is as follows: + * - The program creates an instance of an encoder using + * FLAC__stream_encoder_new(). + * - The program overrides the default settings using + * FLAC__stream_encoder_set_*() functions. At a minimum, the following + * functions should be called: + * - FLAC__stream_encoder_set_channels() + * - FLAC__stream_encoder_set_bits_per_sample() + * - FLAC__stream_encoder_set_sample_rate() + * - FLAC__stream_encoder_set_ogg_serial_number() (if encoding to Ogg FLAC) + * - FLAC__stream_encoder_set_total_samples_estimate() (if known) + * - If the application wants to control the compression level or set its own + * metadata, then the following should also be called: + * - FLAC__stream_encoder_set_compression_level() + * - FLAC__stream_encoder_set_verify() + * - FLAC__stream_encoder_set_metadata() + * - The rest of the set functions should only be called if the client needs + * exact control over how the audio is compressed; thorough understanding + * of the FLAC format is necessary to achieve good results. + * - The program initializes the instance to validate the settings and + * prepare for encoding using + * - FLAC__stream_encoder_init_stream() or FLAC__stream_encoder_init_FILE() + * or FLAC__stream_encoder_init_file() for native FLAC + * - FLAC__stream_encoder_init_ogg_stream() or FLAC__stream_encoder_init_ogg_FILE() + * or FLAC__stream_encoder_init_ogg_file() for Ogg FLAC + * - The program calls FLAC__stream_encoder_process() or + * FLAC__stream_encoder_process_interleaved() to encode data, which + * subsequently calls the callbacks when there is encoder data ready + * to be written. + * - The program finishes the encoding with FLAC__stream_encoder_finish(), + * which causes the encoder to encode any data still in its input pipe, + * update the metadata with the final encoding statistics if output + * seeking is possible, and finally reset the encoder to the + * uninitialized state. + * - The instance may be used again or deleted with + * FLAC__stream_encoder_delete(). + * + * In more detail, the stream encoder functions similarly to the + * \link flac_stream_decoder stream decoder \endlink, but has fewer + * callbacks and more options. Typically the client will create a new + * instance by calling FLAC__stream_encoder_new(), then set the necessary + * parameters with FLAC__stream_encoder_set_*(), and initialize it by + * calling one of the FLAC__stream_encoder_init_*() functions. + * + * Unlike the decoders, the stream encoder has many options that can + * affect the speed and compression ratio. When setting these parameters + * you should have some basic knowledge of the format (see the + * user-level documentation + * or the formal description). The + * FLAC__stream_encoder_set_*() functions themselves do not validate the + * values as many are interdependent. The FLAC__stream_encoder_init_*() + * functions will do this, so make sure to pay attention to the state + * returned by FLAC__stream_encoder_init_*() to make sure that it is + * FLAC__STREAM_ENCODER_INIT_STATUS_OK. Any parameters that are not set + * before FLAC__stream_encoder_init_*() will take on the defaults from + * the constructor. + * + * There are three initialization functions for native FLAC, one for + * setting up the encoder to encode FLAC data to the client via + * callbacks, and two for encoding directly to a file. + * + * For encoding via callbacks, use FLAC__stream_encoder_init_stream(). + * You must also supply a write callback which will be called anytime + * there is raw encoded data to write. If the client can seek the output + * it is best to also supply seek and tell callbacks, as this allows the + * encoder to go back after encoding is finished to write back + * information that was collected while encoding, like seek point offsets, + * frame sizes, etc. + * + * For encoding directly to a file, use FLAC__stream_encoder_init_FILE() + * or FLAC__stream_encoder_init_file(). Then you must only supply a + * filename or open \c FILE*; the encoder will handle all the callbacks + * internally. You may also supply a progress callback for periodic + * notification of the encoding progress. + * + * There are three similarly-named init functions for encoding to Ogg + * FLAC streams. Check \c FLAC_API_SUPPORTS_OGG_FLAC to find out if the + * library has been built with Ogg support. + * + * The call to FLAC__stream_encoder_init_*() currently will also immediately + * call the write callback several times, once with the \c fLaC signature, + * and once for each encoded metadata block. Note that for Ogg FLAC + * encoding you will usually get at least twice the number of callbacks than + * with native FLAC, one for the Ogg page header and one for the page body. + * + * After initializing the instance, the client may feed audio data to the + * encoder in one of two ways: + * + * - Channel separate, through FLAC__stream_encoder_process() - The client + * will pass an array of pointers to buffers, one for each channel, to + * the encoder, each of the same length. The samples need not be + * block-aligned, but each channel should have the same number of samples. + * - Channel interleaved, through + * FLAC__stream_encoder_process_interleaved() - The client will pass a single + * pointer to data that is channel-interleaved (i.e. channel0_sample0, + * channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). + * Again, the samples need not be block-aligned but they must be + * sample-aligned, i.e. the first value should be channel0_sample0 and + * the last value channelN_sampleM. + * + * Note that for either process call, each sample in the buffers should be a + * signed integer, right-justified to the resolution set by + * FLAC__stream_encoder_set_bits_per_sample(). For example, if the resolution + * is 16 bits per sample, the samples should all be in the range [-32768,32767]. + * + * When the client is finished encoding data, it calls + * FLAC__stream_encoder_finish(), which causes the encoder to encode any + * data still in its input pipe, and call the metadata callback with the + * final encoding statistics. Then the instance may be deleted with + * FLAC__stream_encoder_delete() or initialized again to encode another + * stream. + * + * For programs that write their own metadata, but that do not know the + * actual metadata until after encoding, it is advantageous to instruct + * the encoder to write a PADDING block of the correct size, so that + * instead of rewriting the whole stream after encoding, the program can + * just overwrite the PADDING block. If only the maximum size of the + * metadata is known, the program can write a slightly larger padding + * block, then split it after encoding. + * + * Make sure you understand how lengths are calculated. All FLAC metadata + * blocks have a 4 byte header which contains the type and length. This + * length does not include the 4 bytes of the header. See the format page + * for the specification of metadata blocks and their lengths. + * + * \note + * If you are writing the FLAC data to a file via callbacks, make sure it + * is open for update (e.g. mode "w+" for stdio streams). This is because + * after the first encoding pass, the encoder will try to seek back to the + * beginning of the stream, to the STREAMINFO block, to write some data + * there. (If using FLAC__stream_encoder_init*_file() or + * FLAC__stream_encoder_init*_FILE(), the file is managed internally.) + * + * \note + * The "set" functions may only be called when the encoder is in the + * state FLAC__STREAM_ENCODER_UNINITIALIZED, i.e. after + * FLAC__stream_encoder_new() or FLAC__stream_encoder_finish(), but + * before FLAC__stream_encoder_init_*(). If this is the case they will + * return \c true, otherwise \c false. + * + * \note + * FLAC__stream_encoder_finish() resets all settings to the constructor + * defaults. + * + * \{ + */ + + +/** State values for a FLAC__StreamEncoder. + * + * The encoder's state can be obtained by calling FLAC__stream_encoder_get_state(). + * + * If the encoder gets into any other state besides \c FLAC__STREAM_ENCODER_OK + * or \c FLAC__STREAM_ENCODER_UNINITIALIZED, it becomes invalid for encoding and + * must be deleted with FLAC__stream_encoder_delete(). + */ +typedef enum { + + FLAC__STREAM_ENCODER_OK = 0, + /**< The encoder is in the normal OK state and samples can be processed. */ + + FLAC__STREAM_ENCODER_UNINITIALIZED, + /**< The encoder is in the uninitialized state; one of the + * FLAC__stream_encoder_init_*() functions must be called before samples + * can be processed. + */ + + FLAC__STREAM_ENCODER_OGG_ERROR, + /**< An error occurred in the underlying Ogg layer. */ + + FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR, + /**< An error occurred in the underlying verify stream decoder; + * check FLAC__stream_encoder_get_verify_decoder_state(). + */ + + FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA, + /**< The verify decoder detected a mismatch between the original + * audio signal and the decoded audio signal. + */ + + FLAC__STREAM_ENCODER_CLIENT_ERROR, + /**< One of the callbacks returned a fatal error. */ + + FLAC__STREAM_ENCODER_IO_ERROR, + /**< An I/O error occurred while opening/reading/writing a file. + * Check \c errno. + */ + + FLAC__STREAM_ENCODER_FRAMING_ERROR, + /**< An error occurred while writing the stream; usually, the + * write_callback returned an error. + */ + + FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR + /**< Memory allocation failed. */ + +} FLAC__StreamEncoderState; + +/** Maps a FLAC__StreamEncoderState to a C string. + * + * Using a FLAC__StreamEncoderState as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderStateString[]; + + +/** Possible return values for the FLAC__stream_encoder_init_*() functions. + */ +typedef enum { + + FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0, + /**< Initialization was successful. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR, + /**< General failure to set up encoder; call FLAC__stream_encoder_get_state() for cause. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER, + /**< The library was not compiled with support for the given container + * format. + */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS, + /**< A required callback was not supplied. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS, + /**< The encoder has an invalid setting for number of channels. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE, + /**< The encoder has an invalid setting for bits-per-sample. + * FLAC supports 4-32 bps but the reference encoder currently supports + * only up to 24 bps. + */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE, + /**< The encoder has an invalid setting for the input sample rate. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE, + /**< The encoder has an invalid setting for the block size. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER, + /**< The encoder has an invalid setting for the maximum LPC order. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION, + /**< The encoder has an invalid setting for the precision of the quantized linear predictor coefficients. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER, + /**< The specified block size is less than the maximum LPC order. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE, + /**< The encoder is bound to the Subset but other settings violate it. */ + + FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA, + /**< The metadata input to the encoder is invalid, in one of the following ways: + * - FLAC__stream_encoder_set_metadata() was called with a null pointer but a block count > 0 + * - One of the metadata blocks contains an undefined type + * - It contains an illegal CUESHEET as checked by FLAC__format_cuesheet_is_legal() + * - It contains an illegal SEEKTABLE as checked by FLAC__format_seektable_is_legal() + * - It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block + */ + + FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED + /**< FLAC__stream_encoder_init_*() was called when the encoder was + * already initialized, usually because + * FLAC__stream_encoder_finish() was not called. + */ + +} FLAC__StreamEncoderInitStatus; + +/** Maps a FLAC__StreamEncoderInitStatus to a C string. + * + * Using a FLAC__StreamEncoderInitStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderInitStatusString[]; + + +/** Return values for the FLAC__StreamEncoder read callback. + */ +typedef enum { + + FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE, + /**< The read was OK and decoding can continue. */ + + FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM, + /**< The read was attempted at the end of the stream. */ + + FLAC__STREAM_ENCODER_READ_STATUS_ABORT, + /**< An unrecoverable error occurred. */ + + FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED + /**< Client does not support reading back from the output. */ + +} FLAC__StreamEncoderReadStatus; + +/** Maps a FLAC__StreamEncoderReadStatus to a C string. + * + * Using a FLAC__StreamEncoderReadStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderReadStatusString[]; + + +/** Return values for the FLAC__StreamEncoder write callback. + */ +typedef enum { + + FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0, + /**< The write was OK and encoding can continue. */ + + FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR + /**< An unrecoverable error occurred. The encoder will return from the process call. */ + +} FLAC__StreamEncoderWriteStatus; + +/** Maps a FLAC__StreamEncoderWriteStatus to a C string. + * + * Using a FLAC__StreamEncoderWriteStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderWriteStatusString[]; + + +/** Return values for the FLAC__StreamEncoder seek callback. + */ +typedef enum { + + FLAC__STREAM_ENCODER_SEEK_STATUS_OK, + /**< The seek was OK and encoding can continue. */ + + FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR, + /**< An unrecoverable error occurred. */ + + FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED + /**< Client does not support seeking. */ + +} FLAC__StreamEncoderSeekStatus; + +/** Maps a FLAC__StreamEncoderSeekStatus to a C string. + * + * Using a FLAC__StreamEncoderSeekStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderSeekStatusString[]; + + +/** Return values for the FLAC__StreamEncoder tell callback. + */ +typedef enum { + + FLAC__STREAM_ENCODER_TELL_STATUS_OK, + /**< The tell was OK and encoding can continue. */ + + FLAC__STREAM_ENCODER_TELL_STATUS_ERROR, + /**< An unrecoverable error occurred. */ + + FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED + /**< Client does not support seeking. */ + +} FLAC__StreamEncoderTellStatus; + +/** Maps a FLAC__StreamEncoderTellStatus to a C string. + * + * Using a FLAC__StreamEncoderTellStatus as the index to this array + * will give the string equivalent. The contents should not be modified. + */ +extern FLAC_API const char * const FLAC__StreamEncoderTellStatusString[]; + + +/*********************************************************************** + * + * class FLAC__StreamEncoder + * + ***********************************************************************/ + +struct FLAC__StreamEncoderProtected; +struct FLAC__StreamEncoderPrivate; +/** The opaque structure definition for the stream encoder type. + * See the \link flac_stream_encoder stream encoder module \endlink + * for a detailed description. + */ +typedef struct { + struct FLAC__StreamEncoderProtected *protected_; /* avoid the C++ keyword 'protected' */ + struct FLAC__StreamEncoderPrivate *private_; /* avoid the C++ keyword 'private' */ +} FLAC__StreamEncoder; + +/** Signature for the read callback. + * + * A function pointer matching this signature must be passed to + * FLAC__stream_encoder_init_ogg_stream() if seeking is supported. + * The supplied function will be called when the encoder needs to read back + * encoded data. This happens during the metadata callback, when the encoder + * has to read, modify, and rewrite the metadata (e.g. seekpoints) gathered + * while encoding. The address of the buffer to be filled is supplied, along + * with the number of bytes the buffer can hold. The callback may choose to + * supply less data and modify the byte count but must be careful not to + * overflow the buffer. The callback then returns a status code chosen from + * FLAC__StreamEncoderReadStatus. + * + * Here is an example of a read callback for stdio streams: + * \code + * FLAC__StreamEncoderReadStatus read_cb(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * if(*bytes > 0) { + * *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, file); + * if(ferror(file)) + * return FLAC__STREAM_ENCODER_READ_STATUS_ABORT; + * else if(*bytes == 0) + * return FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM; + * else + * return FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE; + * } + * else + * return FLAC__STREAM_ENCODER_READ_STATUS_ABORT; + * } + * \endcode + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param buffer A pointer to a location for the callee to store + * data to be encoded. + * \param bytes A pointer to the size of the buffer. On entry + * to the callback, it contains the maximum number + * of bytes that may be stored in \a buffer. The + * callee must set it to the actual number of bytes + * stored (0 in case of error or end-of-stream) before + * returning. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_set_client_data(). + * \retval FLAC__StreamEncoderReadStatus + * The callee's return status. + */ +typedef FLAC__StreamEncoderReadStatus (*FLAC__StreamEncoderReadCallback)(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data); + +/** Signature for the write callback. + * + * A function pointer matching this signature must be passed to + * FLAC__stream_encoder_init*_stream(). The supplied function will be called + * by the encoder anytime there is raw encoded data ready to write. It may + * include metadata mixed with encoded audio frames and the data is not + * guaranteed to be aligned on frame or metadata block boundaries. + * + * The only duty of the callback is to write out the \a bytes worth of data + * in \a buffer to the current position in the output stream. The arguments + * \a samples and \a current_frame are purely informational. If \a samples + * is greater than \c 0, then \a current_frame will hold the current frame + * number that is being written; otherwise it indicates that the write + * callback is being called to write metadata. + * + * \note + * Unlike when writing to native FLAC, when writing to Ogg FLAC the + * write callback will be called twice when writing each audio + * frame; once for the page header, and once for the page body. + * When writing the page header, the \a samples argument to the + * write callback will be \c 0. + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param buffer An array of encoded data of length \a bytes. + * \param bytes The byte length of \a buffer. + * \param samples The number of samples encoded by \a buffer. + * \c 0 has a special meaning; see above. + * \param current_frame The number of the current frame being encoded. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_init_*(). + * \retval FLAC__StreamEncoderWriteStatus + * The callee's return status. + */ +typedef FLAC__StreamEncoderWriteStatus (*FLAC__StreamEncoderWriteCallback)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data); + +/** Signature for the seek callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_encoder_init*_stream(). The supplied function will be called + * when the encoder needs to seek the output stream. The encoder will pass + * the absolute byte offset to seek to, 0 meaning the beginning of the stream. + * + * Here is an example of a seek callback for stdio streams: + * \code + * FLAC__StreamEncoderSeekStatus seek_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * if(file == stdin) + * return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; + * else if(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0) + * return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR; + * else + * return FLAC__STREAM_ENCODER_SEEK_STATUS_OK; + * } + * \endcode + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param absolute_byte_offset The offset from the beginning of the stream + * to seek to. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_init_*(). + * \retval FLAC__StreamEncoderSeekStatus + * The callee's return status. + */ +typedef FLAC__StreamEncoderSeekStatus (*FLAC__StreamEncoderSeekCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data); + +/** Signature for the tell callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_encoder_init*_stream(). The supplied function will be called + * when the encoder needs to know the current position of the output stream. + * + * \warning + * The callback must return the true current byte offset of the output to + * which the encoder is writing. If you are buffering the output, make + * sure and take this into account. If you are writing directly to a + * FILE* from your write callback, ftell() is sufficient. If you are + * writing directly to a file descriptor from your write callback, you + * can use lseek(fd, SEEK_CUR, 0). The encoder may later seek back to + * these points to rewrite metadata after encoding. + * + * Here is an example of a tell callback for stdio streams: + * \code + * FLAC__StreamEncoderTellStatus tell_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data) + * { + * FILE *file = ((MyClientData*)client_data)->file; + * off_t pos; + * if(file == stdin) + * return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; + * else if((pos = ftello(file)) < 0) + * return FLAC__STREAM_ENCODER_TELL_STATUS_ERROR; + * else { + * *absolute_byte_offset = (FLAC__uint64)pos; + * return FLAC__STREAM_ENCODER_TELL_STATUS_OK; + * } + * } + * \endcode + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param absolute_byte_offset The address at which to store the current + * position of the output. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_init_*(). + * \retval FLAC__StreamEncoderTellStatus + * The callee's return status. + */ +typedef FLAC__StreamEncoderTellStatus (*FLAC__StreamEncoderTellCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data); + +/** Signature for the metadata callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_encoder_init*_stream(). The supplied function will be called + * once at the end of encoding with the populated STREAMINFO structure. This + * is so the client can seek back to the beginning of the file and write the + * STREAMINFO block with the correct statistics after encoding (like + * minimum/maximum frame size and total samples). + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param metadata The final populated STREAMINFO block. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_init_*(). + */ +typedef void (*FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data); + +/** Signature for the progress callback. + * + * A function pointer matching this signature may be passed to + * FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE(). + * The supplied function will be called when the encoder has finished + * writing a frame. The \c total_frames_estimate argument to the + * callback will be based on the value from + * FLAC__stream_encoder_set_total_samples_estimate(). + * + * \note In general, FLAC__StreamEncoder functions which change the + * state should not be called on the \a encoder while in the callback. + * + * \param encoder The encoder instance calling the callback. + * \param bytes_written Bytes written so far. + * \param samples_written Samples written so far. + * \param frames_written Frames written so far. + * \param total_frames_estimate The estimate of the total number of + * frames to be written. + * \param client_data The callee's client data set through + * FLAC__stream_encoder_init_*(). + */ +typedef void (*FLAC__StreamEncoderProgressCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data); + + +/*********************************************************************** + * + * Class constructor/destructor + * + ***********************************************************************/ + +/** Create a new stream encoder instance. The instance is created with + * default settings; see the individual FLAC__stream_encoder_set_*() + * functions for each setting's default. + * + * \retval FLAC__StreamEncoder* + * \c NULL if there was an error allocating memory, else the new instance. + */ +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void); + +/** Free an encoder instance. Deletes the object pointed to by \a encoder. + * + * \param encoder A pointer to an existing encoder. + * \assert + * \code encoder != NULL \endcode + */ +FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder); + + +/*********************************************************************** + * + * Public class method prototypes + * + ***********************************************************************/ + +/** Set the serial number for the FLAC stream to use in the Ogg container. + * + * \note + * This does not need to be set for native FLAC encoding. + * + * \note + * It is recommended to set a serial number explicitly as the default of '0' + * may collide with other streams. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param serial_number See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_ogg_serial_number(FLAC__StreamEncoder *encoder, long serial_number); + +/** Set the "verify" flag. If \c true, the encoder will verify it's own + * encoded output by feeding it through an internal decoder and comparing + * the original signal against the decoded signal. If a mismatch occurs, + * the process call will return \c false. Note that this will slow the + * encoding process by the extra time required for decoding and comparison. + * + * \default \c false + * \param encoder An encoder instance to set. + * \param value Flag value (see above). + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value); + +/** Set the Subset flag. If \c true, + * the encoder will comply with the Subset and will check the + * settings during FLAC__stream_encoder_init_*() to see if all settings + * comply. If \c false, the settings may take advantage of the full + * range that the format allows. + * + * Make sure you know what it entails before setting this to \c false. + * + * \default \c true + * \param encoder An encoder instance to set. + * \param value Flag value (see above). + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value); + +/** Set the number of channels to be encoded. + * + * \default \c 2 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set the sample resolution of the input to be encoded. + * + * \warning + * Do not feed the encoder data that is wider than the value you + * set here or you will generate an invalid stream. + * + * \default \c 16 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set the sample rate (in Hz) of the input to be encoded. + * + * \default \c 44100 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set the compression level + * + * The compression level is roughly proportional to the amount of effort + * the encoder expends to compress the file. A higher level usually + * means more computation but higher compression. The default level is + * suitable for most applications. + * + * Currently the levels range from \c 0 (fastest, least compression) to + * \c 8 (slowest, most compression). A value larger than \c 8 will be + * treated as \c 8. + * + * This function automatically calls the following other \c _set_ + * functions with appropriate values, so the client does not need to + * unless it specifically wants to override them: + * - FLAC__stream_encoder_set_do_mid_side_stereo() + * - FLAC__stream_encoder_set_loose_mid_side_stereo() + * - FLAC__stream_encoder_set_apodization() + * - FLAC__stream_encoder_set_max_lpc_order() + * - FLAC__stream_encoder_set_qlp_coeff_precision() + * - FLAC__stream_encoder_set_do_qlp_coeff_prec_search() + * - FLAC__stream_encoder_set_do_escape_coding() + * - FLAC__stream_encoder_set_do_exhaustive_model_search() + * - FLAC__stream_encoder_set_min_residual_partition_order() + * - FLAC__stream_encoder_set_max_residual_partition_order() + * - FLAC__stream_encoder_set_rice_parameter_search_dist() + * + * The actual values set for each level are: + * + * + * + * + * + * + * + * + * + * + * + * + *
level + * do mid-side stereo + * loose mid-side stereo + * apodization + * max lpc order + * qlp coeff precision + * qlp coeff prec search + * escape coding + * exhaustive model search + * min residual partition order + * max residual partition order + * rice parameter search dist + *
0 false false tukey(0.5) 0 0 false false false 0 3 0
1 true true tukey(0.5) 0 0 false false false 0 3 0
2 true false tukey(0.5) 0 0 false false false 0 3 0
3 false false tukey(0.5) 6 0 false false false 0 4 0
4 true true tukey(0.5) 8 0 false false false 0 4 0
5 true false tukey(0.5) 8 0 false false false 0 5 0
6 true false tukey(0.5) 8 0 false false false 0 6 0
7 true false tukey(0.5) 8 0 false false true 0 6 0
8 true false tukey(0.5) 12 0 false false true 0 6 0
+ * + * \default \c 5 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set the blocksize to use while encoding. + * + * The number of samples to use per frame. Use \c 0 to let the encoder + * estimate a blocksize; this is usually best. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set to \c true to enable mid-side encoding on stereo input. The + * number of channels must be 2 for this to have any effect. Set to + * \c false to use only independent channel coding. + * + * \default \c false + * \param encoder An encoder instance to set. + * \param value Flag value (see above). + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value); + +/** Set to \c true to enable adaptive switching between mid-side and + * left-right encoding on stereo input. Set to \c false to use + * exhaustive searching. Setting this to \c true requires + * FLAC__stream_encoder_set_do_mid_side_stereo() to also be set to + * \c true in order to have any effect. + * + * \default \c false + * \param encoder An encoder instance to set. + * \param value Flag value (see above). + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value); + +/** Sets the apodization function(s) the encoder will use when windowing + * audio data for LPC analysis. + * + * The \a specification is a plain ASCII string which specifies exactly + * which functions to use. There may be more than one (up to 32), + * separated by \c ';' characters. Some functions take one or more + * comma-separated arguments in parentheses. + * + * The available functions are \c bartlett, \c bartlett_hann, + * \c blackman, \c blackman_harris_4term_92db, \c connes, \c flattop, + * \c gauss(STDDEV), \c hamming, \c hann, \c kaiser_bessel, \c nuttall, + * \c rectangle, \c triangle, \c tukey(P), \c welch. + * + * For \c gauss(STDDEV), STDDEV specifies the standard deviation + * (0blocksize / (2 ^ order). + * + * Set both min and max values to \c 0 to force a single context, + * whose Rice parameter is based on the residual signal variance. + * Otherwise, set a min and max order, and the encoder will search + * all orders, using the mean of each context for its Rice parameter, + * and use the best. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set the maximum partition order to search when coding the residual. + * This is used in tandem with + * FLAC__stream_encoder_set_min_residual_partition_order(). + * + * The partition order determines the context size in the residual. + * The context size will be approximately blocksize / (2 ^ order). + * + * Set both min and max values to \c 0 to force a single context, + * whose Rice parameter is based on the residual signal variance. + * Otherwise, set a min and max order, and the encoder will search + * all orders, using the mean of each context for its Rice parameter, + * and use the best. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value); + +/** Deprecated. Setting this value has no effect. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, unsigned value); + +/** Set an estimate of the total samples that will be encoded. + * This is merely an estimate and may be set to \c 0 if unknown. + * This value will be written to the STREAMINFO block before encoding, + * and can remove the need for the caller to rewrite the value later + * if the value is known before encoding. + * + * \default \c 0 + * \param encoder An encoder instance to set. + * \param value See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value); + +/** Set the metadata blocks to be emitted to the stream before encoding. + * A value of \c NULL, \c 0 implies no metadata; otherwise, supply an + * array of pointers to metadata blocks. The array is non-const since + * the encoder may need to change the \a is_last flag inside them, and + * in some cases update seek point offsets. Otherwise, the encoder will + * not modify or free the blocks. It is up to the caller to free the + * metadata blocks after encoding finishes. + * + * \note + * The encoder stores only copies of the pointers in the \a metadata array; + * the metadata blocks themselves must survive at least until after + * FLAC__stream_encoder_finish() returns. Do not free the blocks until then. + * + * \note + * The STREAMINFO block is always written and no STREAMINFO block may + * occur in the supplied array. + * + * \note + * By default the encoder does not create a SEEKTABLE. If one is supplied + * in the \a metadata array, but the client has specified that it does not + * support seeking, then the SEEKTABLE will be written verbatim. However + * by itself this is not very useful as the client will not know the stream + * offsets for the seekpoints ahead of time. In order to get a proper + * seektable the client must support seeking. See next note. + * + * \note + * SEEKTABLE blocks are handled specially. Since you will not know + * the values for the seek point stream offsets, you should pass in + * a SEEKTABLE 'template', that is, a SEEKTABLE object with the + * required sample numbers (or placeholder points), with \c 0 for the + * \a frame_samples and \a stream_offset fields for each point. If the + * client has specified that it supports seeking by providing a seek + * callback to FLAC__stream_encoder_init_stream() or both seek AND read + * callback to FLAC__stream_encoder_init_ogg_stream() (or by using + * FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), + * then while it is encoding the encoder will fill the stream offsets in + * for you and when encoding is finished, it will seek back and write the + * real values into the SEEKTABLE block in the stream. There are helper + * routines for manipulating seektable template blocks; see metadata.h: + * FLAC__metadata_object_seektable_template_*(). If the client does + * not support seeking, the SEEKTABLE will have inaccurate offsets which + * will slow down or remove the ability to seek in the FLAC stream. + * + * \note + * The encoder instance \b will modify the first \c SEEKTABLE block + * as it transforms the template to a valid seektable while encoding, + * but it is still up to the caller to free all metadata blocks after + * encoding. + * + * \note + * A VORBIS_COMMENT block may be supplied. The vendor string in it + * will be ignored. libFLAC will use it's own vendor string. libFLAC + * will not modify the passed-in VORBIS_COMMENT's vendor string, it + * will simply write it's own into the stream. If no VORBIS_COMMENT + * block is present in the \a metadata array, libFLAC will write an + * empty one, containing only the vendor string. + * + * \note The Ogg FLAC mapping requires that the VORBIS_COMMENT block be + * the second metadata block of the stream. The encoder already supplies + * the STREAMINFO block automatically. If \a metadata does not contain a + * VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if + * \a metadata does contain a VORBIS_COMMENT block and it is not the + * first, the init function will reorder \a metadata by moving the + * VORBIS_COMMENT block to the front; the relative ordering of the other + * blocks will remain as they were. + * + * \note The Ogg FLAC mapping limits the number of metadata blocks per + * stream to \c 65535. If \a num_blocks exceeds this the function will + * return \c false. + * + * \default \c NULL, 0 + * \param encoder An encoder instance to set. + * \param metadata See above. + * \param num_blocks See above. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * \c false if the encoder is already initialized, else \c true. + * \c false if the encoder is already initialized, or if + * \a num_blocks > 65535 if encoding to Ogg FLAC, else \c true. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks); + +/** Get the current encoder state. + * + * \param encoder An encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__StreamEncoderState + * The current encoder state. + */ +FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder); + +/** Get the state of the verify stream decoder. + * Useful when the stream encoder state is + * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR. + * + * \param encoder An encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__StreamDecoderState + * The verify stream decoder state. + */ +FLAC_API FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder); + +/** Get the current encoder state as a C string. + * This version automatically resolves + * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR by getting the + * verify decoder's state. + * + * \param encoder A encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval const char * + * The encoder state as a C string. Do not modify the contents. + */ +FLAC_API const char *FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder); + +/** Get relevant values about the nature of a verify decoder error. + * Useful when the stream encoder state is + * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR. The arguments should + * be addresses in which the stats will be returned, or NULL if value + * is not desired. + * + * \param encoder An encoder instance to query. + * \param absolute_sample The absolute sample number of the mismatch. + * \param frame_number The number of the frame in which the mismatch occurred. + * \param channel The channel in which the mismatch occurred. + * \param sample The number of the sample (relative to the frame) in + * which the mismatch occurred. + * \param expected The expected value for the sample in question. + * \param got The actual value returned by the decoder. + * \assert + * \code encoder != NULL \endcode + */ +FLAC_API void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got); + +/** Get the "verify" flag. + * + * \param encoder An encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval FLAC__bool + * See FLAC__stream_encoder_set_verify(). + */ +FLAC_API FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder); + +/** Get the frame header. + * + * \param encoder An initialized encoder instance in the OK state. + * \param buffer An array of pointers to each channel's signal. + * \param samples The number of samples in one channel. + * \assert + * \code encoder != NULL \endcode + * \code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \endcode + * \retval FLAC__bool + * \c true if successful, else \c false; in this case, check the + * encoder state with FLAC__stream_encoder_get_state() to see what + * went wrong. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples); + +/** Submit data for encoding. + * This version allows you to supply the input data where the channels + * are interleaved into a single array (i.e. channel0_sample0, + * channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). + * The samples need not be block-aligned but they must be + * sample-aligned, i.e. the first value should be channel0_sample0 + * and the last value channelN_sampleM. Each sample should be a signed + * integer, right-justified to the resolution set by + * FLAC__stream_encoder_set_bits_per_sample(). For example, if the + * resolution is 16 bits per sample, the samples should all be in the + * range [-32768,32767]. + * + * For applications where channel order is important, channels must + * follow the order as described in the + * frame header. + * + * \param encoder An initialized encoder instance in the OK state. + * \param buffer An array of channel-interleaved data (see above). + * \param samples The number of samples in one channel, the same as for + * FLAC__stream_encoder_process(). For example, if + * encoding two channels, \c 1000 \a samples corresponds + * to a \a buffer of 2000 values. + * \assert + * \code encoder != NULL \endcode + * \code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \endcode + * \retval FLAC__bool + * \c true if successful, else \c false; in this case, check the + * encoder state with FLAC__stream_encoder_get_state() to see what + * went wrong. + */ +FLAC_API FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples); + +/* \} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/alcompat.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/alcompat.h new file mode 100644 index 0000000..23b1bb4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/alcompat.h @@ -0,0 +1,22 @@ +#ifndef __al_included_allegro5_alcompat_h +#define __al_included_allegro5_alcompat_h + +#ifdef __cplusplus + extern "C" { +#endif + + +#define ALLEGRO_DST_COLOR (ALLEGRO_DEST_COLOR) +#define ALLEGRO_INVERSE_DST_COLOR (ALLEGRO_INVERSE_DEST_COLOR) + +#define al_current_time() (al_get_time()) +#define al_event_queue_is_empty(q) (al_is_event_queue_empty(q)) + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/alinline.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/alinline.h new file mode 100644 index 0000000..23773f4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/alinline.h @@ -0,0 +1,32 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Inline functions (generic C). + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#include "allegro5/inline/gfx.inl" + +#include "allegro5/inline/color.inl" + +#include "allegro5/inline/draw.inl" + +#include "allegro5/inline/fmaths.inl" + +#include "allegro5/inline/3dmaths.inl" + +#include "allegro5/inline/matrix.inl" + +/* alcompat.h includes some inline functions */ +#include "allegro5/alcompat.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro.h new file mode 100644 index 0000000..3fb7488 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro.h @@ -0,0 +1,73 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Main header file for the entire Allegro library. + * (separate modules can be included from the allegro/ directory) + * + * By Shawn Hargreaves. + * + * Vincent Penquerc'h split the original allegro.h into separate headers. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_allegro_h +#define __al_included_allegro5_allegro_h + + +#include "allegro5/base.h" + +#include "allegro5/altime.h" +#include "allegro5/bitmap.h" +#include "allegro5/bitmap_draw.h" +#include "allegro5/bitmap_io.h" +#include "allegro5/bitmap_lock.h" +#include "allegro5/blender.h" +#include "allegro5/color.h" +#include "allegro5/config.h" +#include "allegro5/debug.h" +#include "allegro5/display.h" +#include "allegro5/drawing.h" +#include "allegro5/error.h" +#include "allegro5/events.h" +#include "allegro5/file.h" +#include "allegro5/fixed.h" +#include "allegro5/fmaths.h" +#include "allegro5/fshook.h" +#include "allegro5/fullscreen_mode.h" +#include "allegro5/joystick.h" +#include "allegro5/keyboard.h" +#include "allegro5/memory.h" +#include "allegro5/monitor.h" +#include "allegro5/mouse.h" +#include "allegro5/mouse_cursor.h" +#include "allegro5/path.h" +#include "allegro5/system.h" +#include "allegro5/threads.h" +#include "allegro5/timer.h" +#include "allegro5/tls.h" +#include "allegro5/transformations.h" +#include "allegro5/utf8.h" + + +#ifndef ALLEGRO_NO_COMPATIBILITY + #include "allegro5/alcompat.h" +#endif + + +#ifdef ALLEGRO_EXTRA_HEADER + #include ALLEGRO_EXTRA_HEADER +#endif + + +#endif + + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro5.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro5.h new file mode 100644 index 0000000..8e604c6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro5.h @@ -0,0 +1,2 @@ +#include "allegro.h" + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_acodec.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_acodec.h new file mode 100644 index 0000000..a107ad6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_acodec.h @@ -0,0 +1,40 @@ +#ifndef __al_included_allegro5_allegro_acodec_h +#define __al_included_allegro5_allegro_acodec_h + +#include "allegro5/allegro.h" +#include "allegro5/allegro_audio.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_ACODEC_SRC + #define _ALLEGRO_ACODEC_DLL __declspec(dllexport) + #else + #define _ALLEGRO_ACODEC_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_ACODEC_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_ACODEC_FUNC(type, name, args) _ALLEGRO_ACODEC_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_ACODEC_FUNC(type, name, args) extern type name args +#else + #define ALLEGRO_ACODEC_FUNC AL_FUNC +#endif + + +ALLEGRO_ACODEC_FUNC(bool, al_init_acodec_addon, (void)); +ALLEGRO_ACODEC_FUNC(uint32_t, al_get_allegro_acodec_version, (void)); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_audio.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_audio.h new file mode 100644 index 0000000..8e3092a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_audio.h @@ -0,0 +1,374 @@ +/* + * Updated for 4.9 api inclusion by Ryan Dickie + * Originally done by KC/Milan + */ + +#ifndef __al_included_allegro5_allegro_audio_h +#define __al_included_allegro5_allegro_audio_h + +#ifdef __cplusplus +extern "C" { +#endif + +/* Title: Audio types + */ + +#include "allegro5/allegro.h" + + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_KCM_AUDIO_SRC + #define _ALLEGRO_KCM_AUDIO_DLL __declspec(dllexport) + #else + #define _ALLEGRO_KCM_AUDIO_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_KCM_AUDIO_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_KCM_AUDIO_FUNC(type, name, args) _ALLEGRO_KCM_AUDIO_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_KCM_AUDIO_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_KCM_AUDIO_FUNC(type, name, args) extern _ALLEGRO_KCM_AUDIO_DLL type name args +#else + #define ALLEGRO_KCM_AUDIO_FUNC AL_FUNC +#endif + + +/* Internal, used to communicate with acodec. */ +/* Must be in 512 <= n < 1024 */ +#define _KCM_STREAM_FEEDER_QUIT_EVENT_TYPE (512) + +/* User event type emitted when a stream fragment is ready to be + * refilled with more audio data. + * Must be in 512 <= n < 1024 + */ +#define ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT (513) +#define ALLEGRO_EVENT_AUDIO_STREAM_FINISHED (514) + + +/* Enum: ALLEGRO_AUDIO_DEPTH + */ +enum ALLEGRO_AUDIO_DEPTH +{ + /* Sample depth and type, and signedness. Mixers only use 32-bit signed + * float (-1..+1). The unsigned value is a bit-flag applied to the depth + * value. + */ + ALLEGRO_AUDIO_DEPTH_INT8 = 0x00, + ALLEGRO_AUDIO_DEPTH_INT16 = 0x01, + ALLEGRO_AUDIO_DEPTH_INT24 = 0x02, + ALLEGRO_AUDIO_DEPTH_FLOAT32 = 0x03, + + ALLEGRO_AUDIO_DEPTH_UNSIGNED = 0x08, + + /* For convenience */ + ALLEGRO_AUDIO_DEPTH_UINT8 = ALLEGRO_AUDIO_DEPTH_INT8 | + ALLEGRO_AUDIO_DEPTH_UNSIGNED, + ALLEGRO_AUDIO_DEPTH_UINT16 = ALLEGRO_AUDIO_DEPTH_INT16 | + ALLEGRO_AUDIO_DEPTH_UNSIGNED, + ALLEGRO_AUDIO_DEPTH_UINT24 = ALLEGRO_AUDIO_DEPTH_INT24 | + ALLEGRO_AUDIO_DEPTH_UNSIGNED +}; + + +/* Enum: ALLEGRO_CHANNEL_CONF + */ +enum ALLEGRO_CHANNEL_CONF +{ + /* Speaker configuration (mono, stereo, 2.1, 3, etc). With regards to + * behavior, most of this code makes no distinction between, say, 4.1 and + * 5 speaker setups.. they both have 5 "channels". However, users would + * like the distinction, and later when the higher-level stuff is added, + * the differences will become more important. (v>>4)+(v&0xF) should yield + * the total channel count. + */ + ALLEGRO_CHANNEL_CONF_1 = 0x10, + ALLEGRO_CHANNEL_CONF_2 = 0x20, + ALLEGRO_CHANNEL_CONF_3 = 0x30, + ALLEGRO_CHANNEL_CONF_4 = 0x40, + ALLEGRO_CHANNEL_CONF_5_1 = 0x51, + ALLEGRO_CHANNEL_CONF_6_1 = 0x61, + ALLEGRO_CHANNEL_CONF_7_1 = 0x71 +#define ALLEGRO_MAX_CHANNELS 8 +}; + + +/* Enum: ALLEGRO_PLAYMODE + */ +enum ALLEGRO_PLAYMODE +{ + ALLEGRO_PLAYMODE_ONCE = 0x100, + ALLEGRO_PLAYMODE_LOOP = 0x101, + ALLEGRO_PLAYMODE_BIDIR = 0x102, + _ALLEGRO_PLAYMODE_STREAM_ONCE = 0x103, /* internal */ + _ALLEGRO_PLAYMODE_STREAM_ONEDIR = 0x104 /* internal */ +}; + + +/* Enum: ALLEGRO_MIXER_QUALITY + */ +enum ALLEGRO_MIXER_QUALITY +{ + ALLEGRO_MIXER_QUALITY_POINT = 0x110, + ALLEGRO_MIXER_QUALITY_LINEAR = 0x111, + ALLEGRO_MIXER_QUALITY_CUBIC = 0x112 +}; + + +/* Enum: ALLEGRO_AUDIO_PAN_NONE + */ +#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f) + + +/* Type: ALLEGRO_SAMPLE + */ +typedef struct ALLEGRO_SAMPLE ALLEGRO_SAMPLE; + + +/* Type: ALLEGRO_SAMPLE_ID + */ +typedef struct ALLEGRO_SAMPLE_ID ALLEGRO_SAMPLE_ID; + +struct ALLEGRO_SAMPLE_ID { + int _index; + int _id; +}; + + +/* Type: ALLEGRO_SAMPLE_INSTANCE + */ +typedef struct ALLEGRO_SAMPLE_INSTANCE ALLEGRO_SAMPLE_INSTANCE; + + +/* Type: ALLEGRO_AUDIO_STREAM + */ +typedef struct ALLEGRO_AUDIO_STREAM ALLEGRO_AUDIO_STREAM; + + +/* Type: ALLEGRO_MIXER + */ +typedef struct ALLEGRO_MIXER ALLEGRO_MIXER; + + +/* Type: ALLEGRO_VOICE + */ +typedef struct ALLEGRO_VOICE ALLEGRO_VOICE; + + +#ifndef __cplusplus +typedef enum ALLEGRO_AUDIO_DEPTH ALLEGRO_AUDIO_DEPTH; +typedef enum ALLEGRO_CHANNEL_CONF ALLEGRO_CHANNEL_CONF; +typedef enum ALLEGRO_PLAYMODE ALLEGRO_PLAYMODE; +typedef enum ALLEGRO_MIXER_QUALITY ALLEGRO_MIXER_QUALITY; +#endif + + +/* Sample functions */ + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_SAMPLE *, al_create_sample, (void *buf, + unsigned int samples, unsigned int freq, ALLEGRO_AUDIO_DEPTH depth, + ALLEGRO_CHANNEL_CONF chan_conf, bool free_buf)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_destroy_sample, (ALLEGRO_SAMPLE *spl)); + + +/* Sample instance functions */ +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_SAMPLE_INSTANCE*, al_create_sample_instance, ( + ALLEGRO_SAMPLE *data)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_destroy_sample_instance, ( + ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_sample_frequency, (const ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_sample_length, (const ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, al_get_sample_depth, (const ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, al_get_sample_channels, (const ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(void *, al_get_sample_data, (const ALLEGRO_SAMPLE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_sample_instance_frequency, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_sample_instance_length, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_sample_instance_position, (const ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_sample_instance_speed, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_sample_instance_gain, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_sample_instance_pan, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_sample_instance_time, (const ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, al_get_sample_instance_depth, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, al_get_sample_instance_channels, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_PLAYMODE, al_get_sample_instance_playmode, (const ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_sample_instance_playing, (const ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_sample_instance_attached, (const ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_position, (ALLEGRO_SAMPLE_INSTANCE *spl, unsigned int val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_length, (ALLEGRO_SAMPLE_INSTANCE *spl, unsigned int val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_speed, (ALLEGRO_SAMPLE_INSTANCE *spl, float val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_gain, (ALLEGRO_SAMPLE_INSTANCE *spl, float val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_pan, (ALLEGRO_SAMPLE_INSTANCE *spl, float val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_playmode, (ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_PLAYMODE val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample_instance_playing, (ALLEGRO_SAMPLE_INSTANCE *spl, bool val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_detach_sample_instance, (ALLEGRO_SAMPLE_INSTANCE *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_sample, (ALLEGRO_SAMPLE_INSTANCE *spl, ALLEGRO_SAMPLE *data)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_SAMPLE *, al_get_sample, (ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_play_sample_instance, (ALLEGRO_SAMPLE_INSTANCE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_stop_sample_instance, (ALLEGRO_SAMPLE_INSTANCE *spl)); + + +/* Stream functions */ +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_STREAM*, al_create_audio_stream, (size_t buffer_count, + unsigned int samples, unsigned int freq, + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_destroy_audio_stream, (ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_drain_audio_stream, (ALLEGRO_AUDIO_STREAM *stream)); + +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_audio_stream_frequency, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_audio_stream_length, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_audio_stream_fragments, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_available_audio_stream_fragments, (const ALLEGRO_AUDIO_STREAM *stream)); + +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_audio_stream_speed, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_audio_stream_gain, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_audio_stream_pan, (const ALLEGRO_AUDIO_STREAM *stream)); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, al_get_audio_stream_channels, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, al_get_audio_stream_depth, (const ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_PLAYMODE, al_get_audio_stream_playmode, (const ALLEGRO_AUDIO_STREAM *stream)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_audio_stream_playing, (const ALLEGRO_AUDIO_STREAM *spl)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_audio_stream_attached, (const ALLEGRO_AUDIO_STREAM *spl)); + +ALLEGRO_KCM_AUDIO_FUNC(void *, al_get_audio_stream_fragment, (const ALLEGRO_AUDIO_STREAM *stream)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_speed, (ALLEGRO_AUDIO_STREAM *stream, float val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_gain, (ALLEGRO_AUDIO_STREAM *stream, float val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_pan, (ALLEGRO_AUDIO_STREAM *stream, float val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_playmode, (ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_PLAYMODE val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_playing, (ALLEGRO_AUDIO_STREAM *stream, bool val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_detach_audio_stream, (ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_fragment, (ALLEGRO_AUDIO_STREAM *stream, void *val)); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_rewind_audio_stream, (ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_seek_audio_stream_secs, (ALLEGRO_AUDIO_STREAM *stream, double time)); +ALLEGRO_KCM_AUDIO_FUNC(double, al_get_audio_stream_position_secs, (ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(double, al_get_audio_stream_length_secs, (ALLEGRO_AUDIO_STREAM *stream)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_audio_stream_loop_secs, (ALLEGRO_AUDIO_STREAM *stream, double start, double end)); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_audio_stream_event_source, (ALLEGRO_AUDIO_STREAM *stream)); + +/* Mixer functions */ +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_MIXER*, al_create_mixer, (unsigned int freq, + ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_destroy_mixer, (ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_sample_instance_to_mixer, ( + ALLEGRO_SAMPLE_INSTANCE *stream, ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_audio_stream_to_mixer, (ALLEGRO_AUDIO_STREAM *stream, + ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_mixer_to_mixer, (ALLEGRO_MIXER *stream, + ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_mixer_postprocess_callback, ( + ALLEGRO_MIXER *mixer, + void (*cb)(void *buf, unsigned int samples, void *data), + void *data)); + +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_mixer_frequency, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, al_get_mixer_channels, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, al_get_mixer_depth, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_MIXER_QUALITY, al_get_mixer_quality, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(float, al_get_mixer_gain, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_mixer_playing, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_mixer_attached, (const ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_mixer_frequency, (ALLEGRO_MIXER *mixer, unsigned int val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_mixer_quality, (ALLEGRO_MIXER *mixer, ALLEGRO_MIXER_QUALITY val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_mixer_gain, (ALLEGRO_MIXER *mixer, float gain)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_mixer_playing, (ALLEGRO_MIXER *mixer, bool val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_detach_mixer, (ALLEGRO_MIXER *mixer)); + +/* Voice functions */ +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_VOICE*, al_create_voice, (unsigned int freq, + ALLEGRO_AUDIO_DEPTH depth, + ALLEGRO_CHANNEL_CONF chan_conf)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_destroy_voice, (ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_sample_instance_to_voice, ( + ALLEGRO_SAMPLE_INSTANCE *stream, ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_audio_stream_to_voice, ( + ALLEGRO_AUDIO_STREAM *stream, ALLEGRO_VOICE *voice )); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_attach_mixer_to_voice, (ALLEGRO_MIXER *mixer, + ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_detach_voice, (ALLEGRO_VOICE *voice)); + +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_voice_frequency, (const ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(unsigned int, al_get_voice_position, (const ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, al_get_voice_channels, (const ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, al_get_voice_depth, (const ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_get_voice_playing, (const ALLEGRO_VOICE *voice)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_voice_position, (ALLEGRO_VOICE *voice, unsigned int val)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_voice_playing, (ALLEGRO_VOICE *voice, bool val)); + +/* Misc. audio functions */ +ALLEGRO_KCM_AUDIO_FUNC(bool, al_install_audio, (void)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_uninstall_audio, (void)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_is_audio_installed, (void)); +ALLEGRO_KCM_AUDIO_FUNC(uint32_t, al_get_allegro_audio_version, (void)); + +ALLEGRO_KCM_AUDIO_FUNC(size_t, al_get_channel_count, (ALLEGRO_CHANNEL_CONF conf)); +ALLEGRO_KCM_AUDIO_FUNC(size_t, al_get_audio_depth_size, (ALLEGRO_AUDIO_DEPTH conf)); + +/* Simple audio layer */ +ALLEGRO_KCM_AUDIO_FUNC(bool, al_reserve_samples, (int reserve_samples)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_MIXER *, al_get_default_mixer, (void)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_set_default_mixer, (ALLEGRO_MIXER *mixer)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_restore_default_mixer, (void)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_play_sample, (ALLEGRO_SAMPLE *data, + float gain, float pan, float speed, ALLEGRO_PLAYMODE loop, ALLEGRO_SAMPLE_ID *ret_id)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_stop_sample, (ALLEGRO_SAMPLE_ID *spl_id)); +ALLEGRO_KCM_AUDIO_FUNC(void, al_stop_samples, (void)); + +/* File type handlers */ +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_sample_loader, (const char *ext, + ALLEGRO_SAMPLE *(*loader)(const char *filename))); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_sample_saver, (const char *ext, + bool (*saver)(const char *filename, ALLEGRO_SAMPLE *spl))); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_audio_stream_loader, (const char *ext, + ALLEGRO_AUDIO_STREAM *(*stream_loader)(const char *filename, + size_t buffer_count, unsigned int samples))); + +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_sample_loader_f, (const char *ext, + ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE *fp))); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_sample_saver_f, (const char *ext, + bool (*saver)(ALLEGRO_FILE *fp, ALLEGRO_SAMPLE *spl))); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_register_audio_stream_loader_f, (const char *ext, + ALLEGRO_AUDIO_STREAM *(*stream_loader)(ALLEGRO_FILE *fp, + size_t buffer_count, unsigned int samples))); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_SAMPLE *, al_load_sample, (const char *filename)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_save_sample, (const char *filename, + ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_STREAM *, al_load_audio_stream, (const char *filename, + size_t buffer_count, unsigned int samples)); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_SAMPLE *, al_load_sample_f, (ALLEGRO_FILE* fp, const char *ident)); +ALLEGRO_KCM_AUDIO_FUNC(bool, al_save_sample_f, (ALLEGRO_FILE* fp, const char *ident, + ALLEGRO_SAMPLE *spl)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_STREAM *, al_load_audio_stream_f, (ALLEGRO_FILE* fp, const char *ident, + size_t buffer_count, unsigned int samples)); + + +#ifdef __cplusplus +} /* End extern "C" */ +#endif + + +#endif + + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_color.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_color.h new file mode 100644 index 0000000..f4d215b --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_color.h @@ -0,0 +1,68 @@ +#ifndef __al_included_allegro5_allegro_color_h +#define __al_included_allegro5_allegro_color_h + +#include "allegro5/allegro.h" + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_COLOR_SRC + #define _ALLEGRO_COLOR_DLL __declspec(dllexport) + #else + #define _ALLEGRO_COLOR_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_COLOR_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_COLOR_FUNC(type, name, args) _ALLEGRO_COLOR_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_COLOR_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_COLOR_FUNC(type, name, args) extern _ALLEGRO_COLOR_DLL type name args +#else + #define ALLEGRO_COLOR_FUNC AL_FUNC +#endif + +#ifdef __cplusplus + extern "C" { +#endif + +ALLEGRO_COLOR_FUNC(uint32_t, al_get_allegro_color_version, (void)); + +ALLEGRO_COLOR_FUNC(void, al_color_hsv_to_rgb, (float hue, float saturation, + float value, float *red, float *green, float *blue)); +ALLEGRO_COLOR_FUNC(void, al_color_rgb_to_hsl, (float red, float green, float blue, + float *hue, float *saturation, float *lightness)); +ALLEGRO_COLOR_FUNC(void, al_color_rgb_to_hsv, (float red, float green, float blue, + float *hue, float *saturation, float *value)); +ALLEGRO_COLOR_FUNC(void, al_color_hsl_to_rgb, (float hue, float saturation, float lightness, + float *red, float *green, float *blue)); +ALLEGRO_COLOR_FUNC(bool, al_color_name_to_rgb, (char const *name, float *r, float *g, + float *b)); +ALLEGRO_COLOR_FUNC(const char*, al_color_rgb_to_name, (float r, float g, float b)); +ALLEGRO_COLOR_FUNC(void, al_color_cmyk_to_rgb, (float cyan, float magenta, float yellow, + float key, float *red, float *green, float *blue)); +ALLEGRO_COLOR_FUNC(void, al_color_rgb_to_cmyk, (float red, float green, float blue, + float *cyan, float *magenta, float *yellow, float *key)); +ALLEGRO_COLOR_FUNC(void, al_color_yuv_to_rgb, (float y, float u, float v, + float *red, float *green, float *blue)); +ALLEGRO_COLOR_FUNC(void, al_color_rgb_to_yuv, (float red, float green, float blue, + float *y, float *u, float *v)); +ALLEGRO_COLOR_FUNC(void, al_color_rgb_to_html, (float red, float green, float blue, + char *string)); +ALLEGRO_COLOR_FUNC(void, al_color_html_to_rgb, (char const *string, + float *red, float *green, float *blue)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_yuv, (float y, float u, float v)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_cmyk, (float c, float m, float y, float k)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_hsl, (float h, float s, float l)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_hsv, (float h, float s, float v)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_name, (char const *name)); +ALLEGRO_COLOR_FUNC(ALLEGRO_COLOR, al_color_html, (char const *string)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_direct3d.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_direct3d.h new file mode 100644 index 0000000..9701697 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_direct3d.h @@ -0,0 +1,49 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Header file for Direct3D specific API. + * + * By Milan Mimica. + * + */ + +#ifndef __al_included_allegro5_allegro_direct3d_h +#define __al_included_allegro5_allegro_direct3d_h + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Public Direct3D-related API + */ + +/* Display creation flag. */ +#define ALLEGRO_DIRECT3D ALLEGRO_DIRECT3D_INTERNAL + + +AL_FUNC(LPDIRECT3DDEVICE9, al_get_d3d_device, (ALLEGRO_DISPLAY *)); +AL_FUNC(LPDIRECT3DTEXTURE9, al_get_d3d_system_texture, (ALLEGRO_BITMAP *)); +AL_FUNC(LPDIRECT3DTEXTURE9, al_get_d3d_video_texture, (ALLEGRO_BITMAP *)); +AL_FUNC(bool, al_have_d3d_non_pow2_texture_support, (void)); +AL_FUNC(bool, al_have_d3d_non_square_texture_support, (void)); +AL_FUNC(void, al_get_d3d_texture_position, (ALLEGRO_BITMAP *bitmap, int *u, int *v)); +AL_FUNC(bool, al_is_d3d_device_lost, (ALLEGRO_DISPLAY *display)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_font.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_font.h new file mode 100644 index 0000000..a8d30bc --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_font.h @@ -0,0 +1,115 @@ +#ifndef __al_included_allegro5_allegro_font_h +#define __al_included_allegro5_allegro_font_h + +#include "allegro5/allegro.h" + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_FONT_SRC + #define _ALLEGRO_FONT_DLL __declspec(dllexport) + #else + #define _ALLEGRO_FONT_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_FONT_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_FONT_FUNC(type, name, args) _ALLEGRO_FONT_DLL type __cdecl name args + #define ALLEGRO_FONT_METHOD(type, name, args) type (__cdecl *name) args + #define ALLEGRO_FONT_FUNCPTR(type, name, args) extern _ALLEGRO_FONT_DLL type (__cdecl *name) args + #define ALLEGRO_FONT_PRINTFUNC(type, name, args, a, b) ALLEGRO_FONT_FUNC(type, name, args) +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_FONT_FUNC(type, name, args) extern type name args + #define ALLEGRO_FONT_METHOD(type, name, args) type (*name) args + #define ALLEGRO_FONT_FUNCPTR(type, name, args) extern _ALLEGRO_FONT_DLL type (*name) args + #define ALLEGRO_FONT_PRINTFUNC(type, name, args, a, b) ALLEGRO_FONT_FUNC(type, name, args) __attribute__ ((format (printf, a, b))) +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_FONT_FUNC(type, name, args) extern _ALLEGRO_FONT_DLL type name args + #define ALLEGRO_FONT_METHOD(type, name, args) type (*name) args + #define ALLEGRO_FONT_FUNCPTR(type, name, args) extern _ALLEGRO_FONT_DLL type (*name) args + #define ALLEGRO_FONT_PRINTFUNC(type, name, args, a, b) ALLEGRO_FONT_FUNC(type, name, args) +#else + #define ALLEGRO_FONT_FUNC AL_FUNC + #define ALLEGRO_FONT_METHOD AL_METHOD + #define ALLEGRO_FONT_FUNCPTR AL_FUNCPTR + #define ALLEGRO_FONT_PRINTFUNC AL_PRINTFUNC +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_FONT +*/ +typedef struct ALLEGRO_FONT ALLEGRO_FONT; +typedef struct ALLEGRO_FONT_VTABLE ALLEGRO_FONT_VTABLE; + +struct ALLEGRO_FONT +{ + void *data; + int height; + ALLEGRO_FONT_VTABLE *vtable; +}; + +/* text- and font-related stuff */ +struct ALLEGRO_FONT_VTABLE +{ + ALLEGRO_FONT_METHOD(int, font_height, (const ALLEGRO_FONT *f)); + ALLEGRO_FONT_METHOD(int, font_ascent, (const ALLEGRO_FONT *f)); + ALLEGRO_FONT_METHOD(int, font_descent, (const ALLEGRO_FONT *f)); + ALLEGRO_FONT_METHOD(int, char_length, (const ALLEGRO_FONT *f, int ch)); + ALLEGRO_FONT_METHOD(int, text_length, (const ALLEGRO_FONT *f, const ALLEGRO_USTR *text)); + ALLEGRO_FONT_METHOD(int, render_char, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, int ch, float x, float y)); + ALLEGRO_FONT_METHOD(int, render, (const ALLEGRO_FONT *f, ALLEGRO_COLOR color, const ALLEGRO_USTR *text, float x, float y)); + ALLEGRO_FONT_METHOD(void, destroy, (ALLEGRO_FONT *f)); + ALLEGRO_FONT_METHOD(void, get_text_dimensions, (const ALLEGRO_FONT *f, + const ALLEGRO_USTR *text, int *bbx, int *bby, int *bbw, int *bbh)); +}; + +enum { + ALLEGRO_ALIGN_LEFT = 0, + ALLEGRO_ALIGN_CENTRE = 1, + ALLEGRO_ALIGN_CENTER = 1, + ALLEGRO_ALIGN_RIGHT = 2, + ALLEGRO_ALIGN_INTEGER = 4 +}; + +ALLEGRO_FONT_FUNC(bool, al_register_font_loader, (const char *ext, ALLEGRO_FONT *(*load)(const char *filename, int size, int flags))); +ALLEGRO_FONT_FUNC(ALLEGRO_FONT *, al_load_bitmap_font, (const char *filename)); +ALLEGRO_FONT_FUNC(ALLEGRO_FONT *, al_load_font, (const char *filename, int size, int flags)); + +ALLEGRO_FONT_FUNC(ALLEGRO_FONT *, al_grab_font_from_bitmap, (ALLEGRO_BITMAP *bmp, int n, const int ranges[])); +ALLEGRO_FONT_FUNC(ALLEGRO_FONT *, al_create_builtin_font, (void)); + +ALLEGRO_FONT_FUNC(void, al_draw_ustr, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, float y, int flags, ALLEGRO_USTR const *ustr)); +ALLEGRO_FONT_FUNC(void, al_draw_text, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, float y, int flags, char const *text)); +ALLEGRO_FONT_FUNC(void, al_draw_justified_text, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, char const *text)); +ALLEGRO_FONT_FUNC(void, al_draw_justified_ustr, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, ALLEGRO_USTR const *text)); +ALLEGRO_FONT_PRINTFUNC(void, al_draw_textf, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x, float y, int flags, char const *format, ...), 6, 7); +ALLEGRO_FONT_PRINTFUNC(void, al_draw_justified_textf, (const ALLEGRO_FONT *font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, char const *format, ...), 8, 9); +ALLEGRO_FONT_FUNC(int, al_get_text_width, (const ALLEGRO_FONT *f, const char *str)); +ALLEGRO_FONT_FUNC(int, al_get_ustr_width, (const ALLEGRO_FONT *f, const ALLEGRO_USTR *ustr)); +ALLEGRO_FONT_FUNC(int, al_get_font_line_height, (const ALLEGRO_FONT *f)); +ALLEGRO_FONT_FUNC(int, al_get_font_ascent, (const ALLEGRO_FONT *f)); +ALLEGRO_FONT_FUNC(int, al_get_font_descent, (const ALLEGRO_FONT *f)); +ALLEGRO_FONT_FUNC(void, al_destroy_font, (ALLEGRO_FONT *f)); +ALLEGRO_FONT_FUNC(void, al_get_ustr_dimensions, (const ALLEGRO_FONT *f, + ALLEGRO_USTR const *text, + int *bbx, int *bby, int *bbw, int *bbh)); +ALLEGRO_FONT_FUNC(void, al_get_text_dimensions, (const ALLEGRO_FONT *f, + char const *text, + int *bbx, int *bby, int *bbw, int *bbh)); +ALLEGRO_FONT_FUNC(void, al_init_font_addon, (void)); +ALLEGRO_FONT_FUNC(void, al_shutdown_font_addon, (void)); +ALLEGRO_FONT_FUNC(uint32_t, al_get_allegro_font_version, (void)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_image.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_image.h new file mode 100644 index 0000000..868f3da --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_image.h @@ -0,0 +1,42 @@ +#ifndef __al_included_allegro5_allegro_image_h +#define __al_included_allegro5_allegro_image_h + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_IIO_SRC + #define _ALLEGRO_IIO_DLL __declspec(dllexport) + #else + #define _ALLEGRO_IIO_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_IIO_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_IIO_FUNC(type, name, args) _ALLEGRO_IIO_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_IIO_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_IIO_FUNC(type, name, args) extern _ALLEGRO_IIO_DLL type name args +#else + #define ALLEGRO_IIO_FUNC AL_FUNC +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +ALLEGRO_IIO_FUNC(bool, al_init_image_addon, (void)); +ALLEGRO_IIO_FUNC(void, al_shutdown_image_addon, (void)); +ALLEGRO_IIO_FUNC(uint32_t, al_get_allegro_image_version, (void)); + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_iphone.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_iphone.h new file mode 100644 index 0000000..3c40254 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_iphone.h @@ -0,0 +1,32 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + */ + + +#ifndef A5_IPHONE_ALLEGRO_H +#define A5_IPHONE_ALLEGRO_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Public iPhone-related API + */ + +AL_FUNC(void, al_iphone_program_has_halted, (void)); +AL_FUNC(void, al_iphone_override_screen_scale, (float scale)); + +#ifdef __cplusplus + } +#endif + +#endif /* A5_IPONE_ALLEGRO_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_memfile.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_memfile.h new file mode 100644 index 0000000..5d8f6c4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_memfile.h @@ -0,0 +1,40 @@ +#ifndef __al_included_allegro5_memfile_h +#define __al_included_allegro5_memfile_h + +#include "allegro5/allegro.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_MEMFILE_SRC + #define _ALLEGRO_MEMFILE_DLL __declspec(dllexport) + #else + #define _ALLEGRO_MEMFILE_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_MEMFILE_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_MEMFILE_FUNC(type, name, args) _ALLEGRO_MEMFILE_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_MEMFILE_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_MEMFILE_FUNC(type, name, args) extern _ALLEGRO_MEMFILE_DLL type name args +#else + #define ALLEGRO_MEMFILE_FUNC AL_FUNC +#endif + + +ALLEGRO_MEMFILE_FUNC(ALLEGRO_FILE *, al_open_memfile, (void *mem, int64_t size, const char *mode)); +ALLEGRO_MEMFILE_FUNC(uint32_t, al_get_allegro_memfile_version, (void)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_native_dialog.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_native_dialog.h new file mode 100644 index 0000000..df27806 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_native_dialog.h @@ -0,0 +1,93 @@ +#ifndef __al_included_allegro5_allegro_native_dialog_h +#define __al_included_allegro5_allegro_native_dialog_h + +#include "allegro5/allegro.h" + +#ifdef __cplusplus + extern "C" { +#endif + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_NATIVE_DIALOG_SRC + #define _ALLEGRO_DIALOG_DLL __declspec(dllexport) + #else + #define _ALLEGRO_DIALOG_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_DIALOG_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_DIALOG_FUNC(type, name, args) _ALLEGRO_DIALOG_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_DIALOG_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_DIALOG_FUNC(type, name, args) extern _ALLEGRO_DIALOG_DLL type name args +#else + #define ALLEGRO_DIALOG_FUNC AL_FUNC +#endif + +/* Type: ALLEGRO_FILECHOOSER + */ +typedef struct ALLEGRO_FILECHOOSER ALLEGRO_FILECHOOSER; + +/* Type: ALLEGRO_TEXTLOG + */ +typedef struct ALLEGRO_TEXTLOG ALLEGRO_TEXTLOG; + +ALLEGRO_DIALOG_FUNC(bool, al_init_native_dialog_addon, (void)); +ALLEGRO_DIALOG_FUNC(void, al_shutdown_native_dialog_addon, (void)); + +ALLEGRO_DIALOG_FUNC(ALLEGRO_FILECHOOSER *, al_create_native_file_dialog, (char const *initial_path, + char const *title, char const *patterns, int mode)); +ALLEGRO_DIALOG_FUNC(bool, al_show_native_file_dialog, (ALLEGRO_DISPLAY *display, ALLEGRO_FILECHOOSER *dialog)); +ALLEGRO_DIALOG_FUNC(int, al_get_native_file_dialog_count, (const ALLEGRO_FILECHOOSER *dialog)); +ALLEGRO_DIALOG_FUNC(const char *, al_get_native_file_dialog_path, (const ALLEGRO_FILECHOOSER *dialog, + size_t index)); +ALLEGRO_DIALOG_FUNC(void, al_destroy_native_file_dialog, (ALLEGRO_FILECHOOSER *dialog)); + +ALLEGRO_DIALOG_FUNC(int, al_show_native_message_box, (ALLEGRO_DISPLAY *display, char const *title, + char const *heading, char const *text, char const *buttons, int flags)); + +ALLEGRO_DIALOG_FUNC(ALLEGRO_TEXTLOG *, al_open_native_text_log, (char const *title, int flags)); +ALLEGRO_DIALOG_FUNC(void, al_close_native_text_log, (ALLEGRO_TEXTLOG *textlog)); +ALLEGRO_DIALOG_FUNC(void, al_append_native_text_log, (ALLEGRO_TEXTLOG *textlog, char const *format, ...)); +ALLEGRO_DIALOG_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_native_text_log_event_source, (ALLEGRO_TEXTLOG *textlog)); + +ALLEGRO_DIALOG_FUNC(uint32_t, al_get_allegro_native_dialog_version, (void)); + +enum { + ALLEGRO_FILECHOOSER_FILE_MUST_EXIST = 1, + ALLEGRO_FILECHOOSER_SAVE = 2, + ALLEGRO_FILECHOOSER_FOLDER = 4, + ALLEGRO_FILECHOOSER_PICTURES = 8, + ALLEGRO_FILECHOOSER_SHOW_HIDDEN = 16, + ALLEGRO_FILECHOOSER_MULTIPLE = 32 +}; + +enum { + ALLEGRO_MESSAGEBOX_WARN = 1<<0, + ALLEGRO_MESSAGEBOX_ERROR = 1<<1, + ALLEGRO_MESSAGEBOX_OK_CANCEL = 1<<2, + ALLEGRO_MESSAGEBOX_YES_NO = 1<<3, + ALLEGRO_MESSAGEBOX_QUESTION = 1<<4 +}; + +enum { + ALLEGRO_TEXTLOG_NO_CLOSE = 1<<0, + ALLEGRO_TEXTLOG_MONOSPACE = 1<<1 +}; + +enum { + ALLEGRO_EVENT_NATIVE_DIALOG_CLOSE = 600 +}; + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_opengl.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_opengl.h new file mode 100644 index 0000000..37c695a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_opengl.h @@ -0,0 +1,144 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Main header file for all OpenGL drivers. + * + * By Milan Mimica. + * + */ + + +#ifndef __al_included_allegro5_allegro_opengl_h +#define __al_included_allegro5_allegro_opengl_h + +#ifdef __cplusplus + extern "C" { +#endif + +#if defined(ALLEGRO_WINDOWS) +#include +#endif + +#if defined ALLEGRO_IPHONE + +#include +#include +#include +#include + +/* Apple defines OES versions for these - however the separated alpha ones + * don't seem to work on the device and just crash. + */ +#define glBlendEquation glBlendEquationOES +#define glBlendFuncSeparate glBlendFuncSeparateOES +#define glBlendEquationSeparate glBlendEquationSeparateOES +#ifdef GL_FUNC_ADD +#undef GL_FUNC_ADD +#undef GL_FUNC_SUBTRACT +#undef GL_FUNC_REVERSE_SUBTRACT +#endif +#define GL_FUNC_ADD GL_FUNC_ADD_OES +#define GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES +#define GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_OES + +#elif defined ALLEGRO_MACOSX + +#include +#include +#include + +#ifndef GL_GLEXT_PROTOTYPES +#define GL_GLEXT_PROTOTYPES +#endif + +#elif defined ALLEGRO_GP2XWIZ + +#include +#include +#include +#include + +#else /* ALLEGRO_MACOSX */ + +/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */ +#define __glext_h_ +#define __glxext_h_ +#include +#undef __glext_h_ +#undef __glxext_h_ + +#endif /* ALLEGRO_MACOSX */ + +#include "allegro5/opengl/gl_ext.h" + +#ifdef ALLEGRO_WINDOWS + +/* Missing #defines from Mingw */ +#ifndef PFD_SWAP_LAYER_BUFFERS +#define PFD_SWAP_LAYER_BUFFERS 0x00000800 +#endif + +#ifndef PFD_GENERIC_ACCELERATED +#define PFD_GENERIC_ACCELERATED 0x00001000 +#endif + +#ifndef PFD_SUPPORT_DIRECTDRAW +#define PFD_SUPPORT_DIRECTDRAW 0x00002000 +#endif + +#ifndef CDS_FULLSCREEN +#define CDS_FULLSCREEN 0x00000004 +#endif + +#ifndef ENUM_CURRENT_SETTINGS +#define ENUM_CURRENT_SETTINGS ((DWORD)-1) +#endif + +#endif /* ALLEGRO_WINDOWS */ + +#if defined ALLEGRO_WINDOWS + #define ALLEGRO_DEFINE_PROC_TYPE(type, name, args) \ + typedef type (APIENTRY * name) args; +#else + #define ALLEGRO_DEFINE_PROC_TYPE(type, name, args) \ + typedef type (*name) args; +#endif + + +/* + * Public OpenGL-related API + */ + +/* Enum: ALLEGRO_OPENGL_VARIANT + */ +typedef enum ALLEGRO_OPENGL_VARIANT { + ALLEGRO_DESKTOP_OPENGL = 0, + ALLEGRO_OPENGL_ES +} ALLEGRO_OPENGL_VARIANT; + +AL_FUNC(uint32_t, al_get_opengl_version, (void)); +AL_FUNC(bool, al_have_opengl_extension, (const char *extension)); +AL_FUNC(void*, al_get_opengl_proc_address, (const char *name)); +AL_FUNC(ALLEGRO_OGL_EXT_LIST*, al_get_opengl_extension_list, (void)); +AL_FUNC(GLuint, al_get_opengl_texture, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(void, al_remove_opengl_fbo, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(GLuint, al_get_opengl_fbo, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(void, al_get_opengl_texture_size, (ALLEGRO_BITMAP *bitmap, + int *w, int *h)); +AL_FUNC(void, al_get_opengl_texture_position, (ALLEGRO_BITMAP *bitmap, + int *u, int *v)); +AL_FUNC(void, al_set_current_opengl_context, (ALLEGRO_DISPLAY *display)); +AL_FUNC(int, al_get_opengl_variant, (void)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_osx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_osx.h new file mode 100644 index 0000000..abbe209 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_osx.h @@ -0,0 +1,30 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + */ + + +#ifndef A5_OSX_ALLEGRO_H +#define A5_OSX_ALLEGRO_H + +/* + * Public Objective-C OSX-related API + */ +#ifdef __cplusplus + extern "C" { +#endif + +AL_FUNC(NSWindow *, al_osx_get_window, (ALLEGRO_DISPLAY *d)); + +#ifdef __cplusplus + } +#endif + +#endif /* A5_OSX_ALLEGRO_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_physfs.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_physfs.h new file mode 100644 index 0000000..494da6a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_physfs.h @@ -0,0 +1,41 @@ +#ifndef __al_included_allegro5_allegro_physfs_h +#define __al_included_allegro5_allegro_physfs_h + +#include "allegro5/allegro.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_PHYSFS_SRC + #define _ALLEGRO_PHYSFS_DLL __declspec(dllexport) + #else + #define _ALLEGRO_PHYSFS_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_PHYSFS_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_PHYSFS_FUNC(type, name, args) _ALLEGRO_PHYSFS_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_PHYSFS_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_PHYSFS_FUNC(type, name, args) extern _ALLEGRO_PHYSFS_DLL type name args +#else + #define ALLEGRO_PHYSFS_FUNC AL_FUNC +#endif + + +ALLEGRO_PHYSFS_FUNC(void, al_set_physfs_file_interface, (void)); +ALLEGRO_PHYSFS_FUNC(uint32_t, al_get_allegro_physfs_version, (void)); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_primitives.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_primitives.h new file mode 100644 index 0000000..5ded31e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_primitives.h @@ -0,0 +1,164 @@ +#ifndef __al_included_allegro5_allegro_primitives_h +#define __al_included_allegro5_allegro_primitives_h + +#include + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) +#ifndef ALLEGRO_STATICLINK +#ifdef ALLEGRO_PRIMITIVES_SRC +#define _ALLEGRO_PRIM_DLL __declspec(dllexport) +#else +#define _ALLEGRO_PRIM_DLL __declspec(dllimport) +#endif +#else +#define _ALLEGRO_PRIM_DLL +#endif +#endif + +#if defined ALLEGRO_MSVC +#define ALLEGRO_PRIM_FUNC(type, name, args) _ALLEGRO_PRIM_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 +#define ALLEGRO_PRIM_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 +#define ALLEGRO_PRIM_FUNC(type, name, args) extern _ALLEGRO_PRIM_DLL type name args +#else +#define ALLEGRO_PRIM_FUNC AL_FUNC +#endif + +#ifdef __cplusplus +extern "C" +{ +#endif + + +/* Enum: ALLEGRO_PRIM_TYPE + */ +typedef enum ALLEGRO_PRIM_TYPE +{ + ALLEGRO_PRIM_LINE_LIST, + ALLEGRO_PRIM_LINE_STRIP, + ALLEGRO_PRIM_LINE_LOOP, + ALLEGRO_PRIM_TRIANGLE_LIST, + ALLEGRO_PRIM_TRIANGLE_STRIP, + ALLEGRO_PRIM_TRIANGLE_FAN, + ALLEGRO_PRIM_POINT_LIST, + ALLEGRO_PRIM_NUM_TYPES +} ALLEGRO_PRIM_TYPE; + +/* Enum: ALLEGRO_PRIM_ATTR + */ +typedef enum ALLEGRO_PRIM_ATTR +{ + ALLEGRO_PRIM_POSITION = 1, + ALLEGRO_PRIM_COLOR_ATTR, + ALLEGRO_PRIM_TEX_COORD, + ALLEGRO_PRIM_TEX_COORD_PIXEL, + ALLEGRO_PRIM_ATTR_NUM +} ALLEGRO_PRIM_ATTR; + +/* Enum: ALLEGRO_PRIM_STORAGE + */ +typedef enum ALLEGRO_PRIM_STORAGE +{ + ALLEGRO_PRIM_FLOAT_2, + ALLEGRO_PRIM_FLOAT_3, + ALLEGRO_PRIM_SHORT_2 +} ALLEGRO_PRIM_STORAGE; + +/* Enum: ALLEGRO_VERTEX_CACHE_SIZE + */ +#define ALLEGRO_VERTEX_CACHE_SIZE 256 + +/* Enum: ALLEGRO_PRIM_QUALITY + */ +#define ALLEGRO_PRIM_QUALITY 10 + +/* Type: ALLEGRO_VERTEX_ELEMENT + */ +typedef struct ALLEGRO_VERTEX_ELEMENT ALLEGRO_VERTEX_ELEMENT; + +struct ALLEGRO_VERTEX_ELEMENT { + int attribute; + int storage; + int offset; +}; + +/* Type: ALLEGRO_VERTEX_DECL + */ +typedef struct ALLEGRO_VERTEX_DECL ALLEGRO_VERTEX_DECL; + +/* Duplicated in allegro5/internal/aintern_tri_soft.h */ +#ifndef _ALLEGRO_VERTEX_DEFINED +#define _ALLEGRO_VERTEX_DEFINED + +/* Type: ALLEGRO_VERTEX + */ +typedef struct ALLEGRO_VERTEX ALLEGRO_VERTEX; + +struct ALLEGRO_VERTEX { + float x, y, z; + float u, v; + ALLEGRO_COLOR color; +}; +#endif + +ALLEGRO_PRIM_FUNC(uint32_t, al_get_allegro_primitives_version, (void)); + +/* +* Primary Functions +*/ +ALLEGRO_PRIM_FUNC(bool, al_init_primitives_addon, (void)); +ALLEGRO_PRIM_FUNC(void, al_shutdown_primitives_addon, (void)); +ALLEGRO_PRIM_FUNC(int, al_draw_prim, (const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, int start, int end, int type)); +ALLEGRO_PRIM_FUNC(int, al_draw_indexed_prim, (const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, const int* indices, int num_vtx, int type)); + +ALLEGRO_PRIM_FUNC(ALLEGRO_VERTEX_DECL*, al_create_vertex_decl, (const ALLEGRO_VERTEX_ELEMENT* elements, int stride)); +ALLEGRO_PRIM_FUNC(void, al_destroy_vertex_decl, (ALLEGRO_VERTEX_DECL* decl)); + +/* +* Custom primitives +*/ +ALLEGRO_PRIM_FUNC(void, al_draw_soft_triangle, (ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, ALLEGRO_VERTEX* v3, uintptr_t state, + void (*init)(uintptr_t, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*), + void (*first)(uintptr_t, int, int, int, int), + void (*step)(uintptr_t, int), + void (*draw)(uintptr_t, int, int, int))); +ALLEGRO_PRIM_FUNC(void, al_draw_soft_line, (ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, uintptr_t state, + void (*first)(uintptr_t, int, int, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*), + void (*step)(uintptr_t, int), + void (*draw)(uintptr_t, int, int))); + +/* +*High level primitives +*/ +ALLEGRO_PRIM_FUNC(void, al_draw_line, (float x1, float y1, float x2, float y2, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_triangle, (float x1, float y1, float x2, float y2, float x3, float y3, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_rectangle, (float x1, float y1, float x2, float y2, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_rounded_rectangle, (float x1, float y1, float x2, float y2, float rx, float ry, ALLEGRO_COLOR color, float thickness)); + +ALLEGRO_PRIM_FUNC(void, al_calculate_arc, (float* dest, int stride, float cx, float cy, float rx, float ry, float start_theta, float delta_theta, float thickness, int num_segments)); +ALLEGRO_PRIM_FUNC(void, al_draw_circle, (float cx, float cy, float r, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_ellipse, (float cx, float cy, float rx, float ry, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_arc, (float cx, float cy, float r, float start_theta, float delta_theta, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_elliptical_arc, (float cx, float cy, float rx, float ry, float start_theta, float delta_theta, ALLEGRO_COLOR color, float thickness)); +ALLEGRO_PRIM_FUNC(void, al_draw_pieslice, (float cx, float cy, float r, float start_theta, float delta_theta, ALLEGRO_COLOR color, float thickness)); + +ALLEGRO_PRIM_FUNC(void, al_calculate_spline, (float* dest, int stride, float points[8], float thickness, int num_segments)); +ALLEGRO_PRIM_FUNC(void, al_draw_spline, (float points[8], ALLEGRO_COLOR color, float thickness)); + +ALLEGRO_PRIM_FUNC(void, al_calculate_ribbon, (float* dest, int dest_stride, const float *points, int points_stride, float thickness, int num_segments)); +ALLEGRO_PRIM_FUNC(void, al_draw_ribbon, (const float *points, int points_stride, ALLEGRO_COLOR color, float thickness, int num_segments)); + +ALLEGRO_PRIM_FUNC(void, al_draw_filled_triangle, (float x1, float y1, float x2, float y2, float x3, float y3, ALLEGRO_COLOR color)); +ALLEGRO_PRIM_FUNC(void, al_draw_filled_rectangle, (float x1, float y1, float x2, float y2, ALLEGRO_COLOR color)); +ALLEGRO_PRIM_FUNC(void, al_draw_filled_ellipse, (float cx, float cy, float rx, float ry, ALLEGRO_COLOR color)); +ALLEGRO_PRIM_FUNC(void, al_draw_filled_circle, (float cx, float cy, float r, ALLEGRO_COLOR color)); +ALLEGRO_PRIM_FUNC(void, al_draw_filled_pieslice, (float cx, float cy, float r, float start_theta, float delta_theta, ALLEGRO_COLOR color)); +ALLEGRO_PRIM_FUNC(void, al_draw_filled_rounded_rectangle, (float x1, float y1, float x2, float y2, float rx, float ry, ALLEGRO_COLOR color)); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_ttf.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_ttf.h new file mode 100644 index 0000000..92af6f1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_ttf.h @@ -0,0 +1,49 @@ +#ifndef __al_included_allegro5_allegro_ttf_h +#define __al_included_allegro5_allegro_ttf_h + +#include "allegro5/allegro.h" +#include "allegro5/allegro_font.h" + +#ifdef __cplusplus + extern "C" { +#endif + +#define ALLEGRO_TTF_NO_KERNING 1 +#define ALLEGRO_TTF_MONOCHROME 2 +#define ALLEGRO_TTF_NO_AUTOHINT 4 + +#if (defined ALLEGRO_MINGW32) || (defined ALLEGRO_MSVC) || (defined ALLEGRO_BCC32) + #ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_TTF_SRC + #define _ALLEGRO_TTF_DLL __declspec(dllexport) + #else + #define _ALLEGRO_TTF_DLL __declspec(dllimport) + #endif + #else + #define _ALLEGRO_TTF_DLL + #endif +#endif + +#if defined ALLEGRO_MSVC + #define ALLEGRO_TTF_FUNC(type, name, args) _ALLEGRO_TTF_DLL type __cdecl name args +#elif defined ALLEGRO_MINGW32 + #define ALLEGRO_TTF_FUNC(type, name, args) extern type name args +#elif defined ALLEGRO_BCC32 + #define ALLEGRO_TTF_FUNC(type, name, args) extern _ALLEGRO_TTF_DLL type name args +#else + #define ALLEGRO_TTF_FUNC AL_FUNC +#endif + +ALLEGRO_TTF_FUNC(ALLEGRO_FONT *, al_load_ttf_font, (char const *filename, int size, int flags)); +ALLEGRO_TTF_FUNC(ALLEGRO_FONT *, al_load_ttf_font_f, (ALLEGRO_FILE *file, char const *filename, int size, int flags)); +ALLEGRO_TTF_FUNC(ALLEGRO_FONT *, al_load_ttf_font_stretch, (char const *filename, int w, int h, int flags)); +ALLEGRO_TTF_FUNC(ALLEGRO_FONT *, al_load_ttf_font_stretch_f, (ALLEGRO_FILE *file, char const *filename, int w, int h, int flags)); +ALLEGRO_TTF_FUNC(bool, al_init_ttf_addon, (void)); +ALLEGRO_TTF_FUNC(void, al_shutdown_ttf_addon, (void)); +ALLEGRO_TTF_FUNC(uint32_t, al_get_allegro_ttf_version, (void)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_windows.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_windows.h new file mode 100644 index 0000000..cd75392 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/allegro_windows.h @@ -0,0 +1,38 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Header file for Windows specific API. + * + * By Trent Gamblin. + * + */ + +#ifndef __al_included_allegro5_allegro_windows_h +#define __al_included_allegro5_allegro_windows_h + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * Public Windows-related API + */ + +AL_FUNC(HWND, al_get_win_window_handle, (ALLEGRO_DISPLAY *)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/altime.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/altime.h new file mode 100644 index 0000000..bb0e520 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/altime.h @@ -0,0 +1,30 @@ +#ifndef __al_included_allegro5_altime_h +#define __al_included_allegro5_altime_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: ALLEGRO_TIMEOUT + */ +typedef struct ALLEGRO_TIMEOUT ALLEGRO_TIMEOUT; +struct ALLEGRO_TIMEOUT { + uint64_t __pad1__; + uint64_t __pad2__; +}; + + + +AL_FUNC(double, al_get_time, (void)); +AL_FUNC(void, al_rest, (double seconds)); +AL_FUNC(void, al_init_timeout, (ALLEGRO_TIMEOUT *timeout, double seconds)); + + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/base.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/base.h new file mode 100644 index 0000000..31b0ad8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/base.h @@ -0,0 +1,96 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Base header, defines basic stuff needed by pretty much + * everything else. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_base_h +#define __al_included_allegro5_base_h + +#ifndef ALLEGRO_NO_STD_HEADERS + #include + #ifdef _MSC_VER + /* enable posix for limits.h and only limits.h + enabling it for all msvc headers will potentially + disable a lot of commonly used msvcrt functions */ + #define _POSIX_ + #include + #undef _POSIX_ + #else + #include + #endif + #include + #include + #include + #include + #include + #include +#endif + +#if (defined DEBUGMODE) && (defined FORTIFY) + #include +#endif + +#if (defined DEBUGMODE) && (defined DMALLOC) + #include +#endif + +#include "allegro5/internal/alconfig.h" + +#ifdef __cplusplus + extern "C" { +#endif + +#define ALLEGRO_VERSION 5 +#define ALLEGRO_SUB_VERSION 0 +#define ALLEGRO_WIP_VERSION 10 + +/* Not sure we need it, but since ALLEGRO_VERSION_STR contains it: + * 0 = SVN + * 1 = first release + * 2... = hotfixes? + * + * Note x.y.z (= x.y.z.0) has release number 1, and x.y.z.1 has release + * number 2, just to confuse you. + */ +#define ALLEGRO_RELEASE_NUMBER 1 + +#define ALLEGRO_VERSION_STR "5.0.10" +#define ALLEGRO_DATE_STR "2013" +#define ALLEGRO_DATE 20130616 /* yyyymmdd */ +#define ALLEGRO_VERSION_INT \ + ((ALLEGRO_VERSION << 24) | (ALLEGRO_SUB_VERSION << 16) | \ + (ALLEGRO_WIP_VERSION << 8) | ALLEGRO_RELEASE_NUMBER) + +AL_FUNC(uint32_t, al_get_allegro_version, (void)); +AL_FUNC(int, al_run_main, (int argc, char **argv, int (*)(int, char **))); + +/*******************************************/ +/************ Some global stuff ************/ +/*******************************************/ + +/* Type: ALLEGRO_PI + */ +#define ALLEGRO_PI 3.14159265358979323846 + +#define AL_ID(a,b,c,d) (((a)<<24) | ((b)<<16) | ((c)<<8) | (d)) + + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap.h new file mode 100644 index 0000000..bdb0586 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap.h @@ -0,0 +1,71 @@ +#ifndef __al_included_allegro5_bitmap_h +#define __al_included_allegro5_bitmap_h + +#include "allegro5/color.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: ALLEGRO_BITMAP + */ +typedef struct ALLEGRO_BITMAP ALLEGRO_BITMAP; + + +/* + * Bitmap flags + */ +enum { + ALLEGRO_MEMORY_BITMAP = 0x0001, + ALLEGRO_KEEP_BITMAP_FORMAT = 0x0002, + ALLEGRO_FORCE_LOCKING = 0x0004, + ALLEGRO_NO_PRESERVE_TEXTURE = 0x0008, + ALLEGRO_ALPHA_TEST = 0x0010, + _ALLEGRO_INTERNAL_OPENGL = 0x0020, + ALLEGRO_MIN_LINEAR = 0x0040, + ALLEGRO_MAG_LINEAR = 0x0080, + ALLEGRO_MIPMAP = 0x0100, + ALLEGRO_NO_PREMULTIPLIED_ALPHA = 0x0200, + ALLEGRO_VIDEO_BITMAP = 0x0400 +}; + + +AL_FUNC(void, al_set_new_bitmap_format, (int format)); +AL_FUNC(void, al_set_new_bitmap_flags, (int flags)); +AL_FUNC(int, al_get_new_bitmap_format, (void)); +AL_FUNC(int, al_get_new_bitmap_flags, (void)); +AL_FUNC(void, al_add_new_bitmap_flag, (int flag)); + +AL_FUNC(int, al_get_bitmap_width, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(int, al_get_bitmap_height, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(int, al_get_bitmap_format, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(int, al_get_bitmap_flags, (ALLEGRO_BITMAP *bitmap)); + +AL_FUNC(ALLEGRO_BITMAP*, al_create_bitmap, (int w, int h)); +AL_FUNC(void, al_destroy_bitmap, (ALLEGRO_BITMAP *bitmap)); + +AL_FUNC(void, al_put_pixel, (int x, int y, ALLEGRO_COLOR color)); +AL_FUNC(void, al_put_blended_pixel, (int x, int y, ALLEGRO_COLOR color)); +AL_FUNC(ALLEGRO_COLOR, al_get_pixel, (ALLEGRO_BITMAP *bitmap, int x, int y)); + +/* Masking */ +AL_FUNC(void, al_convert_mask_to_alpha, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR mask_color)); + +/* Clipping */ +AL_FUNC(void, al_set_clipping_rectangle, (int x, int y, int width, int height)); +AL_FUNC(void, al_reset_clipping_rectangle, (void)); +AL_FUNC(void, al_get_clipping_rectangle, (int *x, int *y, int *w, int *h)); + +/* Sub bitmaps */ +AL_FUNC(ALLEGRO_BITMAP *, al_create_sub_bitmap, (ALLEGRO_BITMAP *parent, int x, int y, int w, int h)); +AL_FUNC(bool, al_is_sub_bitmap, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(ALLEGRO_BITMAP *, al_get_parent_bitmap, (ALLEGRO_BITMAP *bitmap)); + +/* Miscellaneous */ +AL_FUNC(ALLEGRO_BITMAP *, al_clone_bitmap, (ALLEGRO_BITMAP *bitmap)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_draw.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_draw.h new file mode 100644 index 0000000..83e3e14 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_draw.h @@ -0,0 +1,42 @@ +#ifndef __al_included_allegro5_bitmap_draw_h +#define __al_included_allegro5_bitmap_draw_h + +#include "allegro5/bitmap.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Flags for the blitting functions */ +enum { + ALLEGRO_FLIP_HORIZONTAL = 0x00001, + ALLEGRO_FLIP_VERTICAL = 0x00002 +}; + +/* Blitting */ +AL_FUNC(void, al_draw_bitmap, (ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags)); +AL_FUNC(void, al_draw_bitmap_region, (ALLEGRO_BITMAP *bitmap, float sx, float sy, float sw, float sh, float dx, float dy, int flags)); +AL_FUNC(void, al_draw_scaled_bitmap, (ALLEGRO_BITMAP *bitmap, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, int flags)); +AL_FUNC(void, al_draw_rotated_bitmap, (ALLEGRO_BITMAP *bitmap, float cx, float cy, float dx, float dy, float angle, int flags)); +AL_FUNC(void, al_draw_scaled_rotated_bitmap, (ALLEGRO_BITMAP *bitmap, float cx, float cy, float dx, float dy, float xscale, float yscale, float angle, int flags)); + +/* Tinted blitting */ +AL_FUNC(void, al_draw_tinted_bitmap, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, float dx, float dy, int flags)); +AL_FUNC(void, al_draw_tinted_bitmap_region, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, float sx, float sy, float sw, float sh, float dx, float dy, int flags)); +AL_FUNC(void, al_draw_tinted_scaled_bitmap, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, int flags)); +AL_FUNC(void, al_draw_tinted_rotated_bitmap, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, float cx, float cy, float dx, float dy, float angle, int flags)); +AL_FUNC(void, al_draw_tinted_scaled_rotated_bitmap, (ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint, float cx, float cy, float dx, float dy, float xscale, float yscale, float angle, int flags)); +AL_FUNC(void, al_draw_tinted_scaled_rotated_bitmap_region, ( + ALLEGRO_BITMAP *bitmap, + float sx, float sy, float sw, float sh, + ALLEGRO_COLOR tint, + float cx, float cy, float dx, float dy, float xscale, float yscale, + float angle, int flags)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_io.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_io.h new file mode 100644 index 0000000..c522f4d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_io.h @@ -0,0 +1,31 @@ +#ifndef __al_included_allegro5_bitmap_io_h +#define __al_included_allegro5_bitmap_io_h + +#include "allegro5/bitmap.h" +#include "allegro5/file.h" + +#ifdef __cplusplus + extern "C" { +#endif + +typedef ALLEGRO_BITMAP *(*ALLEGRO_IIO_LOADER_FUNCTION)(const char *filename); +typedef ALLEGRO_BITMAP *(*ALLEGRO_IIO_FS_LOADER_FUNCTION)(ALLEGRO_FILE *fp); +typedef bool (*ALLEGRO_IIO_SAVER_FUNCTION)(const char *filename, ALLEGRO_BITMAP *bitmap); +typedef bool (*ALLEGRO_IIO_FS_SAVER_FUNCTION)(ALLEGRO_FILE *fp, ALLEGRO_BITMAP *bitmap); + +AL_FUNC(bool, al_register_bitmap_loader, (const char *ext, ALLEGRO_IIO_LOADER_FUNCTION loader)); +AL_FUNC(bool, al_register_bitmap_saver, (const char *ext, ALLEGRO_IIO_SAVER_FUNCTION saver)); +AL_FUNC(bool, al_register_bitmap_loader_f, (const char *ext, ALLEGRO_IIO_FS_LOADER_FUNCTION fs_loader)); +AL_FUNC(bool, al_register_bitmap_saver_f, (const char *ext, ALLEGRO_IIO_FS_SAVER_FUNCTION fs_saver)); +AL_FUNC(ALLEGRO_BITMAP *, al_load_bitmap, (const char *filename)); +AL_FUNC(ALLEGRO_BITMAP *, al_load_bitmap_f, (ALLEGRO_FILE *fp, const char *ident)); +AL_FUNC(bool, al_save_bitmap, (const char *filename, ALLEGRO_BITMAP *bitmap)); +AL_FUNC(bool, al_save_bitmap_f, (ALLEGRO_FILE *fp, const char *ident, ALLEGRO_BITMAP *bitmap)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_lock.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_lock.h new file mode 100644 index 0000000..a6a6eb4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/bitmap_lock.h @@ -0,0 +1,42 @@ +#ifndef __al_included_allegro5_bitmap_lock_h +#define __al_included_allegro5_bitmap_lock_h + +#include "allegro5/bitmap.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* + * Locking flags + */ +enum { + ALLEGRO_LOCK_READWRITE = 0, + ALLEGRO_LOCK_READONLY = 1, + ALLEGRO_LOCK_WRITEONLY = 2 +}; + + +/* Type: ALLEGRO_LOCKED_REGION + */ +typedef struct ALLEGRO_LOCKED_REGION ALLEGRO_LOCKED_REGION; +struct ALLEGRO_LOCKED_REGION { + void *data; + int format; + int pitch; + int pixel_size; +}; + + +AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap, (ALLEGRO_BITMAP *bitmap, int format, int flags)); +AL_FUNC(ALLEGRO_LOCKED_REGION*, al_lock_bitmap_region, (ALLEGRO_BITMAP *bitmap, int x, int y, int width, int height, int format, int flags)); +AL_FUNC(void, al_unlock_bitmap, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(bool, al_is_bitmap_locked, (ALLEGRO_BITMAP *bitmap)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/blender.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/blender.h new file mode 100644 index 0000000..419e54d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/blender.h @@ -0,0 +1,44 @@ +#ifndef __al_included_allegro5_blender_h +#define __al_included_allegro5_blender_h + +#ifdef __cplusplus + extern "C" { +#endif + + +/* + * Blending modes + */ +enum ALLEGRO_BLEND_MODE { + ALLEGRO_ZERO = 0, + ALLEGRO_ONE = 1, + ALLEGRO_ALPHA = 2, + ALLEGRO_INVERSE_ALPHA = 3, + ALLEGRO_SRC_COLOR = 4, + ALLEGRO_DEST_COLOR = 5, + ALLEGRO_INVERSE_SRC_COLOR = 6, + ALLEGRO_INVERSE_DEST_COLOR = 7, + ALLEGRO_NUM_BLEND_MODES +}; + +enum ALLEGRO_BLEND_OPERATIONS { + ALLEGRO_ADD = 0, + ALLEGRO_SRC_MINUS_DEST = 1, + ALLEGRO_DEST_MINUS_SRC = 2, + ALLEGRO_NUM_BLEND_OPERATIONS +}; + + +AL_FUNC(void, al_set_blender, (int op, int source, int dest)); +AL_FUNC(void, al_get_blender, (int *op, int *source, int *dest)); +AL_FUNC(void, al_set_separate_blender, (int op, int source, int dest, + int alpha_op, int alpha_source, int alpha_dest)); +AL_FUNC(void, al_get_separate_blender, (int *op, int *source, int *dest, + int *alpha_op, int *alpha_src, int *alpha_dest)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/color.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/color.h new file mode 100644 index 0000000..49d39ac --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/color.h @@ -0,0 +1,79 @@ +#ifndef __al_included_allegro5_color_h +#define __al_included_allegro5_color_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_COLOR + */ +typedef struct ALLEGRO_COLOR ALLEGRO_COLOR; + +struct ALLEGRO_COLOR +{ + float r, g, b, a; +}; + + +/* Enum: ALLEGRO_PIXEL_FORMAT + */ +typedef enum ALLEGRO_PIXEL_FORMAT +{ + ALLEGRO_PIXEL_FORMAT_ANY = 0, + ALLEGRO_PIXEL_FORMAT_ANY_NO_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_WITH_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_15_NO_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_16_NO_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_16_WITH_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_24_NO_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_32_NO_ALPHA, + ALLEGRO_PIXEL_FORMAT_ANY_32_WITH_ALPHA, + ALLEGRO_PIXEL_FORMAT_ARGB_8888, + ALLEGRO_PIXEL_FORMAT_RGBA_8888, + ALLEGRO_PIXEL_FORMAT_ARGB_4444, + ALLEGRO_PIXEL_FORMAT_RGB_888, /* 24 bit format */ + ALLEGRO_PIXEL_FORMAT_RGB_565, + ALLEGRO_PIXEL_FORMAT_RGB_555, + ALLEGRO_PIXEL_FORMAT_RGBA_5551, + ALLEGRO_PIXEL_FORMAT_ARGB_1555, + ALLEGRO_PIXEL_FORMAT_ABGR_8888, + ALLEGRO_PIXEL_FORMAT_XBGR_8888, + ALLEGRO_PIXEL_FORMAT_BGR_888, /* 24 bit format */ + ALLEGRO_PIXEL_FORMAT_BGR_565, + ALLEGRO_PIXEL_FORMAT_BGR_555, + ALLEGRO_PIXEL_FORMAT_RGBX_8888, + ALLEGRO_PIXEL_FORMAT_XRGB_8888, + ALLEGRO_PIXEL_FORMAT_ABGR_F32, + ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE, + ALLEGRO_PIXEL_FORMAT_RGBA_4444, + ALLEGRO_NUM_PIXEL_FORMATS +} ALLEGRO_PIXEL_FORMAT; + + +/* Pixel mapping */ +AL_FUNC(ALLEGRO_COLOR, al_map_rgb, (unsigned char r, unsigned char g, unsigned char b)); +AL_FUNC(ALLEGRO_COLOR, al_map_rgba, (unsigned char r, unsigned char g, unsigned char b, unsigned char a)); +AL_FUNC(ALLEGRO_COLOR, al_map_rgb_f, (float r, float g, float b)); +AL_FUNC(ALLEGRO_COLOR, al_map_rgba_f, (float r, float g, float b, float a)); + +/* Pixel unmapping */ +AL_FUNC(void, al_unmap_rgb, (ALLEGRO_COLOR color, unsigned char *r, unsigned char *g, unsigned char *b)); +AL_FUNC(void, al_unmap_rgba, (ALLEGRO_COLOR color, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)); +AL_FUNC(void, al_unmap_rgb_f, (ALLEGRO_COLOR color, float *r, float *g, float *b)); +AL_FUNC(void, al_unmap_rgba_f, (ALLEGRO_COLOR color, float *r, float *g, float *b, float *a)); + +/* Pixel formats */ +AL_FUNC(int, al_get_pixel_size, (int format)); +AL_FUNC(int, al_get_pixel_format_bits, (int format)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/config.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/config.h new file mode 100644 index 0000000..56f08f8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/config.h @@ -0,0 +1,45 @@ +#ifndef __al_included_allegro5_config_h +#define __al_included_allegro5_config_h + +#include "allegro5/file.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Type: ALLEGRO_CONFIG + */ +typedef struct ALLEGRO_CONFIG ALLEGRO_CONFIG; + +/* Type: ALLEGRO_CONFIG_SECTION + */ +typedef struct ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION; + +/* Type: ALLEGRO_CONFIG_ENTRY + */ +typedef struct ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY; + +AL_FUNC(ALLEGRO_CONFIG *, al_create_config, (void)); +AL_FUNC(void, al_add_config_section, (ALLEGRO_CONFIG *config, const char *name)); +AL_FUNC(void, al_set_config_value, (ALLEGRO_CONFIG *config, const char *section, const char *key, const char *value)); +AL_FUNC(void, al_add_config_comment, (ALLEGRO_CONFIG *config, const char *section, const char *comment)); +AL_FUNC(const char*, al_get_config_value, (const ALLEGRO_CONFIG *config, const char *section, const char *key)); +AL_FUNC(ALLEGRO_CONFIG*, al_load_config_file, (const char *filename)); +AL_FUNC(ALLEGRO_CONFIG*, al_load_config_file_f, (ALLEGRO_FILE *filename)); +AL_FUNC(bool, al_save_config_file, (const char *filename, const ALLEGRO_CONFIG *config)); +AL_FUNC(bool, al_save_config_file_f, (ALLEGRO_FILE *file, const ALLEGRO_CONFIG *config)); +AL_FUNC(void, al_merge_config_into, (ALLEGRO_CONFIG *master, const ALLEGRO_CONFIG *add)); +AL_FUNC(ALLEGRO_CONFIG *, al_merge_config, (const ALLEGRO_CONFIG *cfg1, const ALLEGRO_CONFIG *cfg2)); +AL_FUNC(void, al_destroy_config, (ALLEGRO_CONFIG *config)); + +AL_FUNC(char const *, al_get_first_config_section, (ALLEGRO_CONFIG const *config, ALLEGRO_CONFIG_SECTION **iterator)); +AL_FUNC(char const *, al_get_next_config_section, (ALLEGRO_CONFIG_SECTION **iterator)); +AL_FUNC(char const *, al_get_first_config_entry, (ALLEGRO_CONFIG const *config, char const *section, + ALLEGRO_CONFIG_ENTRY **iterator)); +AL_FUNC(char const *, al_get_next_config_entry, (ALLEGRO_CONFIG_ENTRY **iterator)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/debug.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/debug.h new file mode 100644 index 0000000..d01b920 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/debug.h @@ -0,0 +1,92 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Debug facilities. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_debug_h +#define __al_included_allegro5_debug_h + +#include +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +AL_FUNC(bool, _al_trace_prefix, (char const *channel, int level, + char const *file, int line, char const *function)); + +AL_PRINTFUNC(void, _al_trace_suffix, (const char *msg, ...), 1, 2); + +#ifdef DEBUGMODE + /* Must not be used with a trailing semicolon. */ + #ifdef ALLEGRO_GCC + #define ALLEGRO_DEBUG_CHANNEL(x) \ + static char const *__al_debug_channel __attribute__((unused)) = x; + #else + #define ALLEGRO_DEBUG_CHANNEL(x) \ + static char const *__al_debug_channel = x; + #endif + #define ALLEGRO_TRACE_CHANNEL_LEVEL(channel, level) \ + !_al_trace_prefix(channel, level, __FILE__, __LINE__, __func__) \ + ? (void)0 : _al_trace_suffix +#else + #define ALLEGRO_TRACE_CHANNEL_LEVEL(channel, x) 1 ? (void) 0 : _al_trace_suffix + #define ALLEGRO_DEBUG_CHANNEL(x) +#endif + +#define ALLEGRO_TRACE_LEVEL(x) ALLEGRO_TRACE_CHANNEL_LEVEL(__al_debug_channel, x) +#define ALLEGRO_DEBUG ALLEGRO_TRACE_LEVEL(0) +#define ALLEGRO_INFO ALLEGRO_TRACE_LEVEL(1) +#define ALLEGRO_WARN ALLEGRO_TRACE_LEVEL(2) +#define ALLEGRO_ERROR ALLEGRO_TRACE_LEVEL(3) + +/* Run-time assertions. */ +AL_FUNCPTR(void, _al_user_assert_handler, (char const *expr, char const *file, + int line, char const *func)); + +AL_FUNC(void, al_register_assert_handler, (void (*handler)(char const *expr, + char const *file, int line, char const *func))); + +#ifdef NDEBUG + #define ALLEGRO_ASSERT(e) ((void)(0 && (e))) +#else + #define ALLEGRO_ASSERT(e) \ + ((e) ? (void) 0 \ + : (_al_user_assert_handler) ? \ + _al_user_assert_handler(#e, __FILE__, __LINE__, __func__) \ + : assert(e)) +#endif + +/* Compile time assertions. */ +#define ALLEGRO_ASSERT_CONCAT_(a, b) a##b +#define ALLEGRO_ASSERT_CONCAT(a, b) ALLEGRO_ASSERT_CONCAT_(a, b) +#define ALLEGRO_STATIC_ASSERT(module, e) \ + struct ALLEGRO_ASSERT_CONCAT(static_assert_##module##_line_, __LINE__) \ + { unsigned int bf : !!(e); } + +/* We are lazy and use just ASSERT while Allegro itself is compiled. */ +#ifdef ALLEGRO_LIB_BUILD + #define ASSERT(x) ALLEGRO_ASSERT(x) +#endif + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/display.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/display.h new file mode 100644 index 0000000..905a72a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/display.h @@ -0,0 +1,151 @@ +#ifndef __al_included_allegro5_display_h +#define __al_included_allegro5_display_h + +#include "allegro5/bitmap.h" +#include "allegro5/color.h" +#include "allegro5/events.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Possible bit combinations for the flags parameter of al_create_display. */ +enum { + ALLEGRO_WINDOWED = 1 << 0, + ALLEGRO_FULLSCREEN = 1 << 1, + ALLEGRO_OPENGL = 1 << 2, + ALLEGRO_DIRECT3D_INTERNAL = 1 << 3, + ALLEGRO_RESIZABLE = 1 << 4, + ALLEGRO_FRAMELESS = 1 << 5, + ALLEGRO_NOFRAME = ALLEGRO_FRAMELESS, /* older synonym */ + ALLEGRO_GENERATE_EXPOSE_EVENTS = 1 << 6, + ALLEGRO_OPENGL_3_0 = 1 << 7, + ALLEGRO_OPENGL_FORWARD_COMPATIBLE = 1 << 8, + ALLEGRO_FULLSCREEN_WINDOW = 1 << 9, + ALLEGRO_MINIMIZED = 1 << 10 +}; + +/* Possible parameters for al_set_display_option. + * Make sure to update ALLEGRO_EXTRA_DISPLAY_SETTINGS if you modify + * anything here. + */ +enum ALLEGRO_DISPLAY_OPTIONS { + ALLEGRO_RED_SIZE, + ALLEGRO_GREEN_SIZE, + ALLEGRO_BLUE_SIZE, + ALLEGRO_ALPHA_SIZE, + ALLEGRO_RED_SHIFT, + ALLEGRO_GREEN_SHIFT, + ALLEGRO_BLUE_SHIFT, + ALLEGRO_ALPHA_SHIFT, + ALLEGRO_ACC_RED_SIZE, + ALLEGRO_ACC_GREEN_SIZE, + ALLEGRO_ACC_BLUE_SIZE, + ALLEGRO_ACC_ALPHA_SIZE, + ALLEGRO_STEREO, + ALLEGRO_AUX_BUFFERS, + ALLEGRO_COLOR_SIZE, + ALLEGRO_DEPTH_SIZE, + ALLEGRO_STENCIL_SIZE, + ALLEGRO_SAMPLE_BUFFERS, + ALLEGRO_SAMPLES, + ALLEGRO_RENDER_METHOD, + ALLEGRO_FLOAT_COLOR, + ALLEGRO_FLOAT_DEPTH, + ALLEGRO_SINGLE_BUFFER, + ALLEGRO_SWAP_METHOD, + ALLEGRO_COMPATIBLE_DISPLAY, + ALLEGRO_UPDATE_DISPLAY_REGION, + ALLEGRO_VSYNC, + ALLEGRO_MAX_BITMAP_SIZE, + ALLEGRO_SUPPORT_NPOT_BITMAP, + ALLEGRO_CAN_DRAW_INTO_BITMAP, + ALLEGRO_SUPPORT_SEPARATE_ALPHA, + ALLEGRO_DISPLAY_OPTIONS_COUNT +}; + +enum +{ + ALLEGRO_DONTCARE, + ALLEGRO_REQUIRE, + ALLEGRO_SUGGEST +}; + + +enum ALLEGRO_DISPLAY_ORIENTATION +{ + ALLEGRO_DISPLAY_ORIENTATION_0_DEGREES, + ALLEGRO_DISPLAY_ORIENTATION_90_DEGREES, + ALLEGRO_DISPLAY_ORIENTATION_180_DEGREES, + ALLEGRO_DISPLAY_ORIENTATION_270_DEGREES, + ALLEGRO_DISPLAY_ORIENTATION_FACE_UP, + ALLEGRO_DISPLAY_ORIENTATION_FACE_DOWN +}; + + +/* Type: ALLEGRO_DISPLAY + */ +typedef struct ALLEGRO_DISPLAY ALLEGRO_DISPLAY; + + +AL_FUNC(void, al_set_new_display_refresh_rate, (int refresh_rate)); +AL_FUNC(void, al_set_new_display_flags, (int flags)); +AL_FUNC(int, al_get_new_display_refresh_rate, (void)); +AL_FUNC(int, al_get_new_display_flags, (void)); + +AL_FUNC(int, al_get_display_width, (ALLEGRO_DISPLAY *display)); +AL_FUNC(int, al_get_display_height, (ALLEGRO_DISPLAY *display)); +AL_FUNC(int, al_get_display_format, (ALLEGRO_DISPLAY *display)); +AL_FUNC(int, al_get_display_refresh_rate, (ALLEGRO_DISPLAY *display)); +AL_FUNC(int, al_get_display_flags, (ALLEGRO_DISPLAY *display)); +AL_FUNC(bool, al_set_display_flag, (ALLEGRO_DISPLAY *display, int flag, bool onoff)); +AL_FUNC(bool, al_toggle_display_flag, (ALLEGRO_DISPLAY *display, int flag, bool onoff)); + +AL_FUNC(ALLEGRO_DISPLAY*, al_create_display, (int w, int h)); +AL_FUNC(void, al_destroy_display, (ALLEGRO_DISPLAY *display)); +AL_FUNC(ALLEGRO_DISPLAY*, al_get_current_display, (void)); +AL_FUNC(void, al_set_target_bitmap, (ALLEGRO_BITMAP *bitmap)); +AL_FUNC(void, al_set_target_backbuffer, (ALLEGRO_DISPLAY *display)); +AL_FUNC(ALLEGRO_BITMAP*, al_get_backbuffer, (ALLEGRO_DISPLAY *display)); +AL_FUNC(ALLEGRO_BITMAP*, al_get_target_bitmap, (void)); + +AL_FUNC(bool, al_acknowledge_resize, (ALLEGRO_DISPLAY *display)); +AL_FUNC(bool, al_resize_display, (ALLEGRO_DISPLAY *display, int width, int height)); +AL_FUNC(void, al_flip_display, (void)); +AL_FUNC(void, al_update_display_region, (int x, int y, int width, int height)); +AL_FUNC(bool, al_is_compatible_bitmap, (ALLEGRO_BITMAP *bitmap)); + +AL_FUNC(bool, al_wait_for_vsync, (void)); + +AL_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_display_event_source, (ALLEGRO_DISPLAY *display)); + +AL_FUNC(void, al_set_display_icon, (ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *icon)); +AL_FUNC(void, al_set_display_icons, (ALLEGRO_DISPLAY *display, int num_icons, ALLEGRO_BITMAP *icons[])); + +/* Stuff for multihead/window management */ +AL_FUNC(int, al_get_new_display_adapter, (void)); +AL_FUNC(void, al_set_new_display_adapter, (int adapter)); +AL_FUNC(void, al_set_new_window_position, (int x, int y)); +AL_FUNC(void, al_get_new_window_position, (int *x, int *y)); +AL_FUNC(void, al_set_window_position, (ALLEGRO_DISPLAY *display, int x, int y)); +AL_FUNC(void, al_get_window_position, (ALLEGRO_DISPLAY *display, int *x, int *y)); + +AL_FUNC(void, al_set_window_title, (ALLEGRO_DISPLAY *display, const char *title)); + +/* Defined in display_settings.c */ +AL_FUNC(void, al_set_new_display_option, (int option, int value, int importance)); +AL_FUNC(int, al_get_new_display_option, (int option, int *importance)); +AL_FUNC(void, al_reset_new_display_options, (void)); +AL_FUNC(int, al_get_display_option, (ALLEGRO_DISPLAY *display, int option)); + +/*Deferred drawing*/ +AL_FUNC(void, al_hold_bitmap_drawing, (bool hold)); +AL_FUNC(bool, al_is_bitmap_drawing_held, (void)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/drawing.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/drawing.h new file mode 100644 index 0000000..3cc401f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/drawing.h @@ -0,0 +1,21 @@ +#ifndef __al_included_allegro5_drawing_h +#define __al_included_allegro5_drawing_h + +#include "allegro5/color.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Drawing primitives */ +AL_FUNC(void, al_clear_to_color, (ALLEGRO_COLOR color)); +AL_FUNC(void, al_draw_pixel, (float x, float y, ALLEGRO_COLOR color)); + + +#ifdef __cplusplus + } +#endif + +#endif +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/error.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/error.h new file mode 100644 index 0000000..306c7aa --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/error.h @@ -0,0 +1,39 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Error handling. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_error_h +#define __al_included_allegro5_error_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +AL_FUNC(int, al_get_errno, (void)); +AL_FUNC(void, al_set_errno, (int errnum)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* + * Local Variables: + * c-basic-offset: 3 + * indent-tabs-mode: nil + * End: + */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/events.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/events.h new file mode 100644 index 0000000..8ba0190 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/events.h @@ -0,0 +1,241 @@ +#ifndef __al_included_allegro5_events_h +#define __al_included_allegro5_events_h + +#include "allegro5/altime.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_EVENT_TYPE + */ +typedef unsigned int ALLEGRO_EVENT_TYPE; + +enum +{ + ALLEGRO_EVENT_JOYSTICK_AXIS = 1, + ALLEGRO_EVENT_JOYSTICK_BUTTON_DOWN = 2, + ALLEGRO_EVENT_JOYSTICK_BUTTON_UP = 3, + ALLEGRO_EVENT_JOYSTICK_CONFIGURATION = 4, + + ALLEGRO_EVENT_KEY_DOWN = 10, + ALLEGRO_EVENT_KEY_CHAR = 11, + ALLEGRO_EVENT_KEY_UP = 12, + + ALLEGRO_EVENT_MOUSE_AXES = 20, + ALLEGRO_EVENT_MOUSE_BUTTON_DOWN = 21, + ALLEGRO_EVENT_MOUSE_BUTTON_UP = 22, + ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY = 23, + ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY = 24, + ALLEGRO_EVENT_MOUSE_WARPED = 25, + + ALLEGRO_EVENT_TIMER = 30, + + ALLEGRO_EVENT_DISPLAY_EXPOSE = 40, + ALLEGRO_EVENT_DISPLAY_RESIZE = 41, + ALLEGRO_EVENT_DISPLAY_CLOSE = 42, + ALLEGRO_EVENT_DISPLAY_LOST = 43, + ALLEGRO_EVENT_DISPLAY_FOUND = 44, + ALLEGRO_EVENT_DISPLAY_SWITCH_IN = 45, + ALLEGRO_EVENT_DISPLAY_SWITCH_OUT = 46, + ALLEGRO_EVENT_DISPLAY_ORIENTATION = 47 +}; + + +/* Function: ALLEGRO_EVENT_TYPE_IS_USER + * + * 1 <= n < 512 - builtin events + * 512 <= n < 1024 - reserved user events (for addons) + * 1024 <= n - unreserved user events + */ +#define ALLEGRO_EVENT_TYPE_IS_USER(t) ((t) >= 512) + + +/* Function: ALLEGRO_GET_EVENT_TYPE + */ +#define ALLEGRO_GET_EVENT_TYPE(a, b, c, d) AL_ID(a, b, c, d) + + +/* Type: ALLEGRO_EVENT_SOURCE + */ +typedef struct ALLEGRO_EVENT_SOURCE ALLEGRO_EVENT_SOURCE; + +struct ALLEGRO_EVENT_SOURCE +{ + int __pad[32]; +}; + + + +/* + * Event structures + * + * All event types have the following fields in common. + * + * type -- the type of event this is + * timestamp -- when this event was generated + * source -- which event source generated this event + * + * For people writing event sources: The common fields must be at the + * very start of each event structure, i.e. put _AL_EVENT_HEADER at the + * front. + */ + +#define _AL_EVENT_HEADER(srctype) \ + ALLEGRO_EVENT_TYPE type; \ + srctype *source; \ + double timestamp; + + +typedef struct ALLEGRO_ANY_EVENT +{ + _AL_EVENT_HEADER(ALLEGRO_EVENT_SOURCE) +} ALLEGRO_ANY_EVENT; + + +typedef struct ALLEGRO_DISPLAY_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_DISPLAY) + int x, y; + int width, height; + int orientation; +} ALLEGRO_DISPLAY_EVENT; + + +typedef struct ALLEGRO_JOYSTICK_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_JOYSTICK) + struct ALLEGRO_JOYSTICK *id; + int stick; + int axis; + float pos; + int button; +} ALLEGRO_JOYSTICK_EVENT; + + + +typedef struct ALLEGRO_KEYBOARD_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_KEYBOARD) + struct ALLEGRO_DISPLAY *display; /* the window the key was pressed in */ + int keycode; /* the physical key pressed */ + int unichar; /* unicode character or negative */ + unsigned int modifiers; /* bitfield */ + bool repeat; /* auto-repeated or not */ +} ALLEGRO_KEYBOARD_EVENT; + + + +typedef struct ALLEGRO_MOUSE_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_MOUSE) + struct ALLEGRO_DISPLAY *display; + /* (display) Window the event originate from + * (x, y) Primary mouse position + * (z) Mouse wheel position (1D 'wheel'), or, + * (w, z) Mouse wheel position (2D 'ball') + * (pressure) The pressure applied, for stylus (0 or 1 for normal mouse) + */ + int x, y, z, w; + int dx, dy, dz, dw; + unsigned int button; + float pressure; +} ALLEGRO_MOUSE_EVENT; + + + +typedef struct ALLEGRO_TIMER_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_TIMER) + int64_t count; + double error; +} ALLEGRO_TIMER_EVENT; + + + +/* Type: ALLEGRO_USER_EVENT + */ +typedef struct ALLEGRO_USER_EVENT ALLEGRO_USER_EVENT; + +struct ALLEGRO_USER_EVENT +{ + _AL_EVENT_HEADER(struct ALLEGRO_EVENT_SOURCE) + struct ALLEGRO_USER_EVENT_DESCRIPTOR *__internal__descr; + intptr_t data1; + intptr_t data2; + intptr_t data3; + intptr_t data4; +}; + + + +/* Type: ALLEGRO_EVENT + */ +typedef union ALLEGRO_EVENT ALLEGRO_EVENT; + +union ALLEGRO_EVENT +{ + /* This must be the same as the first field of _AL_EVENT_HEADER. */ + ALLEGRO_EVENT_TYPE type; + /* `any' is to allow the user to access the other fields which are + * common to all event types, without using some specific type + * structure. + */ + ALLEGRO_ANY_EVENT any; + ALLEGRO_DISPLAY_EVENT display; + ALLEGRO_JOYSTICK_EVENT joystick; + ALLEGRO_KEYBOARD_EVENT keyboard; + ALLEGRO_MOUSE_EVENT mouse; + ALLEGRO_TIMER_EVENT timer; + ALLEGRO_USER_EVENT user; +}; + + + +/* Event sources */ + +AL_FUNC(void, al_init_user_event_source, (ALLEGRO_EVENT_SOURCE *)); +AL_FUNC(void, al_destroy_user_event_source, (ALLEGRO_EVENT_SOURCE *)); +/* The second argument is ALLEGRO_EVENT instead of ALLEGRO_USER_EVENT + * to prevent users passing a pointer to a too-short structure. + */ +AL_FUNC(bool, al_emit_user_event, (ALLEGRO_EVENT_SOURCE *, ALLEGRO_EVENT *, + void (*dtor)(ALLEGRO_USER_EVENT *))); +AL_FUNC(void, al_unref_user_event, (ALLEGRO_USER_EVENT *)); +AL_FUNC(void, al_set_event_source_data, (ALLEGRO_EVENT_SOURCE*, intptr_t data)); +AL_FUNC(intptr_t, al_get_event_source_data, (const ALLEGRO_EVENT_SOURCE*)); + + + +/* Event queues */ + +/* Type: ALLEGRO_EVENT_QUEUE + */ +typedef struct ALLEGRO_EVENT_QUEUE ALLEGRO_EVENT_QUEUE; + +AL_FUNC(ALLEGRO_EVENT_QUEUE*, al_create_event_queue, (void)); +AL_FUNC(void, al_destroy_event_queue, (ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(void, al_register_event_source, (ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, al_unregister_event_source, (ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(bool, al_is_event_queue_empty, (ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(bool, al_get_next_event, (ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT *ret_event)); +AL_FUNC(bool, al_peek_next_event, (ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT *ret_event)); +AL_FUNC(bool, al_drop_next_event, (ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(void, al_flush_event_queue, (ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(void, al_wait_for_event, (ALLEGRO_EVENT_QUEUE*, + ALLEGRO_EVENT *ret_event)); +AL_FUNC(bool, al_wait_for_event_timed, (ALLEGRO_EVENT_QUEUE*, + ALLEGRO_EVENT *ret_event, + float secs)); +AL_FUNC(bool, al_wait_for_event_until, (ALLEGRO_EVENT_QUEUE *queue, + ALLEGRO_EVENT *ret_event, + ALLEGRO_TIMEOUT *timeout)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/file.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/file.h new file mode 100644 index 0000000..665bd76 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/file.h @@ -0,0 +1,103 @@ +#ifndef __al_included_allegro5_file_h +#define __al_included_allegro5_file_h + +#include "allegro5/base.h" +#include "allegro5/path.h" +#include "allegro5/utf8.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_FILE + */ +typedef struct ALLEGRO_FILE ALLEGRO_FILE; + + +/* Type: ALLEGRO_FILE_INTERFACE + */ +typedef struct ALLEGRO_FILE_INTERFACE +{ + AL_METHOD(void *, fi_fopen, (const char *path, const char *mode)); + AL_METHOD(void, fi_fclose, (ALLEGRO_FILE *handle)); + AL_METHOD(size_t, fi_fread, (ALLEGRO_FILE *f, void *ptr, size_t size)); + AL_METHOD(size_t, fi_fwrite, (ALLEGRO_FILE *f, const void *ptr, size_t size)); + AL_METHOD(bool, fi_fflush, (ALLEGRO_FILE *f)); + AL_METHOD(int64_t, fi_ftell, (ALLEGRO_FILE *f)); + AL_METHOD(bool, fi_fseek, (ALLEGRO_FILE *f, int64_t offset, int whence)); + AL_METHOD(bool, fi_feof, (ALLEGRO_FILE *f)); + AL_METHOD(bool, fi_ferror, (ALLEGRO_FILE *f)); + AL_METHOD(void, fi_fclearerr, (ALLEGRO_FILE *f)); + AL_METHOD(int, fi_fungetc, (ALLEGRO_FILE *f, int c)); + AL_METHOD(off_t, fi_fsize, (ALLEGRO_FILE *f)); +} ALLEGRO_FILE_INTERFACE; + + +/* Enum: ALLEGRO_SEEK + */ +typedef enum ALLEGRO_SEEK +{ + ALLEGRO_SEEK_SET = 0, + ALLEGRO_SEEK_CUR, + ALLEGRO_SEEK_END +} ALLEGRO_SEEK; + + +/* The basic operations. */ +AL_FUNC(ALLEGRO_FILE*, al_fopen, (const char *path, const char *mode)); +AL_FUNC(ALLEGRO_FILE*, al_fopen_interface, (const ALLEGRO_FILE_INTERFACE *vt, const char *path, const char *mode)); +AL_FUNC(ALLEGRO_FILE*, al_create_file_handle, (const ALLEGRO_FILE_INTERFACE *vt, void *userdata)); +AL_FUNC(void, al_fclose, (ALLEGRO_FILE *f)); +AL_FUNC(size_t, al_fread, (ALLEGRO_FILE *f, void *ptr, size_t size)); +AL_FUNC(size_t, al_fwrite, (ALLEGRO_FILE *f, const void *ptr, size_t size)); +AL_FUNC(bool, al_fflush, (ALLEGRO_FILE *f)); +AL_FUNC(int64_t, al_ftell, (ALLEGRO_FILE *f)); +AL_FUNC(bool, al_fseek, (ALLEGRO_FILE *f, int64_t offset, int whence)); +AL_FUNC(bool, al_feof, (ALLEGRO_FILE *f)); +AL_FUNC(bool, al_ferror, (ALLEGRO_FILE *f)); +AL_FUNC(void, al_fclearerr, (ALLEGRO_FILE *f)); +AL_FUNC(int, al_fungetc, (ALLEGRO_FILE *f, int c)); +AL_FUNC(int64_t, al_fsize, (ALLEGRO_FILE *f)); + +/* Convenience functions. */ +AL_FUNC(int, al_fgetc, (ALLEGRO_FILE *f)); +AL_FUNC(int, al_fputc, (ALLEGRO_FILE *f, int c)); +AL_FUNC(int16_t, al_fread16le, (ALLEGRO_FILE *f)); +AL_FUNC(int16_t, al_fread16be, (ALLEGRO_FILE *f)); +AL_FUNC(size_t, al_fwrite16le, (ALLEGRO_FILE *f, int16_t w)); +AL_FUNC(size_t, al_fwrite16be, (ALLEGRO_FILE *f, int16_t w)); +AL_FUNC(int32_t, al_fread32le, (ALLEGRO_FILE *f)); +AL_FUNC(int32_t, al_fread32be, (ALLEGRO_FILE *f)); +AL_FUNC(size_t, al_fwrite32le, (ALLEGRO_FILE *f, int32_t l)); +AL_FUNC(size_t, al_fwrite32be, (ALLEGRO_FILE *f, int32_t l)); +AL_FUNC(char*, al_fgets, (ALLEGRO_FILE *f, char * const p, size_t max)); +AL_FUNC(ALLEGRO_USTR *, al_fget_ustr, (ALLEGRO_FILE *f)); +AL_FUNC(int, al_fputs, (ALLEGRO_FILE *f, const char *p)); + +/* Specific to stdio backend. */ +AL_FUNC(ALLEGRO_FILE*, al_fopen_fd, (int fd, const char *mode)); +AL_FUNC(ALLEGRO_FILE*, al_make_temp_file, (const char *tmpl, + ALLEGRO_PATH **ret_path)); + +/* Specific to slices. */ +AL_FUNC(ALLEGRO_FILE*, al_fopen_slice, (ALLEGRO_FILE *fp, + size_t initial_size, const char *mode)); + +/* Thread-local state. */ +AL_FUNC(const ALLEGRO_FILE_INTERFACE *, al_get_new_file_interface, (void)); +AL_FUNC(void, al_set_new_file_interface, (const ALLEGRO_FILE_INTERFACE * + file_interface)); +AL_FUNC(void, al_set_standard_file_interface, (void)); + +/* ALLEGRO_FILE field accessors */ +AL_FUNC(void *, al_get_file_userdata, (ALLEGRO_FILE *f)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/fixed.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fixed.h new file mode 100644 index 0000000..7ecc79e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fixed.h @@ -0,0 +1,41 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Fixed point type. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_fixed_h +#define __al_included_allegro5_fixed_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: al_fixed + */ +typedef int32_t al_fixed; + +AL_VAR(const al_fixed, al_fixtorad_r); +AL_VAR(const al_fixed, al_radtofix_r); + +#ifdef __cplusplus + } +#endif + +#endif + + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/fmaths.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fmaths.h new file mode 100644 index 0000000..e94e4ca --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fmaths.h @@ -0,0 +1,46 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Fixed point math routines. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_fmaths_h +#define __al_included_allegro5_fmaths_h + +#include "allegro5/base.h" +#include "allegro5/fixed.h" + +#ifdef __cplusplus + extern "C" { +#endif + +AL_FUNC(al_fixed, al_fixsqrt, (al_fixed x)); +AL_FUNC(al_fixed, al_fixhypot, (al_fixed x, al_fixed y)); +AL_FUNC(al_fixed, al_fixatan, (al_fixed x)); +AL_FUNC(al_fixed, al_fixatan2, (al_fixed y, al_fixed x)); + +AL_ARRAY(al_fixed, _al_fix_cos_tbl); +AL_ARRAY(al_fixed, _al_fix_tan_tbl); +AL_ARRAY(al_fixed, _al_fix_acos_tbl); + +#ifdef __cplusplus + } +#endif + +#include "allegro5/inline/fmaths.inl" + +#endif + + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/fshook.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fshook.h new file mode 100644 index 0000000..004b0c4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fshook.h @@ -0,0 +1,131 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * File System Hooks. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_fshook_h +#define __al_included_allegro5_fshook_h + +#include "allegro5/base.h" +#include "allegro5/file.h" +#include "allegro5/path.h" + +#ifdef ALLEGRO_HAVE_SYS_TYPES_H + #include +#else +/* 4 Gig max offsets if sys/types doesn't exist. */ +typedef unsigned int off_t; +#endif + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_FS_ENTRY + */ +typedef struct ALLEGRO_FS_ENTRY ALLEGRO_FS_ENTRY; + +struct ALLEGRO_FS_ENTRY { + struct ALLEGRO_FS_INTERFACE const *vtable; +}; + + +/* Enum: ALLEGRO_FILE_MODE + */ +typedef enum ALLEGRO_FILE_MODE +{ + ALLEGRO_FILEMODE_READ = 1, + ALLEGRO_FILEMODE_WRITE = 1 << 1, + ALLEGRO_FILEMODE_EXECUTE = 1 << 2, + ALLEGRO_FILEMODE_HIDDEN = 1 << 3, + ALLEGRO_FILEMODE_ISFILE = 1 << 4, + ALLEGRO_FILEMODE_ISDIR = 1 << 5 +} ALLEGRO_FILE_MODE; + + +#ifndef EOF + #define EOF (-1) +#endif + + +/* Type: ALLEGRO_FS_INTERFACE + */ +typedef struct ALLEGRO_FS_INTERFACE ALLEGRO_FS_INTERFACE; + +struct ALLEGRO_FS_INTERFACE { + AL_METHOD(ALLEGRO_FS_ENTRY *, fs_create_entry, (const char *path)); + AL_METHOD(void, fs_destroy_entry, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(const char *, fs_entry_name, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(bool, fs_update_entry, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(uint32_t, fs_entry_mode, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(time_t, fs_entry_atime, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(time_t, fs_entry_mtime, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(time_t, fs_entry_ctime, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(off_t, fs_entry_size, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(bool, fs_entry_exists, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(bool, fs_remove_entry, (ALLEGRO_FS_ENTRY *e)); + + AL_METHOD(bool, fs_open_directory, (ALLEGRO_FS_ENTRY *e)); + AL_METHOD(ALLEGRO_FS_ENTRY *, fs_read_directory,(ALLEGRO_FS_ENTRY *e)); + AL_METHOD(bool, fs_close_directory, (ALLEGRO_FS_ENTRY *e)); + + AL_METHOD(bool, fs_filename_exists, (const char *path)); + AL_METHOD(bool, fs_remove_filename, (const char *path)); + AL_METHOD(char *, fs_get_current_directory, (void)); + AL_METHOD(bool, fs_change_directory, (const char *path)); + AL_METHOD(bool, fs_make_directory, (const char *path)); + + AL_METHOD(ALLEGRO_FILE *, fs_open_file, (ALLEGRO_FS_ENTRY *e, + const char *mode)); +}; + +AL_FUNC(ALLEGRO_FS_ENTRY *, al_create_fs_entry, (const char *path)); +AL_FUNC(void, al_destroy_fs_entry, (ALLEGRO_FS_ENTRY *e)); +AL_FUNC(const char *, al_get_fs_entry_name,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(bool, al_update_fs_entry, (ALLEGRO_FS_ENTRY *e)); +AL_FUNC(uint32_t, al_get_fs_entry_mode,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(time_t, al_get_fs_entry_atime,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(time_t, al_get_fs_entry_mtime,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(time_t, al_get_fs_entry_ctime,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(off_t, al_get_fs_entry_size,(ALLEGRO_FS_ENTRY *e)); +AL_FUNC(bool, al_fs_entry_exists, (ALLEGRO_FS_ENTRY *e)); +AL_FUNC(bool, al_remove_fs_entry, (ALLEGRO_FS_ENTRY *e)); + +AL_FUNC(bool, al_open_directory, (ALLEGRO_FS_ENTRY *e)); +AL_FUNC(ALLEGRO_FS_ENTRY *, al_read_directory, (ALLEGRO_FS_ENTRY *e)); +AL_FUNC(bool, al_close_directory, (ALLEGRO_FS_ENTRY *e)); + +AL_FUNC(bool, al_filename_exists, (const char *path)); +AL_FUNC(bool, al_remove_filename, (const char *path)); +AL_FUNC(char *, al_get_current_directory, (void)); +AL_FUNC(bool, al_change_directory, (const char *path)); +AL_FUNC(bool, al_make_directory, (const char *path)); + +AL_FUNC(ALLEGRO_FILE *, al_open_fs_entry, (ALLEGRO_FS_ENTRY *e, + const char *mode)); + + +/* Thread-local state. */ +AL_FUNC(const ALLEGRO_FS_INTERFACE *, al_get_fs_interface, (void)); +AL_FUNC(void, al_set_fs_interface, (const ALLEGRO_FS_INTERFACE *vtable)); +AL_FUNC(void, al_set_standard_fs_interface, (void)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/fullscreen_mode.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fullscreen_mode.h new file mode 100644 index 0000000..4f5cb77 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/fullscreen_mode.h @@ -0,0 +1,31 @@ +#ifndef __al_included_allegro5_fullscreen_mode_h +#define __al_included_allegro5_fullscreen_mode_h + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_DISPLAY_MODE + */ +typedef struct ALLEGRO_DISPLAY_MODE +{ + int width; + int height; + int format; + int refresh_rate; +} ALLEGRO_DISPLAY_MODE; + + +AL_FUNC(int, al_get_num_display_modes, (void)); +AL_FUNC(ALLEGRO_DISPLAY_MODE*, al_get_display_mode, (int index, + ALLEGRO_DISPLAY_MODE *mode)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/inline/fmaths.inl b/allegro-5.0.10-mingw-4.7.0/include/allegro5/inline/fmaths.inl new file mode 100644 index 0000000..ca669e8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/inline/fmaths.inl @@ -0,0 +1,254 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Fixed point math inline functions (generic C). + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_inline_fmaths_inl +#define __al_included_allegro5_inline_fmaths_inl + +#include "allegro5/error.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* al_ftofix and al_fixtof are used in generic C versions of al_fixmul and al_fixdiv */ +AL_INLINE(al_fixed, al_ftofix, (double x), +{ + if (x > 32767.0) { + al_set_errno(ERANGE); + return 0x7FFFFFFF; + } + + if (x < -32767.0) { + al_set_errno(ERANGE); + return -0x7FFFFFFF; + } + + return (al_fixed)(x * 65536.0 + (x < 0 ? -0.5 : 0.5)); +}) + + +AL_INLINE(double, al_fixtof, (al_fixed x), +{ + return (double)x / 65536.0; +}) + + +AL_INLINE(al_fixed, al_fixadd, (al_fixed x, al_fixed y), +{ + al_fixed result = x + y; + + if (result >= 0) { + if ((x < 0) && (y < 0)) { + al_set_errno(ERANGE); + return -0x7FFFFFFF; + } + else + return result; + } + else { + if ((x > 0) && (y > 0)) { + al_set_errno(ERANGE); + return 0x7FFFFFFF; + } + else + return result; + } +}) + + +AL_INLINE(al_fixed, al_fixsub, (al_fixed x, al_fixed y), +{ + al_fixed result = x - y; + + if (result >= 0) { + if ((x < 0) && (y > 0)) { + al_set_errno(ERANGE); + return -0x7FFFFFFF; + } + else + return result; + } + else { + if ((x > 0) && (y < 0)) { + al_set_errno(ERANGE); + return 0x7FFFFFFF; + } + else + return result; + } +}) + + +/* In benchmarks conducted circa May 2005 we found that, in the main: + * - IA32 machines performed faster with one implementation; + * - AMD64 and G4 machines performed faster with another implementation. + * + * Benchmarks were mainly done with differing versions of gcc. + * Results varied with other compilers, optimisation levels, etc. + * so this is not optimal, though a tenable compromise. + * + * Note that the following implementation are NOT what were benchmarked. + * We had forgotten to put in overflow detection in those versions. + * If you don't need overflow detection then previous versions in the + * CVS tree might be worth looking at. + * + * PS. Don't move the #ifs inside the AL_INLINE; BCC doesn't like it. + */ +#if (defined ALLEGRO_I386) || (!defined LONG_LONG) + AL_INLINE(al_fixed, al_fixmul, (al_fixed x, al_fixed y), + { + return al_ftofix(al_fixtof(x) * al_fixtof(y)); + }) +#else + AL_INLINE(al_fixed, al_fixmul, (al_fixed x, al_fixed y), + { + LONG_LONG lx = x; + LONG_LONG ly = y; + LONG_LONG lres = (lx*ly); + + if (lres > 0x7FFFFFFF0000LL) { + al_set_errno(ERANGE); + return 0x7FFFFFFF; + } + else if (lres < -0x7FFFFFFF0000LL) { + al_set_errno(ERANGE); + return 0x80000000; + } + else { + int res = lres >> 16; + return res; + } + }) +#endif /* al_fixmul() C implementations */ + + +#if (defined ALLEGRO_CFG_NO_FPU) && (defined LONG_LONG) +AL_INLINE(al_fixed, al_fixdiv, (al_fixed x, al_fixed y), +{ + LONG_LONG lres = x; + if (y == 0) { + al_set_errno(ERANGE); + return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF; + } + lres <<= 16; + lres /= y; + if (lres > 0x7FFFFFFF) { + al_set_errno(ERANGE); + return 0x7FFFFFFF; + } + else if (lres < -0x7FFFFFFF) { + al_set_errno(ERANGE); + return 0x80000000; + } + else { + return (al_fixed)(lres); + } +}) +#else +AL_INLINE(al_fixed, al_fixdiv, (al_fixed x, al_fixed y), +{ + if (y == 0) { + al_set_errno(ERANGE); + return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF; + } + else + return al_ftofix(al_fixtof(x) / al_fixtof(y)); +}) +#endif + + +AL_INLINE(int, al_fixfloor, (al_fixed x), +{ + /* (x >> 16) is not portable */ + if (x >= 0) + return (x >> 16); + else + return ~((~x) >> 16); +}) + + +AL_INLINE(int, al_fixceil, (al_fixed x), +{ + if (x > 0x7FFF0000) { + al_set_errno(ERANGE); + return 0x7FFF; + } + + return al_fixfloor(x + 0xFFFF); +}) + + +AL_INLINE(al_fixed, al_itofix, (int x), +{ + return x << 16; +}) + + +AL_INLINE(int, al_fixtoi, (al_fixed x), +{ + return al_fixfloor(x) + ((x & 0x8000) >> 15); +}) + + +AL_INLINE(al_fixed, al_fixcos, (al_fixed x), +{ + return _al_fix_cos_tbl[((x + 0x4000) >> 15) & 0x1FF]; +}) + + +AL_INLINE(al_fixed, al_fixsin, (al_fixed x), +{ + return _al_fix_cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF]; +}) + + +AL_INLINE(al_fixed, al_fixtan, (al_fixed x), +{ + return _al_fix_tan_tbl[((x + 0x4000) >> 15) & 0xFF]; +}) + + +AL_INLINE(al_fixed, al_fixacos, (al_fixed x), +{ + if ((x < -65536) || (x > 65536)) { + al_set_errno(EDOM); + return 0; + } + + return _al_fix_acos_tbl[(x+65536+127)>>8]; +}) + + +AL_INLINE(al_fixed, al_fixasin, (al_fixed x), +{ + if ((x < -65536) || (x > 65536)) { + al_set_errno(EDOM); + return 0; + } + + return 0x00400000 - _al_fix_acos_tbl[(x+65536+127)>>8]; +}) + +#ifdef __cplusplus + } +#endif + +#endif + + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern.h new file mode 100644 index 0000000..21da560 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern.h @@ -0,0 +1,53 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Some definitions for internal use by the library code. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_aintern_h +#define __al_included_allegro5_aintern_h + +#ifndef __al_included_allegro5_allegro_h + #error must include allegro5/allegro.h first +#endif + +#ifdef __cplusplus + extern "C" { +#endif + +#define _ALLEGRO_MIN(x,y) (((x) < (y)) ? (x) : (y)) +#define _ALLEGRO_MAX(x,y) (((x) > (y)) ? (x) : (y)) +#define _ALLEGRO_CLAMP(x,y,z) _ALLEGRO_MAX((x), _ALLEGRO_MIN((y), (z))) + + +/* message stuff */ +#define ALLEGRO_MESSAGE_SIZE 4096 + +/* various libc stuff */ +AL_FUNC(void *, _al_sane_realloc, (void *ptr, size_t size)); +AL_FUNC(char *, _al_sane_strncpy, (char *dest, const char *src, size_t n)); + + +#define _AL_RAND_MAX 0xFFFF +AL_FUNC(void, _al_srand, (int seed)); +AL_FUNC(int, _al_rand, (void)); + +AL_FUNC(int, _al_stricmp, (const char *s1, const char *s2)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_aatree.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_aatree.h new file mode 100644 index 0000000..3d85dca --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_aatree.h @@ -0,0 +1,24 @@ +#ifndef __al_included_allegro5_aintern_aatree_h +#define __al_included_allegro5_aintern_aatree_h + +typedef struct _AL_AATREE _AL_AATREE; + +struct _AL_AATREE +{ + int level; + _AL_AATREE *left; + _AL_AATREE *right; + const void *key; + void *value; +}; + +typedef int (*_al_cmp_t)(const void *a, const void *b); + +_AL_AATREE *_al_aa_insert(_AL_AATREE *T, const void *key, void *value, _al_cmp_t compare); +void *_al_aa_search(const _AL_AATREE *T, const void *key, _al_cmp_t compare); +_AL_AATREE *_al_aa_delete(_AL_AATREE *T, const void *key, _al_cmp_t compare, void **ret_value); +void _al_aa_free(_AL_AATREE *T); + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_acodec_cfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_acodec_cfg.h new file mode 100644 index 0000000..8e45cda --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_acodec_cfg.h @@ -0,0 +1,9 @@ +#define ALLEGRO_CFG_ACODEC_FLAC +#define ALLEGRO_CFG_ACODEC_MODAUDIO +#define ALLEGRO_CFG_ACODEC_VORBIS +/* #undef ALLEGRO_CFG_ACODEC_TREMOR */ + +/* Define if the library should be loaded dynamically. */ +/* #undef ALLEGRO_CFG_ACODEC_FLAC_DLL */ +/* #undef ALLEGRO_CFG_ACODEC_DUMB_DLL */ +/* #undef ALLEGRO_CFG_ACODEC_VORBISFILE_DLL */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_atomicops.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_atomicops.h new file mode 100644 index 0000000..5054552 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_atomicops.h @@ -0,0 +1,120 @@ +#ifndef __al_included_allegro5_aintern_atomicops_h +#define __al_included_allegro5_aintern_atomicops_h + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) + + /* gcc 4.1 and above have builtin atomic operations. */ + + typedef int _AL_ATOMIC; + + AL_INLINE(_AL_ATOMIC, + _al_fetch_and_add1, (volatile _AL_ATOMIC *ptr), + { + return __sync_fetch_and_add(ptr, 1); + }) + + AL_INLINE(_AL_ATOMIC, + _al_sub1_and_fetch, (volatile _AL_ATOMIC *ptr), + { + return __sync_sub_and_fetch(ptr, 1); + }) + +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + + /* gcc, x86 or x86-64 */ + + typedef int _AL_ATOMIC; + + #define __al_fetch_and_add(ptr, value, result) \ + __asm__ __volatile__ ( \ + "lock; xaddl %0, %1" \ + : "=r" (result), "=m" (*ptr) \ + : "0" (value), "m" (*ptr) \ + : "memory" \ + ) + + AL_INLINE(_AL_ATOMIC, + _al_fetch_and_add1, (volatile _AL_ATOMIC *ptr), + { + _AL_ATOMIC result; + __al_fetch_and_add(ptr, 1, result); + return result; + }) + + AL_INLINE(_AL_ATOMIC, + _al_sub1_and_fetch, (volatile _AL_ATOMIC *ptr), + { + _AL_ATOMIC old; + __al_fetch_and_add(ptr, -1, old); + return old - 1; + }) + +#elif defined(_MSC_VER) && _M_IX86 >= 400 + + /* MSVC, x86 */ + /* MinGW supports these too, but we already have asm code above. */ + + typedef LONG _AL_ATOMIC; + + AL_INLINE(_AL_ATOMIC, + _al_fetch_and_add1, (volatile _AL_ATOMIC *ptr), + { + return InterlockedIncrement(ptr) - 1; + }) + + AL_INLINE(_AL_ATOMIC, + _al_sub1_and_fetch, (volatile _AL_ATOMIC *ptr), + { + return InterlockedDecrement(ptr); + }) + +#elif defined(ALLEGRO_HAVE_OSATOMIC_H) + + /* OS X, GCC < 4.1 + * These functions only work on Tiger (10.4) and above. + * FIXME: Apple's manpage says these functions take volatile int* + * arguments, but at least the 10.4 SDK seems to prototype them as + * taking int * - should the volatile qualifier be removed from the + * wrapper functions in this case? (EG) + */ + + #include + typedef int32_t _AL_ATOMIC; + + AL_INLINE(_AL_ATOMIC, + _al_fetch_and_add1, (volatile _AL_ATOMIC *ptr), + { + return OSAtomicIncrement32Barrier((_AL_ATOMIC *)ptr) - 1; + }) + + AL_INLINE(_AL_ATOMIC, + _al_sub1_and_fetch, (volatile _AL_ATOMIC *ptr), + { + return OSAtomicDecrement32Barrier((_AL_ATOMIC *)ptr); + }) + + +#else + + /* Hope for the best? */ + #warning Atomic operations undefined for your compiler/architecture. + + typedef int _AL_ATOMIC; + + AL_INLINE(_AL_ATOMIC, + _al_fetch_and_add1, (volatile _AL_ATOMIC *ptr), + { + return (*ptr)++; + }) + + AL_INLINE(_AL_ATOMIC, + _al_sub1_and_fetch, (volatile _AL_ATOMIC *ptr), + { + return --(*ptr); + }) + +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio.h new file mode 100644 index 0000000..8eb0478 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio.h @@ -0,0 +1,327 @@ +/* internal-only header + * Updated for 4.9 api inclusion by Ryan Dickie + * Originally done by KC/Milan + */ +#ifndef AINTERN_AUDIO_H +#define AINTERN_AUDIO_H + +#include "allegro5/allegro.h" +#include "allegro5/internal/aintern_vector.h" +#include "../allegro_audio.h" + +typedef enum ALLEGRO_AUDIO_DRIVER_ENUM +{ + /* Various driver modes. */ + ALLEGRO_AUDIO_DRIVER_AUTODETECT = 0x20000, + ALLEGRO_AUDIO_DRIVER_OPENAL = 0x20001, + ALLEGRO_AUDIO_DRIVER_ALSA = 0x20002, + ALLEGRO_AUDIO_DRIVER_DSOUND = 0x20003, + ALLEGRO_AUDIO_DRIVER_OSS = 0x20004, + ALLEGRO_AUDIO_DRIVER_AQUEUE = 0x20005, + ALLEGRO_AUDIO_DRIVER_PULSEAUDIO = 0x20006 +} ALLEGRO_AUDIO_DRIVER_ENUM; + +typedef struct ALLEGRO_AUDIO_DRIVER ALLEGRO_AUDIO_DRIVER; +struct ALLEGRO_AUDIO_DRIVER { + const char *specifier; + + int (*open)(void); + void (*close)(void); + + int (*allocate_voice)(ALLEGRO_VOICE*); + void (*deallocate_voice)(ALLEGRO_VOICE*); + + int (*load_voice)(ALLEGRO_VOICE*, const void*); + void (*unload_voice)(ALLEGRO_VOICE*); + + int (*start_voice)(ALLEGRO_VOICE*); + int (*stop_voice)(ALLEGRO_VOICE*); + + bool (*voice_is_playing)(const ALLEGRO_VOICE*); + + unsigned int (*get_voice_position)(const ALLEGRO_VOICE*); + int (*set_voice_position)(ALLEGRO_VOICE*, unsigned int); +}; + +extern ALLEGRO_AUDIO_DRIVER *_al_kcm_driver; + +const void *_al_voice_update(ALLEGRO_VOICE *voice, unsigned int *samples); +bool _al_kcm_set_voice_playing(ALLEGRO_VOICE *voice, bool val); + +/* A voice structure that you'd attach a mixer or sample to. Ideally there + * would be one ALLEGRO_VOICE per system/hardware voice. + */ +struct ALLEGRO_VOICE { + ALLEGRO_AUDIO_DEPTH depth; + ALLEGRO_CHANNEL_CONF chan_conf; + + unsigned int frequency; + + size_t buffer_size; + size_t num_buffers; + /* If non-0, they must be honored by the driver. */ + + ALLEGRO_SAMPLE_INSTANCE *attached_stream; + /* The stream that is attached to the voice, or NULL. + * May be an ALLEGRO_SAMPLE_INSTANCE or ALLEGRO_MIXER object. + */ + + bool is_streaming; + /* True for voices with an attached mixer. */ + + ALLEGRO_MUTEX *mutex; + ALLEGRO_COND *cond; + + ALLEGRO_AUDIO_DRIVER *driver; + /* XXX shouldn't there only be one audio driver active + * at a time? + */ + + void *extra; + /* Extra data for use by the driver. */ +}; + + +typedef union { + float *f32; + uint32_t *u24; + int32_t *s24; + uint16_t *u16; + int16_t *s16; + uint8_t *u8; + int8_t *s8; + void *ptr; +} any_buffer_t; + +struct ALLEGRO_SAMPLE { + ALLEGRO_AUDIO_DEPTH depth; + ALLEGRO_CHANNEL_CONF chan_conf; + unsigned int frequency; + int len; + any_buffer_t buffer; + bool free_buf; + /* Whether `buffer' needs to be freed when the sample + * is destroyed, or when `buffer' changes. + */ +}; + +/* Read some samples into a mixer buffer. + * + * source: + * The object to read samples from. This may be one of several types. + * + * *vbuf: (in-out parameter) + * Pointer to pointer to destination buffer. + * (should confirm what it means to change the pointer on return) + * + * *samples: (in-out parameter) + * On input indicates the maximum number of samples that can fit into *vbuf. + * On output indicates the actual number of samples that were read. + * + * buffer_depth: + * The audio depth of the destination buffer. + * + * dest_maxc: + * The number of channels in the destination. + */ +typedef void (*stream_reader_t)(void *source, void **vbuf, + unsigned int *samples, ALLEGRO_AUDIO_DEPTH buffer_depth, size_t dest_maxc); + +typedef struct { + union { + ALLEGRO_MIXER *mixer; + ALLEGRO_VOICE *voice; + void *ptr; + } u; + bool is_voice; +} sample_parent_t; + +/* The sample struct also serves the base of ALLEGRO_AUDIO_STREAM, ALLEGRO_MIXER. */ +struct ALLEGRO_SAMPLE_INSTANCE { + /* ALLEGRO_SAMPLE_INSTANCE does not generate any events yet but ALLEGRO_AUDIO_STREAM + * does, which can inherit only ALLEGRO_SAMPLE_INSTANCE. */ + ALLEGRO_EVENT_SOURCE es; + + ALLEGRO_SAMPLE spl_data; + + volatile bool is_playing; + /* Is this sample is playing? */ + + ALLEGRO_PLAYMODE loop; + float speed; + float gain; + float pan; + + /* When resampling an audio stream there will be fractional sample + * positions due to the difference in frequencies. + */ + int pos; + int pos_bresenham_error; + + int loop_start; + int loop_end; + + int step; + int step_denom; + /* The numerator and denominator of the step are + * stored separately. The actual step is obtained by + * dividing step by step_denom */ + + float *matrix; + /* Used to convert from this format to the attached + * mixers, if any. Otherwise is NULL. + * The gain is premultiplied in. + */ + + bool is_mixer; + stream_reader_t spl_read; + /* Reads sample data into the provided buffer, using + * the specified format, converting as necessary. + */ + + ALLEGRO_MUTEX *mutex; + /* Points to the parent object's mutex. It is NULL if + * the sample is not directly or indirectly attached + * to a voice. + */ + + sample_parent_t parent; + /* The object that this sample is attached to, if any. + */ +}; + +void _al_kcm_destroy_sample(ALLEGRO_SAMPLE_INSTANCE *sample, bool unregister); +void _al_kcm_stream_set_mutex(ALLEGRO_SAMPLE_INSTANCE *stream, ALLEGRO_MUTEX *mutex); +void _al_kcm_detach_from_parent(ALLEGRO_SAMPLE_INSTANCE *spl); + + +typedef size_t (*stream_callback_t)(ALLEGRO_AUDIO_STREAM *, void *, size_t); +typedef void (*unload_feeder_t)(ALLEGRO_AUDIO_STREAM *); +typedef bool (*rewind_feeder_t)(ALLEGRO_AUDIO_STREAM *); +typedef bool (*seek_feeder_t)(ALLEGRO_AUDIO_STREAM *, double); +typedef double (*get_feeder_position_t)(ALLEGRO_AUDIO_STREAM *); +typedef double (*get_feeder_length_t)(ALLEGRO_AUDIO_STREAM *); +typedef bool (*set_feeder_loop_t)(ALLEGRO_AUDIO_STREAM *, double, double); + +struct ALLEGRO_AUDIO_STREAM { + ALLEGRO_SAMPLE_INSTANCE spl; + /* ALLEGRO_AUDIO_STREAM is derived from + * ALLEGRO_SAMPLE_INSTANCE. + */ + + unsigned int buf_count; + /* The stream buffer is divided into a number of + * fragments; this is the number of fragments. + */ + + void *main_buffer; + /* Pointer to a single buffer big enough to hold all + * the fragments. Each fragment has additional samples + * at the start for linear/cubic interpolation. + */ + + void **pending_bufs; + void **used_bufs; + /* Arrays of offsets into the main_buffer. + * The arrays are each 'buf_count' long. + * + * 'pending_bufs' holds pointers to fragments supplied + * by the user which are yet to be handed off to the + * audio driver. + * + * 'used_bufs' holds pointers to fragments which + * have been sent to the audio driver and so are + * ready to receive new data. + */ + + volatile bool is_draining; + /* Set to true if sample data is not going to be passed + * to the stream any more. The stream must change its + * playing state to false after all buffers have been + * played. + */ + + ALLEGRO_THREAD *feed_thread; + volatile bool quit_feed_thread; + unload_feeder_t unload_feeder; + rewind_feeder_t rewind_feeder; + seek_feeder_t seek_feeder; + get_feeder_position_t get_feeder_position; + get_feeder_length_t get_feeder_length; + set_feeder_loop_t set_feeder_loop; + stream_callback_t feeder; + /* If ALLEGRO_AUDIO_STREAM has been created by + * al_load_audio_stream(), the stream will be fed + * by a thread using the 'feeder' callback. Such + * streams don't need to be fed by the user. + */ + + void *extra; + /* Extra data for use by the flac/vorbis addons. */ +}; + +bool _al_kcm_refill_stream(ALLEGRO_AUDIO_STREAM *stream); + + +typedef void (*postprocess_callback_t)(void *buf, unsigned int samples, + void *userdata); + +/* ALLEGRO_MIXER is derived from ALLEGRO_SAMPLE_INSTANCE. Certain internal functions and + * pointers may take either object type, and such things are explicitly noted. + * This is never exposed to the user, though. The sample object's read method + * will be set to a different function that will call the read method of all + * attached streams (which may be a sample, or another mixer). + */ +struct ALLEGRO_MIXER { + ALLEGRO_SAMPLE_INSTANCE ss; + /* ALLEGRO_MIXER is derived from ALLEGRO_SAMPLE_INSTANCE. */ + + ALLEGRO_MIXER_QUALITY quality; + + postprocess_callback_t postprocess_callback; + void *pp_callback_userdata; + + _AL_VECTOR streams; + /* Vector of ALLEGRO_SAMPLE_INSTANCE*. Holds the list of + * streams being mixed together. + */ +}; + +extern void _al_kcm_mixer_rejig_sample_matrix(ALLEGRO_MIXER *mixer, + ALLEGRO_SAMPLE_INSTANCE *spl); +extern void _al_kcm_mixer_read(void *source, void **buf, unsigned int *samples, + ALLEGRO_AUDIO_DEPTH buffer_depth, size_t dest_maxc); + + +typedef enum { + ALLEGRO_NO_ERROR = 0, + ALLEGRO_INVALID_PARAM = 1, + ALLEGRO_INVALID_OBJECT = 2, + ALLEGRO_GENERIC_ERROR = 255 +} AL_ERROR_ENUM; + +extern void _al_set_error(int error, char* string); + +/* Supposedly internal */ +ALLEGRO_KCM_AUDIO_FUNC(int, _al_kcm_get_silence, (ALLEGRO_AUDIO_DEPTH depth)); +ALLEGRO_KCM_AUDIO_FUNC(void*, _al_kcm_feed_stream, (ALLEGRO_THREAD *self, void *vstream)); + +/* Helper to emit an event that the stream has got a buffer ready to be refilled. */ +void _al_kcm_emit_stream_events(ALLEGRO_AUDIO_STREAM *stream); + +void _al_kcm_init_destructors(void); +void _al_kcm_shutdown_destructors(void); +void _al_kcm_register_destructor(void *object, void (*func)(void*)); +void _al_kcm_unregister_destructor(void *object); +void _al_kcm_foreach_destructor( + void (*callback)(void *object, void (*func)(void *), void *udata), + void *userdata); + +ALLEGRO_KCM_AUDIO_FUNC(void, _al_kcm_shutdown_default_mixer, (void)); + +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_CHANNEL_CONF, _al_count_to_channel_conf, (int num_channels)); +ALLEGRO_KCM_AUDIO_FUNC(ALLEGRO_AUDIO_DEPTH, _al_word_size_to_depth_conf, (int word_size)); + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio_cfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio_cfg.h new file mode 100644 index 0000000..d22fbd1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_audio_cfg.h @@ -0,0 +1,6 @@ +/* #undef ALLEGRO_CFG_KCM_ALSA */ +#define ALLEGRO_CFG_KCM_OPENAL +#define ALLEGRO_CFG_KCM_DSOUND +/* #undef ALLEGRO_CFG_KCM_OSS */ +/* #undef ALLEGRO_CFG_KCM_PULSEAUDIO */ +/* #undef ALLEGRO_CFG_KCM_AQUEUE */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_bitmap.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_bitmap.h new file mode 100644 index 0000000..b6049b3 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_bitmap.h @@ -0,0 +1,141 @@ +#ifndef __al_included_allegro5_aintern_bitmap_h +#define __al_included_allegro5_aintern_bitmap_h + +#include "allegro5/bitmap.h" +#include "allegro5/bitmap_lock.h" +#include "allegro5/display.h" +#include "allegro5/transformations.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ALLEGRO_BITMAP_INTERFACE ALLEGRO_BITMAP_INTERFACE; + +struct ALLEGRO_BITMAP +{ + ALLEGRO_BITMAP_INTERFACE *vt; + ALLEGRO_DISPLAY *display; + int format; + int flags; + int w, h; + /* + * The number of bytes between a pixel at (x,y) and (x,y+1). + * This is larger than w * pixel_size if there is padding between lines. + */ + int pitch; + /* + * clip left, right, top, bottom + * Clip anything outside of this. cr/cb are exclusive, that is (0, 0, 1, 1) + * is the single pixel spawning a rectangle from floating point 0/0 to 1/1 - + * or in other words, the single pixel 0/0. + * + * There is always confusion as to whether cr/cb are exclusive, leading to + * subtle bugs. The suffixes are supposed to help with that. + */ + int cl; + int cr_excl; + int ct; + int cb_excl; + /* + * Locking info. + * + * locked - locked or not? + * lock_x/y - top left of the locked region + * lock_w/h - width and height of the locked region + * lock_flags - flags the region was locked with + * locked_region - a copy of the locked rectangle + */ + bool locked; + int lock_x; + int lock_y; + int lock_w; + int lock_h; + int lock_flags; + ALLEGRO_LOCKED_REGION locked_region; + + /* Transformation for this bitmap */ + ALLEGRO_TRANSFORM transform; + + /* Info for sub-bitmaps */ + ALLEGRO_BITMAP *parent; + int xofs; + int yofs; + + /* A memory copy of the bitmap data. May be NULL for an empty bitmap. */ + unsigned char *memory; + + /* Size of the bitmap object. Used only by functions to convert bitmap + storage type. Can be missleading. */ + size_t size; + + bool preserve_texture; +}; + +struct ALLEGRO_BITMAP_INTERFACE +{ + int id; + + void (*draw_bitmap_region)(ALLEGRO_BITMAP *bitmap, + ALLEGRO_COLOR tint,float sx, float sy, + float sw, float sh, int flags); + + /* After the memory-copy of the bitmap has been modified, need to call this + * to update the display-specific copy. E.g. with an OpenGL driver, this + * might create/update a texture. Returns false on failure. + */ + bool (*upload_bitmap)(ALLEGRO_BITMAP *bitmap); + /* If the display version of the bitmap has been modified, use this to update + * the memory copy accordingly. E.g. with an OpenGL driver, this might + * read the contents of an associated texture. + */ + + void (*update_clipping_rectangle)(ALLEGRO_BITMAP *bitmap); + + void (*destroy_bitmap)(ALLEGRO_BITMAP *bitmap); + + ALLEGRO_LOCKED_REGION * (*lock_region)(ALLEGRO_BITMAP *bitmap, + int x, int y, int w, int h, int format, + int flags); + + void (*unlock_region)(ALLEGRO_BITMAP *bitmap); +}; + +extern void (*_al_convert_funcs[ALLEGRO_NUM_PIXEL_FORMATS] + [ALLEGRO_NUM_PIXEL_FORMATS])(void *, int, void *, int, + int, int, int, int, int, int); + +/* Bitmap conversion */ +void _al_convert_bitmap_data( + void *src, int src_format, int src_pitch, + void *dst, int dst_format, int dst_pitch, + int sx, int sy, int dx, int dy, + int width, int height); +void _al_convert_to_memory_bitmap(ALLEGRO_BITMAP *bitmap); +void _al_convert_to_display_bitmap(ALLEGRO_BITMAP *bitmap); + +#ifdef ALLEGRO_GP2XWIZ +/* Optimized blitters */ +void _al_draw_bitmap_region_optimized_rgba_4444_to_rgb_565( + ALLEGRO_BITMAP *src, int sx, int sy, int sw, int sh, + ALLEGRO_BITMAP *dest, int dx, int dy, int flags); +void _al_draw_bitmap_region_optimized_rgb_565_to_rgb_565( + ALLEGRO_BITMAP *src, int sx, int sy, int sw, int sh, + ALLEGRO_BITMAP *dest, int dx, int dy, int flags); +void _al_draw_bitmap_region_optimized_rgba_4444_to_rgba_4444( + ALLEGRO_BITMAP *src, int sx, int sy, int sw, int sh, + ALLEGRO_BITMAP *dest, int dx, int dy, int flags); +#endif + +/* Simple bitmap drawing */ +/* _al_put_pixel was inadvertently exported in 5.0.x releases. */ +AL_FUNC(void, _al_put_pixel, (ALLEGRO_BITMAP *bitmap, int x, int y, ALLEGRO_COLOR color)); + +/* Bitmap I/O */ +void _al_init_iio_table(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_blend.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_blend.h new file mode 100644 index 0000000..d90f7a4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_blend.h @@ -0,0 +1,244 @@ +#ifndef __al_included_allegro5_aintern_blend_h +#define __al_included_allegro5_aintern_blend_h + +#include "allegro5/internal/aintern.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef __GNUC__ + #define _AL_ALWAYS_INLINE inline __attribute__((always_inline)) +#else + #define _AL_ALWAYS_INLINE INLINE +#endif + + +#define _AL_DEST_IS_ZERO \ + (dst_mode == ALLEGRO_ZERO && dst_alpha == ALLEGRO_ZERO && \ + op != ALLEGRO_DEST_MINUS_SRC && op_alpha != ALLEGRO_DEST_MINUS_SRC) + +#define _AL_SRC_NOT_MODIFIED \ + (src_mode == ALLEGRO_ONE && src_alpha == ALLEGRO_ONE) + +#define _AL_SRC_NOT_MODIFIED_TINT_WHITE \ + (_AL_SRC_NOT_MODIFIED && \ + tint.r == 1.0f && tint.g == 1.0f && tint.b == 1.0f && tint.a == 1.0f) + + +#ifndef _AL_NO_BLEND_INLINE_FUNC + +/* Only cares about alpha blending modes. */ +static _AL_ALWAYS_INLINE float +get_alpha_factor(enum ALLEGRO_BLEND_MODE operation, float src_alpha, float dst_alpha) +{ + switch (operation) { + case ALLEGRO_ZERO: return 0; + case ALLEGRO_ONE: return 1; + case ALLEGRO_ALPHA: return src_alpha; + case ALLEGRO_INVERSE_ALPHA: return 1 - src_alpha; + case ALLEGRO_SRC_COLOR: return src_alpha; + case ALLEGRO_DEST_COLOR: return dst_alpha; + case ALLEGRO_INVERSE_SRC_COLOR: return 1 - src_alpha; + case ALLEGRO_INVERSE_DEST_COLOR: return 1 - dst_alpha; + default: + ASSERT(false); + return 0; /* silence warning in release build */ + } +} + +/* Puts the blending factor in an ALLEGRO_COLOR object. */ +static _AL_ALWAYS_INLINE void get_factor(enum ALLEGRO_BLEND_MODE operation, + const ALLEGRO_COLOR *source, const ALLEGRO_COLOR *dest, + ALLEGRO_COLOR *factor) +{ + switch (operation) { + case ALLEGRO_ZERO: + factor->r = factor->g = factor->b = factor->a = 0; + break; + case ALLEGRO_ONE: + factor->r = factor->g = factor->b = factor->a = 1; + break; + case ALLEGRO_ALPHA: + factor->r = factor->g = factor->b = factor->a = source->a; + break; + case ALLEGRO_INVERSE_ALPHA: + factor->r = factor->g = factor->b = factor->a = 1 - source->a; + break; + case ALLEGRO_SRC_COLOR: + *factor = *source; + break; + case ALLEGRO_DEST_COLOR: + *factor = *dest; + break; + case ALLEGRO_INVERSE_SRC_COLOR: + factor->r = 1 - source->r; + factor->g = 1 - source->g; + factor->b = 1 - source->b; + factor->a = 1 - source->a; + break; + case ALLEGRO_INVERSE_DEST_COLOR: + factor->r = 1 - dest->r; + factor->g = 1 - dest->g; + factor->b = 1 - dest->b; + factor->a = 1 - dest->a; + break; + default: + ASSERT(false); + factor->r = factor->g = factor->b = factor->a = 0; + break; + } +} + +/* Only call this if the blend modes are one of: + * ALLEGRO_ONE, ALLEGRO_ZERO, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA + */ +static _AL_ALWAYS_INLINE +void _al_blend_alpha_inline( + const ALLEGRO_COLOR *scol, const ALLEGRO_COLOR *dcol, + int op, int src_, int dst_, int aop, int asrc_, int adst_, + ALLEGRO_COLOR *result) +{ + float asrc, adst; + float src, dst; + + result->r = scol->r; + result->g = scol->g; + result->b = scol->b; + result->a = scol->a; + + asrc = get_alpha_factor(asrc_, scol->a, dcol->a); + adst = get_alpha_factor(adst_, scol->a, dcol->a); + src = get_alpha_factor(src_, scol->a, dcol->a); + dst = get_alpha_factor(dst_, scol->a, dcol->a); + + #define BLEND(c, src, dst) \ + result->c = OP(result->c * src, dcol->c * dst); + switch (op) { + case ALLEGRO_ADD: + #define OP(x, y) _ALLEGRO_MIN(1, x + y) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + case ALLEGRO_SRC_MINUS_DEST: + #define OP(x, y) _ALLEGRO_MAX(0, x - y) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + case ALLEGRO_DEST_MINUS_SRC: + #define OP(x, y) _ALLEGRO_MAX(0, y - x) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + } + + switch (aop) { + case ALLEGRO_ADD: + #define OP(x, y) _ALLEGRO_MIN(1, x + y) + BLEND(a, asrc, adst) + #undef OP + break; + case ALLEGRO_SRC_MINUS_DEST: + #define OP(x, y) _ALLEGRO_MAX(0, x - y) + BLEND(a, asrc, adst) + #undef OP + break; + case ALLEGRO_DEST_MINUS_SRC: + #define OP(x, y) _ALLEGRO_MAX(0, y - x) + BLEND(a, asrc, adst) + #undef OP + break; + } + #undef BLEND +} + +/* call this for general blending. its a little slower than just using alpha */ +static _AL_ALWAYS_INLINE +void _al_blend_inline( + const ALLEGRO_COLOR *scol, const ALLEGRO_COLOR *dcol, + int op, int src_, int dst_, int aop, int asrc_, int adst_, + ALLEGRO_COLOR *result) +{ + float asrc, adst; + ALLEGRO_COLOR src, dst; + + result->r = scol->r; + result->g = scol->g; + result->b = scol->b; + result->a = scol->a; + + asrc = get_alpha_factor(asrc_, scol->a, dcol->a); + adst = get_alpha_factor(adst_, scol->a, dcol->a); + get_factor(src_, scol, dcol, &src); + get_factor(dst_, scol, dcol, &dst); + + #define BLEND(c, src, dst) \ + result->c = OP(result->c * src.c, dcol->c * dst.c); + switch (op) { + case ALLEGRO_ADD: + #define OP(x, y) _ALLEGRO_MIN(1, x + y) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + case ALLEGRO_SRC_MINUS_DEST: + #define OP(x, y) _ALLEGRO_MAX(0, x - y) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + case ALLEGRO_DEST_MINUS_SRC: + #define OP(x, y) _ALLEGRO_MAX(0, y - x) + BLEND(r, src, dst) + BLEND(g, src, dst) + BLEND(b, src, dst) + #undef OP + break; + } + #undef BLEND + + #define BLEND(c, src, dst) \ + result->c = OP(result->c * src, dcol->c * dst); + switch (aop) { + case ALLEGRO_ADD: + #define OP(x, y) _ALLEGRO_MIN(1, x + y) + BLEND(a, asrc, adst) + #undef OP + break; + case ALLEGRO_SRC_MINUS_DEST: + #define OP(x, y) _ALLEGRO_MAX(0, x - y) + BLEND(a, asrc, adst) + #undef OP + break; + case ALLEGRO_DEST_MINUS_SRC: + #define OP(x, y) _ALLEGRO_MAX(0, y - x) + BLEND(a, asrc, adst) + #undef OP + break; + } + #undef BLEND +} + +#endif + + +void _al_blend_memory(ALLEGRO_COLOR *src_color, ALLEGRO_BITMAP *dest, + int dx, int dy, ALLEGRO_COLOR *result); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_config.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_config.h new file mode 100644 index 0000000..cb3eed8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_config.h @@ -0,0 +1,29 @@ +#ifndef __al_included_allegro5_aintern_config_h +#define __al_included_allegro5_aintern_config_h + +#include "allegro5/internal/aintern_aatree.h" + +struct ALLEGRO_CONFIG_ENTRY { + bool is_comment; + ALLEGRO_USTR *key; /* comment if is_comment is true */ + ALLEGRO_USTR *value; + ALLEGRO_CONFIG_ENTRY *next; +}; + +struct ALLEGRO_CONFIG_SECTION { + ALLEGRO_USTR *name; + ALLEGRO_CONFIG_ENTRY *head; + ALLEGRO_CONFIG_ENTRY *last; + _AL_AATREE *tree; + ALLEGRO_CONFIG_SECTION *next; +}; + +struct ALLEGRO_CONFIG { + ALLEGRO_CONFIG_SECTION *head; + ALLEGRO_CONFIG_SECTION *last; + _AL_AATREE *tree; +}; + + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_convert.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_convert.h new file mode 100644 index 0000000..af4a0eb --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_convert.h @@ -0,0 +1,1523 @@ +// Warning: This file was created by make_converters.py - do not edit. +#ifndef __al_included_allegro5_aintern_convert_h +#define __al_included_allegro5_aintern_convert_h + +#include "allegro5/allegro.h" +#include "allegro5/internal/aintern_pixels.h" +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGBA_8888(x) \ + ((((x) & 0xff000000) >> 24) /* A */ | \ + (((x) & 0x00ffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_ARGB_4444(x) \ + ((((x) & 0xf0000000) >> 16) /* A */ | \ + (((x) & 0x000000f0) >> 4) /* B */ | \ + (((x) & 0x0000f000) >> 8) /* G */ | \ + (((x) & 0x00f00000) >> 12) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGB_888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGB_565(x) \ + ((((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGB_555(x) \ + ((((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGBA_5551(x) \ + ((((x) & 0x80000000) >> 31) /* A */ | \ + (((x) & 0x000000f8) >> 2) /* B */ | \ + (((x) & 0x0000f800) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_ARGB_1555(x) \ + ((((x) & 0x80000000) >> 16) /* A */ | \ + (((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_ABGR_8888(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + (((x) & 0x00ff0000) >> 16) /* R */ | \ + ((x) & 0xff00ff00) /* AG */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_XBGR_8888(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_BGR_888(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_BGR_565(x) \ + ((((x) & 0x000000f8) << 8) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_BGR_555(x) \ + ((((x) & 0x000000f8) << 7) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGBX_8888(x) \ + ((((x) & 0x00ffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_XRGB_8888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_8888_TO_ABGR_F32(x) \ + al_map_rgba(((x) >> 16) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 0) & 255,\ + ((x) >> 24) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ARGB_8888_TO_ABGR_8888_LE(x) \ + ((((x) & 0xff000000) >> 24) /* A */ | \ + (((x) & 0x00ffffff) << 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_ARGB_8888_TO_ABGR_8888_LE(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + (((x) & 0x00ff0000) >> 16) /* R */ | \ + ((x) & 0xff00ff00) /* AG */) +#endif +#define ALLEGRO_CONVERT_ARGB_8888_TO_RGBA_4444(x) \ + ((((x) & 0xf0000000) >> 28) /* A */ | \ + ((x) & 0x000000f0) /* B */ | \ + (((x) & 0x0000f000) >> 4) /* G */ | \ + (((x) & 0x00f00000) >> 8) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_ARGB_8888(x) \ + ((((x) & 0x000000ff) << 24) /* A */ | \ + (((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_ARGB_4444(x) \ + ((((x) & 0x000000f0) << 8) /* A */ | \ + (((x) & 0x0000f000) >> 12) /* B */ | \ + (((x) & 0x00f00000) >> 16) /* G */ | \ + (((x) & 0xf0000000) >> 20) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGB_888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGB_565(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGB_555(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGBA_5551(x) \ + ((((x) & 0x00000080) >> 7) /* A */ | \ + (((x) & 0x0000f800) >> 10) /* B */ | \ + (((x) & 0x00f80000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_ARGB_1555(x) \ + ((((x) & 0x00000080) << 8) /* A */ | \ + (((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_ABGR_8888(x) \ + ((((x) & 0x000000ff) << 24) /* A */ | \ + (((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_XBGR_8888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_BGR_888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_BGR_565(x) \ + (((x) & 0x0000f800) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_BGR_555(x) \ + ((((x) & 0x0000f800) >> 1) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGBX_8888(x) \ + (((x) & 0xffffff00) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_XRGB_8888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_8888_TO_ABGR_F32(x) \ + al_map_rgba(((x) >> 24) & 255,\ + ((x) >> 16) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 0) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGBA_8888_TO_ABGR_8888_LE(x) \ + (((x) & 0xffffffff) /* ABGR */) +#else +#define ALLEGRO_CONVERT_RGBA_8888_TO_ABGR_8888_LE(x) \ + ((((x) & 0x000000ff) << 24) /* A */ | \ + (((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#endif +#define ALLEGRO_CONVERT_RGBA_8888_TO_RGBA_4444(x) \ + ((((x) & 0x000000f0) >> 4) /* A */ | \ + (((x) & 0x0000f000) >> 8) /* B */ | \ + (((x) & 0x00f00000) >> 12) /* G */ | \ + (((x) & 0xf0000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_ARGB_8888(x) \ + ((_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x000f) >> 0] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGBA_8888(x) \ + ((_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x000f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 24) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGB_888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGB_565(x) \ + ((((x) & 0x000f) << 1) /* B */ | \ + (((x) & 0x00f0) << 3) /* G */ | \ + (((x) & 0x0f00) << 4) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGB_555(x) \ + ((((x) & 0x000f) << 1) /* B */ | \ + (((x) & 0x00f0) << 2) /* G */ | \ + (((x) & 0x0f00) << 3) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGBA_5551(x) \ + ((((x) & 0x8000) >> 15) /* A */ | \ + (((x) & 0x000f) << 2) /* B */ | \ + (((x) & 0x00f0) << 3) /* G */ | \ + (((x) & 0x0f00) << 4) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_ARGB_1555(x) \ + (((x) & 0x8000) /* A */ | \ + (((x) & 0x000f) << 1) /* B */ | \ + (((x) & 0x00f0) << 2) /* G */ | \ + (((x) & 0x0f00) << 3) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_ABGR_8888(x) \ + ((_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x000f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_XBGR_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_BGR_888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_BGR_565(x) \ + ((((x) & 0x000f) << 12) /* B */ | \ + (((x) & 0x00f0) << 3) /* G */ | \ + (((x) & 0x0f00) >> 7) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_BGR_555(x) \ + ((((x) & 0x000f) << 11) /* B */ | \ + (((x) & 0x00f0) << 2) /* G */ | \ + (((x) & 0x0f00) >> 7) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGBX_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 24) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_XRGB_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_4444_TO_ABGR_F32(x) \ + al_map_rgba(_al_rgb_scale_4[((x) >> 8) & 15],\ + _al_rgb_scale_4[((x) >> 4) & 15],\ + _al_rgb_scale_4[((x) >> 0) & 15],\ + _al_rgb_scale_4[((x) >> 12) & 15]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ARGB_4444_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x000f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_ARGB_4444_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x000f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] ) /* R */) +#endif +#define ALLEGRO_CONVERT_ARGB_4444_TO_RGBA_4444(x) \ + ((((x) & 0xf000) >> 12) /* A */ | \ + (((x) & 0x0fff) << 4) /* BGR */) +#define ALLEGRO_CONVERT_RGB_888_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0xffffff) /* BGR */) +#define ALLEGRO_CONVERT_RGB_888_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0xffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_RGB_888_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x0000f0) >> 4) /* B */ | \ + (((x) & 0x00f000) >> 8) /* G */ | \ + (((x) & 0xf00000) >> 12) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_RGB_565(x) \ + ((((x) & 0x0000f8) >> 3) /* B */ | \ + (((x) & 0x00fc00) >> 5) /* G */ | \ + (((x) & 0xf80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_RGB_555(x) \ + ((((x) & 0x0000f8) >> 3) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0xf80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x0000f8) >> 2) /* B */ | \ + (((x) & 0x00f800) >> 5) /* G */ | \ + (((x) & 0xf80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0x0000f8) >> 3) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0xf80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x0000ff) << 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0xff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_XBGR_8888(x) \ + ((((x) & 0x0000ff) << 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0xff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_BGR_888(x) \ + ((((x) & 0x0000ff) << 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0xff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_BGR_565(x) \ + ((((x) & 0x0000f8) << 8) /* B */ | \ + (((x) & 0x00fc00) >> 5) /* G */ | \ + (((x) & 0xf80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_BGR_555(x) \ + ((((x) & 0x0000f8) << 7) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0xf80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_RGB_888_TO_RGBX_8888(x) \ + ((((x) & 0xffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_RGB_888_TO_XRGB_8888(x) \ + (((x) & 0xffffff) /* BGR */) +#define ALLEGRO_CONVERT_RGB_888_TO_ABGR_F32(x) \ + al_map_rgb(((x) >> 16) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 0) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGB_888_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0xffffff) << 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_RGB_888_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x0000ff) << 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0xff0000) >> 16) /* R */) +#endif +#define ALLEGRO_CONVERT_RGB_888_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + ((x) & 0x0000f0) /* B */ | \ + (((x) & 0x00f000) >> 4) /* G */ | \ + (((x) & 0xf00000) >> 8) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x001e) >> 1) /* B */ | \ + (((x) & 0x0780) >> 3) /* G */ | \ + (((x) & 0xf000) >> 4) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_RGB_555(x) \ + (((x) & 0x001f) /* B */ | \ + (((x) & 0xffc0) >> 1) /* GR */) +#define ALLEGRO_CONVERT_RGB_565_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x001f) << 1) /* B */ | \ + ((x) & 0xffc0) /* GR */) +#define ALLEGRO_CONVERT_RGB_565_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + ((x) & 0x001f) /* B */ | \ + (((x) & 0xffc0) >> 1) /* GR */) +#define ALLEGRO_CONVERT_RGB_565_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_BGR_565(x) \ + ((((x) & 0x001f) << 11) /* B */ | \ + ((x) & 0x07e0) /* G */ | \ + (((x) & 0xf800) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_BGR_555(x) \ + ((((x) & 0x001f) << 10) /* B */ | \ + (((x) & 0x07c0) >> 1) /* G */ | \ + (((x) & 0xf800) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_565_TO_ABGR_F32(x) \ + al_map_rgb(_al_rgb_scale_5[((x) >> 11) & 31],\ + _al_rgb_scale_6[((x) >> 5) & 63],\ + _al_rgb_scale_5[((x) >> 0) & 31]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGB_565_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_RGB_565_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#endif +#define ALLEGRO_CONVERT_RGB_565_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0x001e) << 3) /* B */ | \ + (((x) & 0x0780) << 1) /* G */ | \ + ((x) & 0xf000) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x01e) >> 1) /* B */ | \ + (((x) & 0x3c0) >> 2) /* G */ | \ + (((x) & 0x7800) >> 3) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_RGB_565(x) \ + (((x) & 0x01f) /* B */ | \ + (((x) & 0x7fe0) << 1) /* GR */) +#define ALLEGRO_CONVERT_RGB_555_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x7fff) << 1) /* BGR */) +#define ALLEGRO_CONVERT_RGB_555_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + ((x) & 0x7fff) /* BGR */) +#define ALLEGRO_CONVERT_RGB_555_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_BGR_565(x) \ + ((((x) & 0x01f) << 11) /* B */ | \ + (((x) & 0x3e0) << 1) /* G */ | \ + (((x) & 0x7c00) >> 10) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_BGR_555(x) \ + ((((x) & 0x01f) << 10) /* B */ | \ + ((x) & 0x3e0) /* G */ | \ + (((x) & 0x7c00) >> 10) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x01f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_RGB_555_TO_ABGR_F32(x) \ + al_map_rgb(_al_rgb_scale_5[((x) >> 10) & 31],\ + _al_rgb_scale_5[((x) >> 5) & 31],\ + _al_rgb_scale_5[((x) >> 0) & 31]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGB_555_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_RGB_555_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#endif +#define ALLEGRO_CONVERT_RGB_555_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0x01e) << 3) /* B */ | \ + (((x) & 0x3c0) << 2) /* G */ | \ + (((x) & 0x7800) << 1) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_ARGB_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x0001) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x003e) >> 1] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGBA_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x0001) >> 0] ) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x003e) >> 1] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_ARGB_4444(x) \ + ((((x) & 0x0001) << 15) /* A */ | \ + (((x) & 0x003c) >> 2) /* B */ | \ + (((x) & 0x0780) >> 3) /* G */ | \ + (((x) & 0xf000) >> 4) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0x003e) >> 1] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGB_565(x) \ + ((((x) & 0x003e) >> 1) /* B */ | \ + ((x) & 0xffc0) /* GR */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGB_555(x) \ + ((((x) & 0xfffe) >> 1) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_ARGB_1555(x) \ + ((((x) & 0x0001) << 15) /* A */ | \ + (((x) & 0xfffe) >> 1) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_ABGR_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x0001) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x003e) >> 1] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x003e) >> 1] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0x003e) >> 1] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_BGR_565(x) \ + ((((x) & 0x003e) << 10) /* B */ | \ + ((x) & 0x07c0) /* G */ | \ + (((x) & 0xf800) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_BGR_555(x) \ + ((((x) & 0x003e) << 9) /* B */ | \ + (((x) & 0x07c0) >> 1) /* G */ | \ + (((x) & 0xf800) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x003e) >> 1] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x003e) >> 1] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_5551_TO_ABGR_F32(x) \ + al_map_rgba(_al_rgb_scale_5[((x) >> 11) & 31],\ + _al_rgb_scale_5[((x) >> 6) & 31],\ + _al_rgb_scale_5[((x) >> 1) & 31],\ + _al_rgb_scale_1[((x) >> 0) & 1]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGBA_5551_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_1[((x) & 0x0001) >> 0] ) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x003e) >> 1] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_RGBA_5551_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_1[((x) & 0x0001) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x003e) >> 1] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x07c0) >> 6] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* R */) +#endif +#define ALLEGRO_CONVERT_RGBA_5551_TO_RGBA_4444(x) \ + ((((x) & 0x0001) << 3) /* A */ | \ + (((x) & 0x003c) << 2) /* B */ | \ + (((x) & 0x0780) << 1) /* G */ | \ + ((x) & 0xf000) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_ARGB_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x8000) >> 15] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGBA_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x8000) >> 15] ) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_ARGB_4444(x) \ + (((x) & 0x8000) /* A */ | \ + (((x) & 0x001e) >> 1) /* B */ | \ + (((x) & 0x03c0) >> 2) /* G */ | \ + (((x) & 0x7800) >> 3) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGB_565(x) \ + (((x) & 0x001f) /* B */ | \ + (((x) & 0x7fe0) << 1) /* GR */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGB_555(x) \ + (((x) & 0x7fff) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGBA_5551(x) \ + ((((x) & 0x8000) >> 15) /* A */ | \ + (((x) & 0x7fff) << 1) /* BGR */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_ABGR_8888(x) \ + ((_al_rgb_scale_1[((x) & 0x8000) >> 15] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_BGR_565(x) \ + ((((x) & 0x001f) << 11) /* B */ | \ + (((x) & 0x03e0) << 1) /* G */ | \ + (((x) & 0x7c00) >> 10) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_BGR_555(x) \ + ((((x) & 0x001f) << 10) /* B */ | \ + ((x) & 0x03e0) /* G */ | \ + (((x) & 0x7c00) >> 10) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* R */) +#define ALLEGRO_CONVERT_ARGB_1555_TO_ABGR_F32(x) \ + al_map_rgba(_al_rgb_scale_5[((x) >> 10) & 31],\ + _al_rgb_scale_5[((x) >> 5) & 31],\ + _al_rgb_scale_5[((x) >> 0) & 31],\ + _al_rgb_scale_1[((x) >> 15) & 1]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ARGB_1555_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_1[((x) & 0x8000) >> 15] ) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_ARGB_1555_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_1[((x) & 0x8000) >> 15] << 24) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x03e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* R */) +#endif +#define ALLEGRO_CONVERT_ARGB_1555_TO_RGBA_4444(x) \ + ((((x) & 0x8000) >> 12) /* A */ | \ + (((x) & 0x001e) << 3) /* B */ | \ + (((x) & 0x03c0) << 2) /* G */ | \ + (((x) & 0x7800) << 1) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_ARGB_8888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + (((x) & 0x000000ff) << 16) /* R */ | \ + ((x) & 0xff00ff00) /* AG */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGBA_8888(x) \ + ((((x) & 0xff000000) >> 24) /* A */ | \ + (((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_ARGB_4444(x) \ + ((((x) & 0xf0000000) >> 16) /* A */ | \ + (((x) & 0x00f00000) >> 20) /* B */ | \ + (((x) & 0x0000f000) >> 8) /* G */ | \ + (((x) & 0x000000f0) << 4) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGB_888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGB_565(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGB_555(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGBA_5551(x) \ + ((((x) & 0x80000000) >> 31) /* A */ | \ + (((x) & 0x00f80000) >> 18) /* B */ | \ + (((x) & 0x0000f800) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_ARGB_1555(x) \ + ((((x) & 0x80000000) >> 16) /* A */ | \ + (((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_XBGR_8888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_BGR_888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_BGR_565(x) \ + ((((x) & 0x00f80000) >> 8) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_BGR_555(x) \ + ((((x) & 0x00f80000) >> 9) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGBX_8888(x) \ + ((((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_XRGB_8888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_ABGR_8888_TO_ABGR_F32(x) \ + al_map_rgba(((x) >> 0) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 16) & 255,\ + ((x) >> 24) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_TO_ABGR_8888_LE(x) \ + ((((x) & 0xff000000) >> 24) /* A */ | \ + (((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_TO_ABGR_8888_LE(x) \ + (((x) & 0xffffffff) /* ABGR */) +#endif +#define ALLEGRO_CONVERT_ABGR_8888_TO_RGBA_4444(x) \ + ((((x) & 0xf0000000) >> 28) /* A */ | \ + (((x) & 0x00f00000) >> 16) /* B */ | \ + (((x) & 0x0000f000) >> 4) /* G */ | \ + (((x) & 0x000000f0) << 8) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x00f00000) >> 20) /* B */ | \ + (((x) & 0x0000f000) >> 8) /* G */ | \ + (((x) & 0x000000f0) << 4) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGB_888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGB_565(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGB_555(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x00f80000) >> 18) /* B */ | \ + (((x) & 0x0000f800) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_BGR_888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_BGR_565(x) \ + ((((x) & 0x00f80000) >> 8) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_BGR_555(x) \ + ((((x) & 0x00f80000) >> 9) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGBX_8888(x) \ + ((((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_XRGB_8888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_XBGR_8888_TO_ABGR_F32(x) \ + al_map_rgb(((x) >> 0) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 16) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_XBGR_8888_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#else +#define ALLEGRO_CONVERT_XBGR_8888_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0x00ffffff) /* BGR */) +#endif +#define ALLEGRO_CONVERT_XBGR_8888_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0x00f00000) >> 16) /* B */ | \ + (((x) & 0x0000f000) >> 4) /* G */ | \ + (((x) & 0x000000f0) << 8) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0xff0000) >> 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0x0000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0xff0000) >> 8) /* B */ | \ + (((x) & 0x00ff00) << 8) /* G */ | \ + (((x) & 0x0000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0xf00000) >> 20) /* B */ | \ + (((x) & 0x00f000) >> 8) /* G */ | \ + (((x) & 0x0000f0) << 4) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGB_888(x) \ + ((((x) & 0xff0000) >> 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0x0000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGB_565(x) \ + ((((x) & 0xf80000) >> 19) /* B */ | \ + (((x) & 0x00fc00) >> 5) /* G */ | \ + (((x) & 0x0000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGB_555(x) \ + ((((x) & 0xf80000) >> 19) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0x0000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0xf80000) >> 18) /* B */ | \ + (((x) & 0x00f800) >> 5) /* G */ | \ + (((x) & 0x0000f8) << 8) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0xf80000) >> 19) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0x0000f8) << 7) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0xffffff) /* BGR */) +#define ALLEGRO_CONVERT_BGR_888_TO_XBGR_8888(x) \ + (((x) & 0xffffff) /* BGR */) +#define ALLEGRO_CONVERT_BGR_888_TO_BGR_565(x) \ + ((((x) & 0xf80000) >> 8) /* B */ | \ + (((x) & 0x00fc00) >> 5) /* G */ | \ + (((x) & 0x0000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_BGR_555(x) \ + ((((x) & 0xf80000) >> 9) /* B */ | \ + (((x) & 0x00f800) >> 6) /* G */ | \ + (((x) & 0x0000f8) >> 3) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_RGBX_8888(x) \ + ((((x) & 0xff0000) >> 8) /* B */ | \ + (((x) & 0x00ff00) << 8) /* G */ | \ + (((x) & 0x0000ff) << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_XRGB_8888(x) \ + ((((x) & 0xff0000) >> 16) /* B */ | \ + ((x) & 0x00ff00) /* G */ | \ + (((x) & 0x0000ff) << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_888_TO_ABGR_F32(x) \ + al_map_rgb(((x) >> 0) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 16) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_BGR_888_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0xff0000) >> 8) /* B */ | \ + (((x) & 0x00ff00) << 8) /* G */ | \ + (((x) & 0x0000ff) << 24) /* R */) +#else +#define ALLEGRO_CONVERT_BGR_888_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0xffffff) /* BGR */) +#endif +#define ALLEGRO_CONVERT_BGR_888_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0xf00000) >> 16) /* B */ | \ + (((x) & 0x00f000) >> 4) /* G */ | \ + (((x) & 0x0000f0) << 8) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0xf000) >> 12) /* B */ | \ + (((x) & 0x0780) >> 3) /* G */ | \ + (((x) & 0x001e) << 7) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGB_565(x) \ + ((((x) & 0xf800) >> 11) /* B */ | \ + ((x) & 0x07e0) /* G */ | \ + (((x) & 0x001f) << 11) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGB_555(x) \ + ((((x) & 0xf800) >> 11) /* B */ | \ + (((x) & 0x07c0) >> 1) /* G */ | \ + (((x) & 0x001f) << 10) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0xf800) >> 10) /* B */ | \ + ((x) & 0x07c0) /* G */ | \ + (((x) & 0x001f) << 11) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0xf800) >> 11) /* B */ | \ + (((x) & 0x07c0) >> 1) /* G */ | \ + (((x) & 0x001f) << 10) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_BGR_555(x) \ + (((x) & 0x001f) /* R */ | \ + (((x) & 0xffc0) >> 1) /* BG */) +#define ALLEGRO_CONVERT_BGR_565_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0xf800) >> 11] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0xf800) >> 11] ) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_565_TO_ABGR_F32(x) \ + al_map_rgb(_al_rgb_scale_5[((x) >> 0) & 31],\ + _al_rgb_scale_6[((x) >> 5) & 63],\ + _al_rgb_scale_5[((x) >> 11) & 31]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_BGR_565_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 8) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_BGR_565_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0xf800) >> 11] << 16) /* B */ | \ + (_al_rgb_scale_6[((x) & 0x07e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x001f) >> 0] ) /* R */) +#endif +#define ALLEGRO_CONVERT_BGR_565_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0xf000) >> 8) /* B */ | \ + (((x) & 0x0780) << 1) /* G */ | \ + (((x) & 0x001e) << 11) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x7800) >> 11) /* B */ | \ + (((x) & 0x3c0) >> 2) /* G */ | \ + (((x) & 0x01e) << 7) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGB_888(x) \ + ((_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGB_565(x) \ + ((((x) & 0x7c00) >> 10) /* B */ | \ + (((x) & 0x3e0) << 1) /* G */ | \ + (((x) & 0x01f) << 11) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGB_555(x) \ + ((((x) & 0x7c00) >> 10) /* B */ | \ + ((x) & 0x3e0) /* G */ | \ + (((x) & 0x01f) << 10) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x7c00) >> 9) /* B */ | \ + (((x) & 0x3e0) << 1) /* G */ | \ + (((x) & 0x01f) << 11) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0x7c00) >> 10) /* B */ | \ + ((x) & 0x3e0) /* G */ | \ + (((x) & 0x01f) << 10) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_XBGR_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_BGR_888(x) \ + ((_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_BGR_565(x) \ + (((x) & 0x01f) /* R */ | \ + (((x) & 0x7fe0) << 1) /* BG */) +#define ALLEGRO_CONVERT_BGR_555_TO_RGBX_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 24) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_XRGB_8888(x) \ + ((_al_rgb_scale_5[((x) & 0x7c00) >> 10] ) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 16) /* R */) +#define ALLEGRO_CONVERT_BGR_555_TO_ABGR_F32(x) \ + al_map_rgb(_al_rgb_scale_5[((x) >> 0) & 31],\ + _al_rgb_scale_5[((x) >> 5) & 31],\ + _al_rgb_scale_5[((x) >> 10) & 31]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_BGR_555_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 8) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 16) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_BGR_555_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (_al_rgb_scale_5[((x) & 0x7c00) >> 10] << 16) /* B */ | \ + (_al_rgb_scale_5[((x) & 0x3e0) >> 5] << 8) /* G */ | \ + (_al_rgb_scale_5[((x) & 0x01f) >> 0] ) /* R */) +#endif +#define ALLEGRO_CONVERT_BGR_555_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0x7800) >> 7) /* B */ | \ + (((x) & 0x3c0) << 2) /* G */ | \ + (((x) & 0x01e) << 11) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + ((x) & 0xffffff00) /* BGR */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x0000f000) >> 12) /* B */ | \ + (((x) & 0x00f00000) >> 16) /* G */ | \ + (((x) & 0xf0000000) >> 20) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGB_888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGB_565(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGB_555(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x0000f800) >> 10) /* B */ | \ + (((x) & 0x00f80000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_XBGR_8888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_BGR_888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_BGR_565(x) \ + (((x) & 0x0000f800) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_BGR_555(x) \ + ((((x) & 0x0000f800) >> 1) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_XRGB_8888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#define ALLEGRO_CONVERT_RGBX_8888_TO_ABGR_F32(x) \ + al_map_rgb(((x) >> 24) & 255,\ + ((x) >> 16) & 255,\ + ((x) >> 8) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGBX_8888_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + ((x) & 0xffffff00) /* BGR */) +#else +#define ALLEGRO_CONVERT_RGBX_8888_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#endif +#define ALLEGRO_CONVERT_RGBX_8888_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + (((x) & 0x0000f000) >> 8) /* B */ | \ + (((x) & 0x00f00000) >> 12) /* G */ | \ + (((x) & 0xf0000000) >> 16) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_ARGB_8888(x) \ + ((0xff000000) /* A */ | \ + ((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGBA_8888(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0x00ffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_ARGB_4444(x) \ + ((0xf000) /* A */ | \ + (((x) & 0x000000f0) >> 4) /* B */ | \ + (((x) & 0x0000f000) >> 8) /* G */ | \ + (((x) & 0x00f00000) >> 12) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGB_888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGB_565(x) \ + ((((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGB_555(x) \ + ((((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGBA_5551(x) \ + ((0x0001) /* A */ | \ + (((x) & 0x000000f8) >> 2) /* B */ | \ + (((x) & 0x0000f800) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 8) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_ARGB_1555(x) \ + ((0x8000) /* A */ | \ + (((x) & 0x000000f8) >> 3) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 9) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_ABGR_8888(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_XBGR_8888(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_BGR_888(x) \ + ((((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_BGR_565(x) \ + ((((x) & 0x000000f8) << 8) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x00f80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_BGR_555(x) \ + ((((x) & 0x000000f8) << 7) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x00f80000) >> 19) /* R */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGBX_8888(x) \ + ((((x) & 0x00ffffff) << 8) /* BGR */) +#define ALLEGRO_CONVERT_XRGB_8888_TO_ABGR_F32(x) \ + al_map_rgb(((x) >> 16) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 0) & 255) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_XRGB_8888_TO_ABGR_8888_LE(x) \ + ((0x000000ff) /* A */ | \ + (((x) & 0x00ffffff) << 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_XRGB_8888_TO_ABGR_8888_LE(x) \ + ((0xff000000) /* A */ | \ + (((x) & 0x000000ff) << 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x00ff0000) >> 16) /* R */) +#endif +#define ALLEGRO_CONVERT_XRGB_8888_TO_RGBA_4444(x) \ + ((0x000f) /* A */ | \ + ((x) & 0x000000f0) /* B */ | \ + (((x) & 0x0000f000) >> 4) /* G */ | \ + (((x) & 0x00f00000) >> 8) /* R */) +#define ALLEGRO_CONVERT_ABGR_F32_TO_ARGB_8888(x) \ + (((uint32_t)((x).a * 255) << 24) | \ + ((uint32_t)((x).b * 255) << 0) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 16)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGBA_8888(x) \ + (((uint32_t)((x).a * 255) << 0) | \ + ((uint32_t)((x).b * 255) << 8) | \ + ((uint32_t)((x).g * 255) << 16) | \ + ((uint32_t)((x).r * 255) << 24)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_ARGB_4444(x) \ + (((uint32_t)((x).a * 15) << 12) | \ + ((uint32_t)((x).b * 15) << 0) | \ + ((uint32_t)((x).g * 15) << 4) | \ + ((uint32_t)((x).r * 15) << 8)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGB_888(x) \ + (((uint32_t)((x).b * 255) << 0) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 16)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGB_565(x) \ + (((uint32_t)((x).b * 31) << 0) | \ + ((uint32_t)((x).g * 63) << 5) | \ + ((uint32_t)((x).r * 31) << 11)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGB_555(x) \ + (((uint32_t)((x).b * 31) << 0) | \ + ((uint32_t)((x).g * 31) << 5) | \ + ((uint32_t)((x).r * 31) << 10)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGBA_5551(x) \ + (((uint32_t)((x).a * 1) << 0) | \ + ((uint32_t)((x).b * 31) << 1) | \ + ((uint32_t)((x).g * 31) << 6) | \ + ((uint32_t)((x).r * 31) << 11)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_ARGB_1555(x) \ + (((uint32_t)((x).a * 1) << 15) | \ + ((uint32_t)((x).b * 31) << 0) | \ + ((uint32_t)((x).g * 31) << 5) | \ + ((uint32_t)((x).r * 31) << 10)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_ABGR_8888(x) \ + (((uint32_t)((x).a * 255) << 24) | \ + ((uint32_t)((x).b * 255) << 16) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 0)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_XBGR_8888(x) \ + (((uint32_t)((x).b * 255) << 16) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 0)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_BGR_888(x) \ + (((uint32_t)((x).b * 255) << 16) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 0)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_BGR_565(x) \ + (((uint32_t)((x).b * 31) << 11) | \ + ((uint32_t)((x).g * 63) << 5) | \ + ((uint32_t)((x).r * 31) << 0)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_BGR_555(x) \ + (((uint32_t)((x).b * 31) << 10) | \ + ((uint32_t)((x).g * 31) << 5) | \ + ((uint32_t)((x).r * 31) << 0)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGBX_8888(x) \ + (((uint32_t)((x).b * 255) << 8) | \ + ((uint32_t)((x).g * 255) << 16) | \ + ((uint32_t)((x).r * 255) << 24)) +#define ALLEGRO_CONVERT_ABGR_F32_TO_XRGB_8888(x) \ + (((uint32_t)((x).b * 255) << 0) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 16)) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_F32_TO_ABGR_8888_LE(x) \ + (((uint32_t)((x).a * 255) << 0) | \ + ((uint32_t)((x).b * 255) << 8) | \ + ((uint32_t)((x).g * 255) << 16) | \ + ((uint32_t)((x).r * 255) << 24)) +#else +#define ALLEGRO_CONVERT_ABGR_F32_TO_ABGR_8888_LE(x) \ + (((uint32_t)((x).a * 255) << 24) | \ + ((uint32_t)((x).b * 255) << 16) | \ + ((uint32_t)((x).g * 255) << 8) | \ + ((uint32_t)((x).r * 255) << 0)) +#endif +#define ALLEGRO_CONVERT_ABGR_F32_TO_RGBA_4444(x) \ + (((uint32_t)((x).a * 15) << 0) | \ + ((uint32_t)((x).b * 15) << 4) | \ + ((uint32_t)((x).g * 15) << 8) | \ + ((uint32_t)((x).r * 15) << 12)) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_8888(x) \ + ((((x) & 0x000000ff) << 24) /* A */ | \ + (((x) & 0xffffff00) >> 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_8888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + (((x) & 0x000000ff) << 16) /* R */ | \ + ((x) & 0xff00ff00) /* AG */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_8888(x) \ + (((x) & 0xffffffff) /* ABGR */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_8888(x) \ + ((((x) & 0xff000000) >> 24) /* A */ | \ + (((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_4444(x) \ + ((((x) & 0x000000f0) << 8) /* A */ | \ + (((x) & 0x0000f000) >> 12) /* B */ | \ + (((x) & 0x00f00000) >> 16) /* G */ | \ + (((x) & 0xf0000000) >> 20) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_4444(x) \ + ((((x) & 0xf0000000) >> 16) /* A */ | \ + (((x) & 0x00f00000) >> 20) /* B */ | \ + (((x) & 0x0000f000) >> 8) /* G */ | \ + (((x) & 0x000000f0) << 4) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_565(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_565(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_555(x) \ + ((((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGB_555(x) \ + ((((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_5551(x) \ + ((((x) & 0x00000080) >> 7) /* A */ | \ + (((x) & 0x0000f800) >> 10) /* B */ | \ + (((x) & 0x00f80000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 16) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_5551(x) \ + ((((x) & 0x80000000) >> 31) /* A */ | \ + (((x) & 0x00f80000) >> 18) /* B */ | \ + (((x) & 0x0000f800) >> 5) /* G */ | \ + (((x) & 0x000000f8) << 8) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_1555(x) \ + ((((x) & 0x00000080) << 8) /* A */ | \ + (((x) & 0x0000f800) >> 11) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 17) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ARGB_1555(x) \ + ((((x) & 0x80000000) >> 16) /* A */ | \ + (((x) & 0x00f80000) >> 19) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) << 7) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ABGR_8888(x) \ + ((((x) & 0x000000ff) << 24) /* A */ | \ + (((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ABGR_8888(x) \ + (((x) & 0xffffffff) /* ABGR */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_XBGR_8888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_XBGR_8888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_888(x) \ + ((((x) & 0x0000ff00) << 8) /* B */ | \ + (((x) & 0x00ff0000) >> 8) /* G */ | \ + (((x) & 0xff000000) >> 24) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_888(x) \ + (((x) & 0x00ffffff) /* BGR */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_565(x) \ + (((x) & 0x0000f800) /* B */ | \ + (((x) & 0x00fc0000) >> 13) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_565(x) \ + ((((x) & 0x00f80000) >> 8) /* B */ | \ + (((x) & 0x0000fc00) >> 5) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_555(x) \ + ((((x) & 0x0000f800) >> 1) /* B */ | \ + (((x) & 0x00f80000) >> 14) /* G */ | \ + (((x) & 0xf8000000) >> 27) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_BGR_555(x) \ + ((((x) & 0x00f80000) >> 9) /* B */ | \ + (((x) & 0x0000f800) >> 6) /* G */ | \ + (((x) & 0x000000f8) >> 3) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBX_8888(x) \ + (((x) & 0xffffff00) /* BGR */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBX_8888(x) \ + ((((x) & 0x00ff0000) >> 8) /* B */ | \ + (((x) & 0x0000ff00) << 8) /* G */ | \ + (((x) & 0x000000ff) << 24) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_XRGB_8888(x) \ + ((((x) & 0xffffff00) >> 8) /* BGR */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_XRGB_8888(x) \ + ((((x) & 0x00ff0000) >> 16) /* B */ | \ + ((x) & 0x0000ff00) /* G */ | \ + (((x) & 0x000000ff) << 16) /* R */) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ABGR_F32(x) \ + al_map_rgba(((x) >> 24) & 255,\ + ((x) >> 16) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 0) & 255) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_ABGR_F32(x) \ + al_map_rgba(((x) >> 0) & 255,\ + ((x) >> 8) & 255,\ + ((x) >> 16) & 255,\ + ((x) >> 24) & 255) +#endif +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_4444(x) \ + ((((x) & 0x000000f0) >> 4) /* A */ | \ + (((x) & 0x0000f000) >> 8) /* B */ | \ + (((x) & 0x00f00000) >> 12) /* G */ | \ + (((x) & 0xf0000000) >> 16) /* R */) +#else +#define ALLEGRO_CONVERT_ABGR_8888_LE_TO_RGBA_4444(x) \ + ((((x) & 0xf0000000) >> 28) /* A */ | \ + (((x) & 0x00f00000) >> 16) /* B */ | \ + (((x) & 0x0000f000) >> 4) /* G */ | \ + (((x) & 0x000000f0) << 8) /* R */) +#endif +#define ALLEGRO_CONVERT_RGBA_4444_TO_ARGB_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGBA_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] ) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_ARGB_4444(x) \ + ((((x) & 0x000f) << 12) /* A */ | \ + (((x) & 0xfff0) >> 4) /* BGR */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGB_888(x) \ + ((_al_rgb_scale_4[((x) & 0x00f0) >> 4] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGB_565(x) \ + ((((x) & 0x00f0) >> 3) /* B */ | \ + (((x) & 0x0f00) >> 1) /* G */ | \ + ((x) & 0xf000) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGB_555(x) \ + ((((x) & 0x00f0) >> 3) /* B */ | \ + (((x) & 0x0f00) >> 2) /* G */ | \ + (((x) & 0xf000) >> 1) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGBA_5551(x) \ + ((((x) & 0x0008) >> 3) /* A */ | \ + (((x) & 0x00f0) >> 2) /* B */ | \ + (((x) & 0x0f00) >> 1) /* G */ | \ + ((x) & 0xf000) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_ARGB_1555(x) \ + ((((x) & 0x0008) << 12) /* A */ | \ + (((x) & 0x00f0) >> 3) /* B */ | \ + (((x) & 0x0f00) >> 2) /* G */ | \ + (((x) & 0xf000) >> 1) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_ABGR_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_XBGR_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_BGR_888(x) \ + ((_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_BGR_565(x) \ + ((((x) & 0x00f0) << 8) /* B */ | \ + (((x) & 0x0f00) >> 1) /* G */ | \ + (((x) & 0xf000) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_BGR_555(x) \ + ((((x) & 0x00f0) << 7) /* B */ | \ + (((x) & 0x0f00) >> 2) /* G */ | \ + (((x) & 0xf000) >> 11) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_RGBX_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_XRGB_8888(x) \ + ((_al_rgb_scale_4[((x) & 0x00f0) >> 4] ) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 16) /* R */) +#define ALLEGRO_CONVERT_RGBA_4444_TO_ABGR_F32(x) \ + al_map_rgba(_al_rgb_scale_4[((x) >> 12) & 15],\ + _al_rgb_scale_4[((x) >> 8) & 15],\ + _al_rgb_scale_4[((x) >> 4) & 15],\ + _al_rgb_scale_4[((x) >> 0) & 15]) +#ifdef ALLEGRO_BIG_ENDIAN +#define ALLEGRO_CONVERT_RGBA_4444_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] ) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 8) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 16) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] << 24) /* R */) +#else +#define ALLEGRO_CONVERT_RGBA_4444_TO_ABGR_8888_LE(x) \ + ((_al_rgb_scale_4[((x) & 0x000f) >> 0] << 24) /* A */ | \ + (_al_rgb_scale_4[((x) & 0x00f0) >> 4] << 16) /* B */ | \ + (_al_rgb_scale_4[((x) & 0x0f00) >> 8] << 8) /* G */ | \ + (_al_rgb_scale_4[((x) & 0xf000) >> 12] ) /* R */) +#endif +#endif +// Warning: This file was created by make_converters.py - do not edit. diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_debug.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_debug.h new file mode 100644 index 0000000..3e8a380 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_debug.h @@ -0,0 +1,16 @@ +#ifndef __al_included_allegro5_aintern_debug_h +#define __al_included_allegro5_aintern_debug_h + +#ifdef __cplusplus + extern "C" { +#endif + + +void _al_shutdown_logging(void); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_direct3d.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_direct3d.h new file mode 100644 index 0000000..de16151 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_direct3d.h @@ -0,0 +1,18 @@ +#ifndef __al_included_allegro5_aintern_direct3d_h +#define __al_included_allegro5_aintern_direct3d_h + +#ifdef __cplusplus +extern "C" { +#endif + + +struct ALLEGRO_DISPLAY_D3D; + +AL_FUNC(void, _al_d3d_set_blender, (struct ALLEGRO_DISPLAY_D3D *disp)); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_display.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_display.h new file mode 100644 index 0000000..ae41260 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_display.h @@ -0,0 +1,148 @@ +#ifndef __al_included_allegro5_aintern_display_h +#define __al_included_allegro5_aintern_display_h + +#include "allegro5/allegro.h" +#include "allegro5/transformations.h" +#include "allegro5/display.h" +#include "allegro5/bitmap.h" +#include "allegro5/internal/aintern_events.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ALLEGRO_DISPLAY_INTERFACE ALLEGRO_DISPLAY_INTERFACE; + +struct ALLEGRO_DISPLAY_INTERFACE +{ + int id; + ALLEGRO_DISPLAY *(*create_display)(int w, int h); + void (*destroy_display)(ALLEGRO_DISPLAY *display); + bool (*set_current_display)(ALLEGRO_DISPLAY *d); + void (*unset_current_display)(ALLEGRO_DISPLAY *d); + void (*clear)(ALLEGRO_DISPLAY *d, ALLEGRO_COLOR *color); + void (*draw_pixel)(ALLEGRO_DISPLAY *d, float x, float y, ALLEGRO_COLOR *color); + void (*flip_display)(ALLEGRO_DISPLAY *d); + void (*update_display_region)(ALLEGRO_DISPLAY *d, int x, int y, + int width, int height); + bool (*acknowledge_resize)(ALLEGRO_DISPLAY *d); + bool (*resize_display)(ALLEGRO_DISPLAY *d, int width, int height); + void (*quick_size)(ALLEGRO_DISPLAY *d); + + ALLEGRO_BITMAP *(*create_bitmap)(ALLEGRO_DISPLAY *d, + int w, int h); + + void (*set_target_bitmap)(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap); + ALLEGRO_BITMAP *(*get_backbuffer)(ALLEGRO_DISPLAY *d); + + bool (*is_compatible_bitmap)(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap); + void (*switch_out)(ALLEGRO_DISPLAY *display); + void (*switch_in)(ALLEGRO_DISPLAY *display); + + void (*draw_memory_bitmap_region)(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap, + float sx, float sy, float sw, float sh, int flags); + + ALLEGRO_BITMAP *(*create_sub_bitmap)(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *parent, + int x, int y, int width, int height); + + bool (*wait_for_vsync)(ALLEGRO_DISPLAY *display); + + bool (*set_mouse_cursor)(ALLEGRO_DISPLAY *display, + ALLEGRO_MOUSE_CURSOR *cursor); + bool (*set_system_mouse_cursor)(ALLEGRO_DISPLAY *display, + ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id); + bool (*show_mouse_cursor)(ALLEGRO_DISPLAY *display); + bool (*hide_mouse_cursor)(ALLEGRO_DISPLAY *display); + + void (*set_icons)(ALLEGRO_DISPLAY *display, int num_icons, ALLEGRO_BITMAP *bitmap[]); + + void (*set_window_position)(ALLEGRO_DISPLAY *display, int x, int y); + void (*get_window_position)(ALLEGRO_DISPLAY *display, int *x, int *y); + bool (*set_display_flag)(ALLEGRO_DISPLAY *display, int flag, bool onoff); + void (*set_window_title)(ALLEGRO_DISPLAY *display, const char *title); + + void (*flush_vertex_cache)(ALLEGRO_DISPLAY *d); + void* (*prepare_vertex_cache)(ALLEGRO_DISPLAY *d, int num_new_vertices); + + void (*update_transformation)(ALLEGRO_DISPLAY* d, ALLEGRO_BITMAP *target); + + void (*shutdown)(void); +}; + + +struct ALLEGRO_OGL_EXTRAS; + +typedef struct ALLEGRO_BLENDER +{ + int blend_op; + int blend_source; + int blend_dest; + int blend_alpha_op; + int blend_alpha_source; + int blend_alpha_dest; +} ALLEGRO_BLENDER; + +/* These are settings Allegro itself doesn't really care about on its + * own, but which users may want to specify for a display anyway. + */ +ALLEGRO_STATIC_ASSERT(aintern_display, ALLEGRO_DISPLAY_OPTIONS_COUNT <= 32); +typedef struct +{ + int required, suggested; /* Bitfields. */ + int settings[ALLEGRO_DISPLAY_OPTIONS_COUNT]; + + /* These are come in handy when creating a context. */ + void *info; + int index, score; +} ALLEGRO_EXTRA_DISPLAY_SETTINGS; + +struct ALLEGRO_DISPLAY +{ + /* Must be first, so the display can be used as event source. */ + ALLEGRO_EVENT_SOURCE es; + ALLEGRO_DISPLAY_INTERFACE *vt; + int refresh_rate; + int flags; + int w, h; + + int backbuffer_format; /* ALLEGRO_PIXELFORMAT */ + + ALLEGRO_EXTRA_DISPLAY_SETTINGS extra_settings; + struct ALLEGRO_OGL_EXTRAS *ogl_extras; + + _AL_VECTOR bitmaps; /* A list of bitmaps created for this display. */ + + int num_cache_vertices; + bool cache_enabled; + int vertex_cache_size; + void* vertex_cache; + uintptr_t cache_texture; + + ALLEGRO_BLENDER cur_blender; + + void (*display_invalidated)(ALLEGRO_DISPLAY*); +}; + +int _al_score_display_settings(ALLEGRO_EXTRA_DISPLAY_SETTINGS *eds, ALLEGRO_EXTRA_DISPLAY_SETTINGS *ref); +void _al_fill_display_settings(ALLEGRO_EXTRA_DISPLAY_SETTINGS *eds); +void _al_set_color_components(int format, ALLEGRO_EXTRA_DISPLAY_SETTINGS *eds, int importance); +int _al_deduce_color_format(ALLEGRO_EXTRA_DISPLAY_SETTINGS *eds); +int _al_display_settings_sorter(const void *p0, const void *p1); + +void _al_destroy_display_bitmaps(ALLEGRO_DISPLAY *d); + +/* This is called from the primitives addon. */ +AL_FUNC(void, _al_set_display_invalidated_callback, (ALLEGRO_DISPLAY *display, + void (*display_invalidated)(ALLEGRO_DISPLAY*))); + +/* Defined in tls.c */ +bool _al_set_current_display_only(ALLEGRO_DISPLAY *display); +void _al_set_new_display_settings(ALLEGRO_EXTRA_DISPLAY_SETTINGS *settings); +ALLEGRO_EXTRA_DISPLAY_SETTINGS *_al_get_new_display_settings(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_driver.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_driver.h new file mode 100644 index 0000000..72bd4ea --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_driver.h @@ -0,0 +1,13 @@ +#ifndef __al_included_allegro5_internal_aintern_driver_h +#define __al_included_allegro5_internal_aintern_driver_h + + +typedef struct _AL_DRIVER_INFO /* info about a hardware driver */ +{ + int id; /* integer ID */ + void *driver; /* the driver structure */ + int autodetect; /* set to allow autodetection */ +} _AL_DRIVER_INFO; + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_dtor.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_dtor.h new file mode 100644 index 0000000..cf5663e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_dtor.h @@ -0,0 +1,31 @@ +#ifndef __al_included_allegro5_aintern_dtor_h +#define __al_included_allegro5_aintern_dtor_h + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct _AL_DTOR_LIST _AL_DTOR_LIST; + + +AL_FUNC(_AL_DTOR_LIST *, _al_init_destructors, (void)); +AL_FUNC(void, _al_push_destructor_owner, (void)); +AL_FUNC(void, _al_pop_destructor_owner, (void)); +AL_FUNC(void, _al_run_destructors, (_AL_DTOR_LIST *dtors)); +AL_FUNC(void, _al_shutdown_destructors, (_AL_DTOR_LIST *dtors)); +AL_FUNC(void, _al_register_destructor, (_AL_DTOR_LIST *dtors, void *object, + void (*func)(void*))); +AL_FUNC(void, _al_unregister_destructor, (_AL_DTOR_LIST *dtors, void *object)); +AL_FUNC(void, _al_foreach_destructor, (_AL_DTOR_LIST *dtors, + void (*callback)(void *object, void (*func)(void *), void *udata), + void *userdata)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_events.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_events.h new file mode 100644 index 0000000..09cba1e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_events.h @@ -0,0 +1,48 @@ +#ifndef __al_included_allegro5_aintern_events_h +#define __al_included_allegro5_aintern_events_h + +#include "allegro5/internal/aintern_thread.h" +#include "allegro5/internal/aintern_vector.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct ALLEGRO_EVENT_SOURCE_REAL ALLEGRO_EVENT_SOURCE_REAL; + +struct ALLEGRO_EVENT_SOURCE_REAL +{ + _AL_MUTEX mutex; + _AL_VECTOR queues; + intptr_t data; +}; + +typedef struct ALLEGRO_USER_EVENT_DESCRIPTOR +{ + void (*dtor)(ALLEGRO_USER_EVENT *event); + int refcount; +} ALLEGRO_USER_EVENT_DESCRIPTOR; + + +AL_FUNC(void, _al_init_events, (void)); + +AL_FUNC(void, _al_event_source_init, (ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, _al_event_source_free, (ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, _al_event_source_lock, (ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, _al_event_source_unlock, (ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, _al_event_source_on_registration_to_queue, (ALLEGRO_EVENT_SOURCE*, ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(void, _al_event_source_on_unregistration_from_queue, (ALLEGRO_EVENT_SOURCE*, ALLEGRO_EVENT_QUEUE*)); +AL_FUNC(bool, _al_event_source_needs_to_generate_event, (ALLEGRO_EVENT_SOURCE*)); +AL_FUNC(void, _al_event_source_emit_event, (ALLEGRO_EVENT_SOURCE *, ALLEGRO_EVENT*)); + +AL_FUNC(void, _al_event_queue_push_event, (ALLEGRO_EVENT_QUEUE*, const ALLEGRO_EVENT*)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vi ts=8 sts=3 sw=3 et */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_exitfunc.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_exitfunc.h new file mode 100644 index 0000000..119b91d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_exitfunc.h @@ -0,0 +1,19 @@ +#ifndef __al_included_allegro5_aintern_exitfunc_h +#define __al_included_allegro5_aintern_exitfunc_h + +#ifdef __cplusplus + extern "C" { +#endif + + +/* list of functions to call at program cleanup */ +AL_FUNC(void, _al_add_exit_func, (AL_METHOD(void, func, (void)), const char *desc)); +AL_FUNC(void, _al_remove_exit_func, (AL_METHOD(void, func, (void)))); +AL_FUNC(void, _al_run_exit_funcs, (void)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_file.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_file.h new file mode 100644 index 0000000..81a7fe5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_file.h @@ -0,0 +1,27 @@ +#ifndef __al_included_allegro5_aintern_file_h +#define __al_included_allegro5_aintern_file_h + +#ifdef __cplusplus + extern "C" { +#endif + + +extern const ALLEGRO_FILE_INTERFACE _al_file_interface_stdio; + +#define ALLEGRO_UNGETC_SIZE 16 + +struct ALLEGRO_FILE +{ + const ALLEGRO_FILE_INTERFACE *vtable; + void *userdata; + unsigned char ungetc[ALLEGRO_UNGETC_SIZE]; + int ungetc_len; +}; + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_float.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_float.h new file mode 100644 index 0000000..bca66cf --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_float.h @@ -0,0 +1,16 @@ +#ifndef __al_included_allegro5_aintern_float_h +#define __al_included_allegro5_aintern_float_h + + /* This file used to contain a tricky function that sped up float->int + * conversions on x86 machines when the SSE instruction CVTTSS2SI wasn't + * available (or when SSE wasn't enabled in the compiler). + * + * However, it performed rounding instead of truncating like (int)f, which + * did cause problems. If an alternative is found we could define this + * macro once again. + */ + #define _al_fast_float_to_int(f) ((int)(f)) + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_fshook.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_fshook.h new file mode 100644 index 0000000..e159d57 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_fshook.h @@ -0,0 +1,33 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Internal File System Hook support. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_aintern_fshook_h +#define __al_included_allegro5_aintern_fshook_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +extern struct ALLEGRO_FS_INTERFACE _al_fs_interface_stdio; + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_gp2xwiz.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_gp2xwiz.h new file mode 100644 index 0000000..be73164 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_gp2xwiz.h @@ -0,0 +1,51 @@ +#ifndef __al_included_allegro5_aintern_gp2xwiz_h +#define __al_included_allegro5_aintern_gp2xwiz_h + +#include "allegro5/allegro.h" +#include "allegro5/allegro_opengl.h" +#include "allegro5/internal/aintern.h" +#include "allegro5/internal/aintern_system.h" +#include "allegro5/internal/aintern_bitmap.h" +#include "allegro5/platform/aintwiz.h" +#include "allegro5/internal/aintern_opengl.h" + +#include + +typedef struct ALLEGRO_SYSTEM_GP2XWIZ ALLEGRO_SYSTEM_GP2XWIZ; +typedef struct ALLEGRO_DISPLAY_GP2XWIZ_OGL ALLEGRO_DISPLAY_GP2XWIZ_OGL; +typedef struct ALLEGRO_DISPLAY_GP2XWIZ_FB ALLEGRO_DISPLAY_GP2XWIZ_FB; + +struct ALLEGRO_SYSTEM_GP2XWIZ +{ + ALLEGRO_SYSTEM system; /* This must be the first member, we "derive" from it. */ + + ALLEGRO_EXTRA_DISPLAY_SETTINGS extras; +}; + +/* This is our version of ALLEGRO_DISPLAY with driver specific extra data. */ +struct ALLEGRO_DISPLAY_GP2XWIZ_OGL +{ + ALLEGRO_DISPLAY display; /* This must be the first member. */ + + EGLDisplay egl_display; + EGLConfig egl_config; + EGLContext egl_context; + EGLSurface egl_surface; + NativeWindowType hNativeWnd; +}; + +/* This is our version of ALLEGRO_DISPLAY with driver specific extra data. */ +struct ALLEGRO_DISPLAY_GP2XWIZ_FB +{ + ALLEGRO_DISPLAY display; /* This must be the first member. */ + + ALLEGRO_BITMAP *backbuffer; + /* + * We create the backbuffer bitmap then points it's ->memory at + * lc_fb1 (initialized with libcastor. This is a backup of the + * ->memory as created by al_create_bitmap. + */ + unsigned char *screen_mem; +}; + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image.h new file mode 100644 index 0000000..bd22efa --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image.h @@ -0,0 +1,73 @@ +#ifndef __al_included_allegro_aintern_image_h +#define __al_included_allegro_aintern_image_h + +#include "allegro5/platform/alplatf.h" +#include "allegro5/internal/aintern_image_cfg.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef ALLEGRO_CFG_WANT_NATIVE_IMAGE_LOADER + +#ifdef ALLEGRO_IPHONE +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_iphone_load_image, (const char *filename)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_iphone_load_image_f, (ALLEGRO_FILE *f)); +#endif + +#ifdef ALLEGRO_MACOSX +ALLEGRO_IIO_FUNC(bool, _al_osx_register_image_loader, (void)); +#endif + +#endif + +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_pcx, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_pcx, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_pcx_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_pcx_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); + +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_bmp, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_bmp, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_bmp_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_bmp_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); + +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_tga, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_tga, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_tga_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_tga_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); + +#ifdef ALLEGRO_CFG_IIO_HAVE_GDIPLUS +ALLEGRO_IIO_FUNC(bool, _al_init_gdiplus, (void)); +ALLEGRO_IIO_FUNC(void, _al_shutdown_gdiplus, (void)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_gdiplus_bitmap, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_gdiplus_bitmap, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_gdiplus_bitmap_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_gdiplus_png_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(bool, _al_save_gdiplus_jpg_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(bool, _al_save_gdiplus_tif_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(bool, _al_save_gdiplus_gif_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +#endif + +/* ALLEGRO_CFG_IIO_HAVE_PNG/JPG implies that "native" loaders aren't available. */ + +#ifdef ALLEGRO_CFG_IIO_HAVE_PNG +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_png, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_png, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_png_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_png_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +#endif + +#ifdef ALLEGRO_CFG_IIO_HAVE_JPG +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_jpg, (const char *filename)); +ALLEGRO_IIO_FUNC(bool, _al_save_jpg, (const char *filename, ALLEGRO_BITMAP *bmp)); +ALLEGRO_IIO_FUNC(ALLEGRO_BITMAP *, _al_load_jpg_f, (ALLEGRO_FILE *f)); +ALLEGRO_IIO_FUNC(bool, _al_save_jpg_f, (ALLEGRO_FILE *f, ALLEGRO_BITMAP *bmp)); +#endif + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image_cfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image_cfg.h new file mode 100644 index 0000000..6cd46bf --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_image_cfg.h @@ -0,0 +1,12 @@ +#define ALLEGRO_CFG_WANT_NATIVE_IMAGE_LOADER + +/* which libraries are present and needed? */ +#define ALLEGRO_CFG_IIO_HAVE_GDIPLUS +/* #undef ALLEGRO_CFG_IIO_HAVE_GDIPLUS_LOWERCASE_H */ +/* #undef ALLEGRO_CFG_IIO_HAVE_ANDROID */ +/* #undef ALLEGRO_CFG_IIO_HAVE_PNG */ +/* #undef ALLEGRO_CFG_IIO_HAVE_JPG */ + +/* which formats are supported and wanted? */ +#define ALLEGRO_CFG_IIO_SUPPORT_PNG +#define ALLEGRO_CFG_IIO_SUPPORT_JPG diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_iphone.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_iphone.h new file mode 100644 index 0000000..59a1c93 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_iphone.h @@ -0,0 +1,42 @@ +#include "allegro5/allegro.h" +#include +#include + +typedef struct ALLEGRO_SYSTEM_IPHONE { + ALLEGRO_SYSTEM system; + + ALLEGRO_MUTEX *mutex; + ALLEGRO_COND *cond; + + bool has_shutdown, wants_shutdown; + int visuals_count; + ALLEGRO_EXTRA_DISPLAY_SETTINGS **visuals; +} ALLEGRO_SYSTEM_IPHONE; + +typedef struct ALLEGRO_DISPLAY_IPHONE { + ALLEGRO_DISPLAY display; +} ALLEGRO_DISPLAY_IPHONE; + +void _al_iphone_init_path(void); +void _al_iphone_add_view(ALLEGRO_DISPLAY *d); +void _al_iphone_make_view_current(void); +void _al_iphone_flip_view(void); +void _al_iphone_reset_framebuffer(void); +ALLEGRO_SYSTEM_INTERFACE *_al_get_iphone_system_interface(void); +ALLEGRO_DISPLAY_INTERFACE *_al_get_iphone_display_interface(void); +ALLEGRO_PATH *_al_iphone_get_path(int id); +ALLEGRO_KEYBOARD_DRIVER *_al_get_iphone_keyboard_driver(void); +ALLEGRO_MOUSE_DRIVER *_al_get_iphone_mouse_driver(void); +ALLEGRO_JOYSTICK_DRIVER *_al_get_iphone_joystick_driver(void); +void _al_iphone_setup_opengl_view(ALLEGRO_DISPLAY *d); +void _al_iphone_generate_mouse_event(unsigned int type, + int x, int y, unsigned int button, ALLEGRO_DISPLAY *d); +void _al_iphone_update_visuals(void); +void _al_iphone_accelerometer_control(int frequency); +void _al_iphone_generate_joystick_event(float x, float y, float z); +void _al_iphone_await_termination(void); +void _al_iphone_get_screen_size(int *w, int *h); +void _al_iphone_translate_from_screen(ALLEGRO_DISPLAY *d, int *x, int *y); +void _al_iphone_translate_to_screen(ALLEGRO_DISPLAY *d, int *x, int *y); +void _al_iphone_clip(ALLEGRO_BITMAP const *bitmap, int x_1, int y_1, int x_2, int y_2); +float _al_iphone_get_screen_scale(void); diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_joystick.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_joystick.h new file mode 100644 index 0000000..d9bfadf --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_joystick.h @@ -0,0 +1,90 @@ +#ifndef __al_included_allegro5_aintern_joystick_h +#define __al_included_allegro5_aintern_joystick_h + +#include "allegro5/internal/aintern_driver.h" +#include "allegro5/internal/aintern_events.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct ALLEGRO_JOYSTICK_DRIVER +{ + int joydrv_id; + const char *joydrv_name; + const char *joydrv_desc; + const char *joydrv_ascii_name; + AL_METHOD(bool, init_joystick, (void)); + AL_METHOD(void, exit_joystick, (void)); + AL_METHOD(bool, reconfigure_joysticks, (void)); + AL_METHOD(int, num_joysticks, (void)); + AL_METHOD(ALLEGRO_JOYSTICK *, get_joystick, (int joyn)); + AL_METHOD(void, release_joystick, (ALLEGRO_JOYSTICK *joy)); + AL_METHOD(void, get_joystick_state, (ALLEGRO_JOYSTICK *joy, ALLEGRO_JOYSTICK_STATE *ret_state)); + AL_METHOD(const char *, get_name, (ALLEGRO_JOYSTICK *joy)); + AL_METHOD(bool, get_active, (ALLEGRO_JOYSTICK *joy)); +} ALLEGRO_JOYSTICK_DRIVER; + + +AL_ARRAY(_AL_DRIVER_INFO, _al_joystick_driver_list); + + +/* macros for constructing the driver list */ +#define _AL_BEGIN_JOYSTICK_DRIVER_LIST \ + _AL_DRIVER_INFO _al_joystick_driver_list[] = \ + { + +#define _AL_END_JOYSTICK_DRIVER_LIST \ + { 0, NULL, false } \ + }; + + +/* information about a single joystick axis */ +typedef struct _AL_JOYSTICK_AXIS_INFO +{ + char *name; +} _AL_JOYSTICK_AXIS_INFO; + + +/* information about one or more axis (a slider or directional control) */ +typedef struct _AL_JOYSTICK_STICK_INFO +{ + int flags; /* bit-field */ + int num_axes; + _AL_JOYSTICK_AXIS_INFO axis[_AL_MAX_JOYSTICK_AXES]; + char *name; +} _AL_JOYSTICK_STICK_INFO; + + +/* information about a joystick button */ +typedef struct _AL_JOYSTICK_BUTTON_INFO +{ + const char *name; +} _AL_JOYSTICK_BUTTON_INFO; + + +/* information about an entire joystick */ +typedef struct _AL_JOYSTICK_INFO +{ + int num_sticks; + int num_buttons; + _AL_JOYSTICK_STICK_INFO stick[_AL_MAX_JOYSTICK_STICKS]; + _AL_JOYSTICK_BUTTON_INFO button[_AL_MAX_JOYSTICK_BUTTONS]; +} _AL_JOYSTICK_INFO; + + +struct ALLEGRO_JOYSTICK +{ + _AL_JOYSTICK_INFO info; +}; + +void _al_generate_joystick_event(ALLEGRO_EVENT *event); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vi ts=8 sts=3 sw=3 et */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_keyboard.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_keyboard.h new file mode 100644 index 0000000..94e8668 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_keyboard.h @@ -0,0 +1,64 @@ +#ifndef __al_included_allegro5_aintern_keyboard_h +#define __al_included_allegro5_aintern_keyboard_h + +#include "allegro5/internal/aintern_driver.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct ALLEGRO_KEYBOARD_DRIVER +{ + int keydrv_id; + const char *keydrv_name; + const char *keydrv_desc; + const char *keydrv_ascii_name; + AL_METHOD(bool, init_keyboard, (void)); + AL_METHOD(void, exit_keyboard, (void)); + AL_METHOD(ALLEGRO_KEYBOARD*, get_keyboard, (void)); + AL_METHOD(bool, set_keyboard_leds, (int leds)); + AL_METHOD(const char *, keycode_to_name, (int keycode)); + AL_METHOD(void, get_keyboard_state, (ALLEGRO_KEYBOARD_STATE *ret_state)); +} ALLEGRO_KEYBOARD_DRIVER; + + +AL_ARRAY(_AL_DRIVER_INFO, _al_keyboard_driver_list); + +AL_ARRAY(const char *, _al_keyboard_common_names); + +int _al_parse_key_binding(const char *s, unsigned int *modifiers); + + +struct ALLEGRO_KEYBOARD +{ + ALLEGRO_EVENT_SOURCE es; +}; + + +/* Helpers for AL_KEYBOARD_STATE structures. */ + +#define _AL_KEYBOARD_STATE_KEY_DOWN(STATE, KEYCODE) \ + (((STATE).__key_down__internal__[(KEYCODE) / 32] & (1 << ((KEYCODE) % 32)))\ + ? true : false) + +#define _AL_KEYBOARD_STATE_SET_KEY_DOWN(STATE, KEYCODE) \ + do { \ + int kc = (KEYCODE); \ + (STATE).__key_down__internal__[kc / 32] |= (1 << (kc % 32)); \ + } while (0) + +#define _AL_KEYBOARD_STATE_CLEAR_KEY_DOWN(STATE, KEYCODE) \ + do { \ + int kc = (KEYCODE); \ + (STATE).__key_down__internal__[kc / 32] &= ~(1 << (kc % 32)); \ + } while (0) + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vi ts=8 sts=3 sw=3 et */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_list.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_list.h new file mode 100644 index 0000000..c700773 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_list.h @@ -0,0 +1,75 @@ +#ifndef __al_included_allegro5_aintern_list_h +#define __al_included_allegro5_aintern_list_h + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _AL_LIST _AL_LIST; +typedef struct _AL_LIST_ITEM _AL_LIST_ITEM; + +typedef void (*_AL_LIST_DTOR)(void* userdata); +typedef void (*_AL_LIST_ITEM_DTOR)(void* value, void* userdata); + +AL_FUNC(_AL_LIST*, _al_list_create, (void)); +AL_FUNC(_AL_LIST*, _al_list_create_static, (size_t capacity)); +AL_FUNC(void, _al_list_destroy, (_AL_LIST* list)); + +AL_FUNC(void, _al_list_set_dtor, (_AL_LIST* list, _AL_LIST_DTOR dtor)); +AL_FUNC(_AL_LIST_DTOR, _al_list_get_dtor, (_AL_LIST* list)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_push_front, (_AL_LIST* list, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_push_front_ex, (_AL_LIST* list, void* data, _AL_LIST_ITEM_DTOR dtor)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_push_back, (_AL_LIST* list, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_push_back_ex, (_AL_LIST* list, void* data, _AL_LIST_ITEM_DTOR dtor)); + +AL_FUNC(void, _al_list_pop_front, (_AL_LIST* list)); +AL_FUNC(void, _al_list_pop_back, (_AL_LIST* list)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_after, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_after_ex, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data, _AL_LIST_ITEM_DTOR dtor)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_before, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_before_ex, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data, _AL_LIST_ITEM_DTOR dtor)); + +AL_FUNC(void, _al_list_erase, (_AL_LIST* list, _AL_LIST_ITEM* item)); + +AL_FUNC(void, _al_list_clear, (_AL_LIST* list)); + +AL_FUNC(void, _al_list_remove, (_AL_LIST* list, void* data)); + +AL_FUNC(bool, _al_list_is_empty, (_AL_LIST* list)); + +AL_FUNC(bool, _al_list_contains, (_AL_LIST* list, void* data)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_find_first, (_AL_LIST* list, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_find_last, (_AL_LIST* list, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_find_after, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_find_before, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data)); + +AL_FUNC(size_t, _al_list_size, (_AL_LIST* list)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_at, (_AL_LIST* list, size_t index)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_front, (_AL_LIST* list)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_back, (_AL_LIST* list)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_next, (_AL_LIST* list, _AL_LIST_ITEM* item)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_previous, (_AL_LIST* list, _AL_LIST_ITEM* item)); + +AL_FUNC(_AL_LIST_ITEM*, _al_list_next_circular, (_AL_LIST* list, _AL_LIST_ITEM* item)); +AL_FUNC(_AL_LIST_ITEM*, _al_list_previous_circular, (_AL_LIST* list, _AL_LIST_ITEM* item)); + +AL_FUNC(void*, _al_list_item_data, (_AL_LIST_ITEM* item)); + +AL_FUNC(void, _al_list_item_set_dtor, (_AL_LIST_ITEM* item, _AL_LIST_ITEM_DTOR dtor)); +AL_FUNC(_AL_LIST_ITEM_DTOR, _al_list_item_get_dtor, (_AL_LIST_ITEM* item)); + +AL_FUNC(void, _al_list_set_user_data, (_AL_LIST* list, void* user_data)); +AL_FUNC(void*, _al_list_get_user_data, (_AL_LIST* list)); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memblit.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memblit.h new file mode 100644 index 0000000..0e6bed2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memblit.h @@ -0,0 +1,20 @@ +#ifndef __al_included_allegro5_aintern_memblit_h +#define __al_included_allegro5_aintern_memblit_h + +#ifdef __cplusplus + extern "C" { +#endif + + +void _al_draw_bitmap_region_memory(ALLEGRO_BITMAP *bitmap, + ALLEGRO_COLOR tint, + int sx, int sy, int sw, int sh, int dx, int dy, int flags); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memdraw.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memdraw.h new file mode 100644 index 0000000..adb2956 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_memdraw.h @@ -0,0 +1,19 @@ +#ifndef __al_included_allegro5_aintern_memdraw_h +#define __al_included_allegro5_aintern_memdraw_h + +#ifdef __cplusplus + extern "C" { +#endif + + +void _al_clear_bitmap_by_locking(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR *color); +void _al_draw_pixel_memory(ALLEGRO_BITMAP *bmp, float x, float y, ALLEGRO_COLOR *color); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_mouse.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_mouse.h new file mode 100644 index 0000000..7fdeacf --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_mouse.h @@ -0,0 +1,44 @@ +#ifndef __al_included_allegro5_aintern_mouse_h +#define __al_included_allegro5_aintern_mouse_h + +#include "allegro5/internal/aintern_driver.h" +#include "allegro5/internal/aintern_events.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct ALLEGRO_MOUSE_DRIVER +{ + int msedrv_id; + const char *msedrv_name; + const char *msedrv_desc; + const char *msedrv_ascii_name; + AL_METHOD(bool, init_mouse, (void)); + AL_METHOD(void, exit_mouse, (void)); + AL_METHOD(ALLEGRO_MOUSE*, get_mouse, (void)); + AL_METHOD(unsigned int, get_mouse_num_buttons, (void)); + AL_METHOD(unsigned int, get_mouse_num_axes, (void)); + AL_METHOD(bool, set_mouse_xy, (ALLEGRO_DISPLAY *display, int x, int y)); + AL_METHOD(bool, set_mouse_axis, (int which, int value)); + AL_METHOD(void, get_mouse_state, (ALLEGRO_MOUSE_STATE *ret_state)); +} ALLEGRO_MOUSE_DRIVER; + + +AL_ARRAY(_AL_DRIVER_INFO, _al_mouse_driver_list); + + +struct ALLEGRO_MOUSE +{ + ALLEGRO_EVENT_SOURCE es; +}; + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vi ts=8 sts=3 sw=3 et */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog.h new file mode 100644 index 0000000..bd46131 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog.h @@ -0,0 +1,53 @@ +#ifndef __al_included_allegro_aintern_native_dialog_h +#define __al_included_allegro_aintern_native_dialog_h + +typedef struct ALLEGRO_NATIVE_DIALOG ALLEGRO_NATIVE_DIALOG; + +/* We could use different structs for the different dialogs. But why + * bother. + */ +struct ALLEGRO_NATIVE_DIALOG +{ + ALLEGRO_USTR *title; + int flags; + + /* Only used by file chooser. */ + ALLEGRO_PATH *fc_initial_path; + size_t fc_path_count; + ALLEGRO_PATH **fc_paths; + ALLEGRO_USTR *fc_patterns; + + /* Only used by message box. */ + ALLEGRO_USTR *mb_heading; + ALLEGRO_USTR *mb_text; + ALLEGRO_USTR *mb_buttons; + int mb_pressed_button; + + /* Only used by text log. */ + ALLEGRO_THREAD *tl_thread; + ALLEGRO_COND *tl_text_cond; + ALLEGRO_MUTEX *tl_text_mutex; + ALLEGRO_USTR *tl_pending_text; + bool tl_init_error; + bool tl_done; + bool tl_have_pending; + ALLEGRO_EVENT_SOURCE tl_events; + void *tl_textview; + + /* Only used by platform implementations. */ + bool is_active; + void *window; + void *async_queue; +}; + +extern bool _al_init_native_dialog_addon(void); +extern void _al_shutdown_native_dialog_addon(void); +extern bool _al_show_native_file_dialog(ALLEGRO_DISPLAY *display, + ALLEGRO_NATIVE_DIALOG *fd); +extern int _al_show_native_message_box(ALLEGRO_DISPLAY *display, + ALLEGRO_NATIVE_DIALOG *fd); +extern bool _al_open_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog); +extern void _al_close_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog); +extern void _al_append_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog_cfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog_cfg.h new file mode 100644 index 0000000..6705465 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_native_dialog_cfg.h @@ -0,0 +1,3 @@ +/* #undef ALLEGRO_CFG_NATIVE_DIALOG_GTK */ +/* #undef ALLEGRO_CFG_NATIVE_DIALOG_OSX */ +#define ALLEGRO_CFG_NATIVE_DIALOG_WINDOWS diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_opengl.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_opengl.h new file mode 100644 index 0000000..85c0586 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_opengl.h @@ -0,0 +1,143 @@ +#ifndef __al_included_allegro5_aintern_opengl_h +#define __al_included_allegro5_aintern_opengl_h + +#include "allegro5/opengl/gl_ext.h" +#include "allegro5/internal/aintern_bitmap.h" +#include "allegro5/internal/aintern_display.h" + + +enum { + _ALLEGRO_OPENGL_VERSION_0 = 0, /* dummy */ + _ALLEGRO_OPENGL_VERSION_1_0 = 0x01000000, + _ALLEGRO_OPENGL_VERSION_1_1 = 0x01010000, + _ALLEGRO_OPENGL_VERSION_1_2 = 0x01020000, + _ALLEGRO_OPENGL_VERSION_1_2_1 = 0x01020100, + _ALLEGRO_OPENGL_VERSION_1_3 = 0x01030000, + _ALLEGRO_OPENGL_VERSION_1_4 = 0x01040000, + _ALLEGRO_OPENGL_VERSION_1_5 = 0x01050000, + _ALLEGRO_OPENGL_VERSION_2_0 = 0x02000000, + _ALLEGRO_OPENGL_VERSION_2_1 = 0x02010000, + _ALLEGRO_OPENGL_VERSION_3_0 = 0x03000000, + _ALLEGRO_OPENGL_VERSION_3_1 = 0x03010000, + _ALLEGRO_OPENGL_VERSION_3_2 = 0x03020000, + _ALLEGRO_OPENGL_VERSION_3_3 = 0x03030000, + _ALLEGRO_OPENGL_VERSION_4_0 = 0x04000000 +}; + +#define ALLEGRO_MAX_OPENGL_FBOS 8 + +struct ALLEGRO_BITMAP_OGL; + +enum { + FBO_INFO_UNUSED = 0, + FBO_INFO_TRANSIENT = 1, /* may be destroyed for another bitmap */ + FBO_INFO_PERSISTENT = 2 /* exclusive to the owner bitmap */ +}; + +typedef struct ALLEGRO_FBO_INFO +{ + int fbo_state; + GLuint fbo; + struct ALLEGRO_BITMAP_OGL *owner; + double last_use_time; +} ALLEGRO_FBO_INFO; + +typedef struct ALLEGRO_BITMAP_OGL +{ + ALLEGRO_BITMAP bitmap; /* This must be the first member. */ + + /* Driver specifics. */ + + int true_w; + int true_h; + + GLuint texture; /* 0 means, not uploaded yet. */ + +#if defined ALLEGRO_GP2XWIZ + EGLSurface pbuffer; + EGLContext context; + NativeWindowType pbuf_native_wnd; + bool changed; +#else + ALLEGRO_FBO_INFO *fbo_info; +#endif + + unsigned char *lock_buffer; + + float left, top, right, bottom; /* Texture coordinates. */ + bool is_backbuffer; /* This is not a real bitmap, but the backbuffer. */ +} ALLEGRO_BITMAP_OGL; + + +typedef struct OPENGL_INFO { + uint32_t version; /* OpenGL version */ + int max_texture_size; /* Maximum texture size */ + int is_voodoo3_and_under; /* Special cases for Voodoo 1-3 */ + int is_voodoo; /* Special cases for Voodoo cards */ + int is_matrox_g200; /* Special cases for Matrox G200 boards */ + int is_ati_rage_pro; /* Special cases for ATI Rage Pro boards */ + int is_ati_radeon_7000; /* Special cases for ATI Radeon 7000 */ + int is_ati_r200_chip; /* Special cases for ATI card with chip R200 */ + int is_mesa_driver; /* Special cases for MESA */ +} OPENGL_INFO; + + +typedef struct ALLEGRO_OGL_EXTRAS +{ + /* A list of extensions supported by Allegro, for this context. */ + ALLEGRO_OGL_EXT_LIST *extension_list; + /* A list of extension API, loaded by Allegro, for this context. */ + ALLEGRO_OGL_EXT_API *extension_api; + /* Various info about OpenGL implementation. */ + OPENGL_INFO ogl_info; + + ALLEGRO_BITMAP_OGL *opengl_target; + + ALLEGRO_BITMAP_OGL *backbuffer; + + /* True if display resources are shared among displays. */ + bool is_shared; + + ALLEGRO_FBO_INFO fbos[ALLEGRO_MAX_OPENGL_FBOS]; +} ALLEGRO_OGL_EXTRAS; + +typedef struct ALLEGRO_OGL_BITMAP_VERTEX +{ + float x, y; + float tx, ty; + float r, g, b, a; +} ALLEGRO_OGL_BITMAP_VERTEX; + + +/* extensions */ +int _al_ogl_look_for_an_extension(const char *name, const GLubyte *extensions); +void _al_ogl_set_extensions(ALLEGRO_OGL_EXT_API *ext); +void _al_ogl_manage_extensions(ALLEGRO_DISPLAY *disp); +void _al_ogl_unmanage_extensions(ALLEGRO_DISPLAY *disp); + +/* bitmap */ +ALLEGRO_BITMAP *_al_ogl_create_bitmap(ALLEGRO_DISPLAY *d, int w, int h); +ALLEGRO_BITMAP *_al_ogl_create_sub_bitmap(ALLEGRO_DISPLAY *d, ALLEGRO_BITMAP *parent, + int x, int y, int w, int h); + +/* common driver */ +void _al_ogl_reset_fbo_info(ALLEGRO_FBO_INFO *info); +bool _al_ogl_create_persistent_fbo(ALLEGRO_BITMAP *bitmap); +ALLEGRO_FBO_INFO *_al_ogl_persist_fbo(ALLEGRO_DISPLAY *display, + ALLEGRO_FBO_INFO *transient_fbo_info); +void _al_ogl_setup_gl(ALLEGRO_DISPLAY *d); +void _al_ogl_set_target_bitmap(ALLEGRO_DISPLAY *display, ALLEGRO_BITMAP *bitmap); +void _al_ogl_setup_bitmap_clipping(const ALLEGRO_BITMAP *bitmap); +ALLEGRO_BITMAP *_al_ogl_get_backbuffer(ALLEGRO_DISPLAY *d); +ALLEGRO_BITMAP_OGL* _al_ogl_create_backbuffer(ALLEGRO_DISPLAY *disp); +void _al_ogl_destroy_backbuffer(ALLEGRO_BITMAP_OGL *b); +bool _al_ogl_resize_backbuffer(ALLEGRO_BITMAP_OGL *b, int w, int h); + +struct ALLEGRO_DISPLAY_INTERFACE; + +/* draw */ +void _al_ogl_add_drawing_functions(struct ALLEGRO_DISPLAY_INTERFACE *vt); + +AL_FUNC(bool, _al_opengl_set_blender, (ALLEGRO_DISPLAY *disp)); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_path.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_path.h new file mode 100644 index 0000000..a0d51c7 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_path.h @@ -0,0 +1,14 @@ +#ifndef __al_included_allegro5_aintern_path_h +#define __al_included_allegro5_aintern_path_h + +struct ALLEGRO_PATH { + ALLEGRO_USTR *drive; + ALLEGRO_USTR *filename; + _AL_VECTOR segments; /* vector of ALLEGRO_USTR * */ + ALLEGRO_USTR *basename; + ALLEGRO_USTR *full_string; +}; + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_pixels.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_pixels.h new file mode 100644 index 0000000..9081789 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_pixels.h @@ -0,0 +1,473 @@ +#ifndef __al_included_allegro5_aintern_pixels_h +#define __al_included_allegro5_aintern_pixels_h + +#include "allegro5/internal/aintern_float.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +#define _AL_MAP_RGBA(_color, _r, _g, _b, _a) \ + do { \ + (_color).r = _al_u8_to_float[_r]; \ + (_color).g = _al_u8_to_float[_g]; \ + (_color).b = _al_u8_to_float[_b]; \ + (_color).a = _al_u8_to_float[_a]; \ + } while (0) + + +#define _AL_INLINE_GET_PIXEL(format, data, color, advance) \ + do { \ + switch (format) { \ + case ALLEGRO_PIXEL_FORMAT_ARGB_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x000000FF) >> 0, \ + (_gp_pixel & 0xFF000000) >> 24); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0xFF000000) >> 24, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x000000FF) >> 0); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ARGB_4444: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_4[(_gp_pixel & 0x0F00) >> 8], \ + _al_rgb_scale_4[(_gp_pixel & 0x00F0) >> 4], \ + _al_rgb_scale_4[(_gp_pixel & 0x000F)], \ + _al_rgb_scale_4[(_gp_pixel & 0xF000) >> 12]); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_888: { \ + uint32_t _gp_pixel = READ3BYTES(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0xFF0000) >> 16, \ + (_gp_pixel & 0x00FF00) >> 8, \ + (_gp_pixel & 0x0000FF) >> 0, \ + 255); \ + if (advance) \ + data += 3; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_565: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0xF800) >> 11], \ + _al_rgb_scale_6[(_gp_pixel & 0x07E0) >> 5], \ + _al_rgb_scale_5[(_gp_pixel & 0x001F)], \ + 255); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_555: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0x7C00) >> 10], \ + _al_rgb_scale_5[(_gp_pixel & 0x03E0) >> 5], \ + _al_rgb_scale_5[(_gp_pixel & 0x001F)], \ + 255); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_5551: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0xF800) >> 11], \ + _al_rgb_scale_5[(_gp_pixel & 0x07C0) >> 6], \ + _al_rgb_scale_5[(_gp_pixel & 0x003E) >> 1], \ + _al_rgb_scale_1[_gp_pixel & 1]); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ARGB_1555: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0x7C00) >> 10], \ + _al_rgb_scale_5[(_gp_pixel & 0x03E0) >> 5], \ + _al_rgb_scale_5[(_gp_pixel & 0x001F)], \ + _al_rgb_scale_1[(_gp_pixel & 0x8000) >> 15]); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0x000000FF) >> 0, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + (_gp_pixel & 0xFF000000) >> 24); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_XBGR_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0x000000FF) >> 0, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + 255); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_888: { \ + uint32_t _gp_pixel = READ3BYTES(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0x000000FF) >> 0, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + 255); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_565: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0x001F)], \ + _al_rgb_scale_6[(_gp_pixel & 0x07E0) >> 5], \ + _al_rgb_scale_5[(_gp_pixel & 0xF800) >> 11], \ + 255); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_555: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_5[(_gp_pixel & 0x001F)], \ + _al_rgb_scale_5[(_gp_pixel & 0x03E0) >> 5], \ + _al_rgb_scale_5[(_gp_pixel & 0x7C00) >> 10], \ + 255); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBX_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0xFF000000) >> 24, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + 255); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_XRGB_8888: { \ + uint32_t _gp_pixel = *(uint32_t *)(data); \ + _AL_MAP_RGBA(color, \ + (_gp_pixel & 0x00FF0000) >> 16, \ + (_gp_pixel & 0x0000FF00) >> 8, \ + (_gp_pixel & 0x000000FF), \ + 255); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_F32: { \ + float *f = (float *)data; \ + color.r = f[0]; \ + color.g = f[1]; \ + color.b = f[2]; \ + color.a = f[3]; \ + if (advance) \ + data += 4 * sizeof(float); \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE: { \ + uint8_t *p = (uint8_t *)data; \ + _AL_MAP_RGBA(color, *p, *(p + 1), *(p + 2), *(p + 3)); \ + if (advance) \ + data += 4; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_4444: { \ + uint16_t _gp_pixel = *(uint16_t *)(data); \ + _AL_MAP_RGBA(color, \ + _al_rgb_scale_4[(_gp_pixel & 0xF000) >> 12], \ + _al_rgb_scale_4[(_gp_pixel & 0x0F00) >> 8], \ + _al_rgb_scale_4[(_gp_pixel & 0x00F0) >> 4], \ + _al_rgb_scale_4[(_gp_pixel & 0x000F)]); \ + if (advance) \ + data += 2; \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ANY: \ + case ALLEGRO_PIXEL_FORMAT_ANY_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_WITH_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_15_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_16_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_16_WITH_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_24_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_32_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_32_WITH_ALPHA: \ + ALLEGRO_ERROR("INLINE_GET got fake _gp_pixel format: %d\n", format); \ + abort(); \ + break; \ + \ + case ALLEGRO_NUM_PIXEL_FORMATS: \ + default: \ + ALLEGRO_ERROR("INLINE_GET got non _gp_pixel format: %d\n", format); \ + abort(); \ + break; \ + } \ + } while (0) + + +#define _AL_INLINE_PUT_PIXEL(format, data, color, advance) \ + do { \ + uint32_t _pp_pixel; \ + switch (format) { \ + case ALLEGRO_PIXEL_FORMAT_ARGB_8888: \ + _pp_pixel = _al_fast_float_to_int(color.a * 255) << 24; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 255) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 255) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 255); \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_8888: \ + _pp_pixel = _al_fast_float_to_int(color.r * 255) << 24; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 255) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 255) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.a * 255); \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_ARGB_4444: \ + _pp_pixel = _al_fast_float_to_int(color.a * 15) << 12; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 15) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 15) << 4; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 15); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_888: \ + _pp_pixel = _al_fast_float_to_int(color.r * 255) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 255) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 255); \ + WRITE3BYTES(data, _pp_pixel); \ + if (advance) \ + data += 3; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_565: \ + _pp_pixel = _al_fast_float_to_int(color.r * 0x1f) << 11; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x3f) << 5; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0x1f); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGB_555: \ + _pp_pixel = _al_fast_float_to_int(color.r * 0x1f) << 10; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x1f) << 5; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0x1f); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_5551: \ + _pp_pixel = _al_fast_float_to_int(color.r * 0x1f) << 11; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x1f) << 6; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0x1f) << 1; \ + _pp_pixel |= _al_fast_float_to_int(color.a); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_ARGB_1555: \ + _pp_pixel = _al_fast_float_to_int(color.a) << 15; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0x1f) << 10; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x1f) << 5; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0x1f); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_8888: \ + _pp_pixel = _al_fast_float_to_int(color.a * 0xff) << 24; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0xff) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0xff); \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_XBGR_8888: \ + _pp_pixel = 0xff000000; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0xff) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0xff); \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_888: \ + _pp_pixel = _al_fast_float_to_int(color.b * 0xff) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0xff); \ + WRITE3BYTES(data, _pp_pixel); \ + if (advance) \ + data += 3; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_565: \ + _pp_pixel = _al_fast_float_to_int(color.b * 0x1f) << 11; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x3f) << 5; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0x1f); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_BGR_555: \ + _pp_pixel = _al_fast_float_to_int(color.b * 0x1f) << 10; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0x1f) << 5; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0x1f); \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBX_8888: \ + _pp_pixel = 0xff; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0xff) << 24; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0xff) << 8; \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_XRGB_8888: \ + _pp_pixel = 0xff000000; \ + _pp_pixel |= _al_fast_float_to_int(color.r * 0xff) << 16; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 0xff) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 0xff); \ + *(uint32_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_F32: { \ + float *f = (float *)data; \ + f[0] = color.r; \ + f[1] = color.g; \ + f[2] = color.b; \ + f[3] = color.a; \ + if (advance) \ + data += 4 * sizeof(float); \ + break; \ + } \ + \ + case ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE: \ + *((uint8_t *)data + 0) = _al_fast_float_to_int(color.r * 0xff); \ + *((uint8_t *)data + 1) = _al_fast_float_to_int(color.g * 0xff); \ + *((uint8_t *)data + 2) = _al_fast_float_to_int(color.b * 0xff); \ + *((uint8_t *)data + 3) = _al_fast_float_to_int(color.a * 0xff); \ + if (advance) \ + data += 4; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_RGBA_4444: \ + _pp_pixel = _al_fast_float_to_int(color.a * 15); \ + _pp_pixel |= _al_fast_float_to_int(color.r * 15) << 12; \ + _pp_pixel |= _al_fast_float_to_int(color.g * 15) << 8; \ + _pp_pixel |= _al_fast_float_to_int(color.b * 15) << 4; \ + *(uint16_t *)(data) = _pp_pixel; \ + if (advance) \ + data += 2; \ + break; \ + \ + case ALLEGRO_PIXEL_FORMAT_ANY: \ + case ALLEGRO_PIXEL_FORMAT_ANY_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_WITH_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_15_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_16_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_16_WITH_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_24_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_32_NO_ALPHA: \ + case ALLEGRO_PIXEL_FORMAT_ANY_32_WITH_ALPHA: \ + ALLEGRO_ERROR("INLINE_PUT got fake _pp_pixel format: %d\n", format); \ + abort(); \ + break; \ + \ + case ALLEGRO_NUM_PIXEL_FORMATS: \ + ALLEGRO_ERROR("INLINE_PUT got non _pp_pixel format: %d\n", format); \ + abort(); \ + break; \ + } \ + } while (0) + +AL_ARRAY(int, _al_rgb_scale_1); +AL_ARRAY(int, _al_rgb_scale_4); +AL_ARRAY(int, _al_rgb_scale_5); +AL_ARRAY(int, _al_rgb_scale_6); +AL_ARRAY(float, _al_u8_to_float); + +void _al_init_pixels(void); +bool _al_pixel_format_has_alpha(int format); +bool _al_pixel_format_is_real(int format); +int _al_get_real_pixel_format(ALLEGRO_DISPLAY *display, int format); +char const *_al_pixel_format_name(ALLEGRO_PIXEL_FORMAT format); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim.h new file mode 100644 index 0000000..75b6d3d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim.h @@ -0,0 +1,13 @@ +#ifndef __al_included_allegro5_aintern_prim_h +#define __al_included_allegro5_aintern_prim_h + +int _al_bitmap_region_is_locked(ALLEGRO_BITMAP* bmp, int x1, int y1, int x2, int y2); + +struct ALLEGRO_VERTEX_DECL { + ALLEGRO_VERTEX_ELEMENT* elements; + int stride; + void* d3d_decl; + void* d3d_dummy_shader; +}; + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_directx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_directx.h new file mode 100644 index 0000000..00e5831 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_directx.h @@ -0,0 +1,21 @@ +#ifndef __al_included_allegro5_aintern_prim_directx_h +#define __al_included_allegro5_aintern_prim_directx_h + +struct ALLEGRO_BITMAP; +struct ALLEGRO_VERTEX; + +int _al_draw_prim_directx(ALLEGRO_BITMAP* target, ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, int start, int end, int type); +int _al_draw_prim_indexed_directx(ALLEGRO_BITMAP* target, ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, const int* indices, int num_vtx, int type); +void _al_set_d3d_decl(ALLEGRO_DISPLAY* display, ALLEGRO_VERTEX_DECL* ret); + +bool _al_init_d3d_driver(void); +void _al_shutdown_d3d_driver(void); + +void* _al_create_default_shader(void* dev); +void _al_setup_default_shader(void* dev, void* shader); + +void _al_setup_shader(void* dev, const ALLEGRO_VERTEX_DECL* decl); +void _al_create_shader(void* dev, ALLEGRO_VERTEX_DECL* decl); +void _al_set_texture_matrix(void* dev, float* mat); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_opengl.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_opengl.h new file mode 100644 index 0000000..a8a6feb --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_opengl.h @@ -0,0 +1,10 @@ +#ifndef __al_included_allegro5_aintern_prim_opengl_h +#define __al_included_allegro5_aintern_prim_opengl_h + +struct ALLEGRO_BITMAP; +struct ALLEGRO_VERTEX; + +int _al_draw_prim_opengl(ALLEGRO_BITMAP* target, ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, int start, int end, int type); +int _al_draw_prim_indexed_opengl(ALLEGRO_BITMAP *target, ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, const int* indices, int num_vtx, int type); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_soft.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_soft.h new file mode 100644 index 0000000..2c5d085 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_prim_soft.h @@ -0,0 +1,13 @@ +#ifndef __al_included_allegro5_aintern_prim_soft_h +#define __al_included_allegro5_aintern_prim_soft_h + +struct ALLEGRO_BITMAP; +struct ALLEGRO_VERTEX; + +int _al_draw_prim_soft(ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, int start, int end, int type); +int _al_draw_prim_indexed_soft(ALLEGRO_BITMAP* texture, const void* vtxs, const ALLEGRO_VERTEX_DECL* decl, const int* indices, int num_vtx, int type); + +void _al_line_2d(ALLEGRO_BITMAP* texture, ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2); +void _al_point_2d(ALLEGRO_BITMAP* texture, ALLEGRO_VERTEX* v); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_system.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_system.h new file mode 100644 index 0000000..b11bc60 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_system.h @@ -0,0 +1,60 @@ +#ifndef __al_included_allegro5_aintern_system_h +#define __al_included_allegro5_aintern_system_h + +#include "allegro5/system.h" +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_dtor.h" +#include "allegro5/internal/aintern_events.h" +#include "allegro5/internal/aintern_joystick.h" +#include "allegro5/internal/aintern_keyboard.h" +#include "allegro5/internal/aintern_mouse.h" +#include "allegro5/internal/aintern_vector.h" + +typedef struct ALLEGRO_SYSTEM_INTERFACE ALLEGRO_SYSTEM_INTERFACE; + +struct ALLEGRO_SYSTEM_INTERFACE +{ + int id; + ALLEGRO_SYSTEM *(*initialize)(int flags); + ALLEGRO_DISPLAY_INTERFACE *(*get_display_driver)(void); + ALLEGRO_KEYBOARD_DRIVER *(*get_keyboard_driver)(void); + ALLEGRO_MOUSE_DRIVER *(*get_mouse_driver)(void); + ALLEGRO_JOYSTICK_DRIVER *(*get_joystick_driver)(void); + int (*get_num_display_modes)(void); + ALLEGRO_DISPLAY_MODE *(*get_display_mode)(int index, ALLEGRO_DISPLAY_MODE *mode); + void (*shutdown_system)(void); + int (*get_num_video_adapters)(void); + bool (*get_monitor_info)(int adapter, ALLEGRO_MONITOR_INFO *info); + ALLEGRO_MOUSE_CURSOR *(*create_mouse_cursor)(ALLEGRO_BITMAP *bmp, int x_focus, int y_focus); + void (*destroy_mouse_cursor)(ALLEGRO_MOUSE_CURSOR *cursor); + bool (*get_cursor_position)(int *ret_x, int *ret_y); + bool (*grab_mouse)(ALLEGRO_DISPLAY *display); + bool (*ungrab_mouse)(void); + ALLEGRO_PATH *(*get_path)(int id); + bool (*inhibit_screensaver)(bool inhibit); + void (*thread_init)(ALLEGRO_THREAD *thread); + void (*thread_exit)(ALLEGRO_THREAD *thread); + void *(*open_library)(const char *filename); + void *(*import_symbol)(void *library, const char *symbol); + void (*close_library)(void *handle); +}; + +struct ALLEGRO_SYSTEM +{ + ALLEGRO_SYSTEM_INTERFACE *vt; + _AL_VECTOR displays; /* Keep a list of all displays attached to us. */ + ALLEGRO_CONFIG *config; + ALLEGRO_PATH *user_exe_path; + bool installed; +}; + + +AL_FUNC(void, _al_register_system_interfaces, (void)); +AL_VAR(_AL_VECTOR, _al_system_interfaces); +AL_VAR(_AL_DTOR_LIST *, _al_dtor_list); + +AL_FUNC(void *, _al_open_library, (const char *filename)); +AL_FUNC(void *, _al_import_symbol, (void *library, const char *symbol)); +AL_FUNC(void, _al_close_library, (void *library)); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_thread.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_thread.h new file mode 100644 index 0000000..5c4ddd6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_thread.h @@ -0,0 +1,52 @@ +#ifndef __al_included_allegro5_aintern_thread_h +#define __al_included_allegro5_aintern_thread_h + +#include ALLEGRO_INTERNAL_THREAD_HEADER + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct _AL_THREAD _AL_THREAD; +typedef struct _AL_MUTEX _AL_MUTEX; +typedef struct _AL_COND _AL_COND; + + +AL_FUNC(void, _al_thread_create, (_AL_THREAD*, + void (*proc)(_AL_THREAD*, void*), + void *arg)); +AL_FUNC(void, _al_thread_set_should_stop, (_AL_THREAD *)); +/* static inline bool _al_get_thread_should_stop(_AL_THREAD *); */ +AL_FUNC(void, _al_thread_join, (_AL_THREAD*)); +AL_FUNC(void, _al_thread_detach, (_AL_THREAD*)); + + +AL_FUNC(void, _al_mutex_init, (_AL_MUTEX*)); +AL_FUNC(void, _al_mutex_init_recursive, (_AL_MUTEX*)); +AL_FUNC(void, _al_mutex_destroy, (_AL_MUTEX*)); +/* static inline void _al_mutex_lock(_AL_MUTEX*); */ +/* static inline void _al_mutex_unlock(_AL_MUTEX*); */ + +/* All 5 functions below are declared inline in aintuthr.h. + * FIXME: Why are they all inline? And if they have to be, why not treat them + * the same as the two functions above? + */ +#ifdef ALLEGRO_WINDOWS +AL_FUNC(void, _al_cond_init, (_AL_COND*)); +AL_FUNC(void, _al_cond_destroy, (_AL_COND*)); +AL_FUNC(void, _al_cond_wait, (_AL_COND*, _AL_MUTEX*)); +AL_FUNC(void, _al_cond_broadcast, (_AL_COND*)); +AL_FUNC(void, _al_cond_signal, (_AL_COND*)); +#endif + +AL_FUNC(int, _al_cond_timedwait, (_AL_COND*, _AL_MUTEX*, const ALLEGRO_TIMEOUT *timeout)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_timer.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_timer.h new file mode 100644 index 0000000..3f9b932 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_timer.h @@ -0,0 +1,16 @@ +#ifndef __al_included_allegro5_aintern_timer_h +#define __al_included_allegro5_aintern_timer_h + +#ifdef __cplusplus + extern "C" { +#endif + +void _al_init_timers(void); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tls.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tls.h new file mode 100644 index 0000000..dbdc7e1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tls.h @@ -0,0 +1,20 @@ +#ifndef __al_included_allegro5_aintern_tls_h +#define __al_included_allegro5_aintern_tls_h + +#ifdef __cplusplus + extern "C" { +#endif + + +void _al_tls_init_once(void); + +int *_al_tls_get_dtor_owner_count(void); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_transform.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_transform.h new file mode 100644 index 0000000..022c263 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_transform.h @@ -0,0 +1,9 @@ +#ifndef __al_included_allegro5_aintern_transform_h +#define __al_included_allegro5_aintern_transform_h + + +bool _al_transform_is_translation(const ALLEGRO_TRANSFORM* trans, + float *dx, float *dy); + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tri_soft.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tri_soft.h new file mode 100644 index 0000000..eef14fe --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_tri_soft.h @@ -0,0 +1,27 @@ +#ifndef __al_included_allegro5_aintern_tri_soft_h +#define __al_included_allegro5_aintern_tri_soft_h + +struct ALLEGRO_BITMAP; + +/* Duplicated in allegro_primitives.h */ +#ifndef _ALLEGRO_VERTEX_DEFINED +#define _ALLEGRO_VERTEX_DEFINED + +typedef struct ALLEGRO_VERTEX ALLEGRO_VERTEX; + +struct ALLEGRO_VERTEX { + float x, y, z; + float u, v; + ALLEGRO_COLOR color; +}; +#endif + +AL_FUNC(void, _al_triangle_2d, (ALLEGRO_BITMAP* texture, ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, ALLEGRO_VERTEX* v3)); +AL_FUNC(void, _al_draw_soft_triangle, ( + ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, ALLEGRO_VERTEX* v3, uintptr_t state, + void (*init)(uintptr_t, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*), + void (*first)(uintptr_t, int, int, int, int), + void (*step)(uintptr_t, int), + void (*draw)(uintptr_t, int, int, int))); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_ttf_cfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_ttf_cfg.h new file mode 100644 index 0000000..ad50e07 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_ttf_cfg.h @@ -0,0 +1 @@ +/* #undef ALLEGRO_CFG_TTF_FREETYPE */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_vector.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_vector.h new file mode 100644 index 0000000..341c98d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_vector.h @@ -0,0 +1,55 @@ +#ifndef __al_included_allegro5_aintern_vector_h +#define __al_included_allegro5_aintern_vector_h + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct _AL_VECTOR +{ + /* private */ + size_t _itemsize; + char* _items; /* total size == (size + unused) * itemsize */ + size_t _size; + size_t _unused; +} _AL_VECTOR; + +#define _AL_VECTOR_INITIALIZER(typ) { sizeof(typ), 0, 0, 0 } + + +AL_FUNC(void, _al_vector_init, (_AL_VECTOR*, size_t itemsize)); +AL_INLINE(size_t, _al_vector_size, (const _AL_VECTOR *vec), +{ + return vec->_size; +}) +AL_INLINE(bool, _al_vector_is_empty, (const _AL_VECTOR *vec), +{ + ASSERT(vec); + return vec->_size == 0 ? true : false; +}) +AL_INLINE(bool, _al_vector_is_nonempty, (const _AL_VECTOR *vec), +{ + ASSERT(vec); + return !_al_vector_is_empty(vec); +}) +AL_FUNC(void*, _al_vector_ref, (const _AL_VECTOR*, unsigned int index)); +AL_FUNC(void*, _al_vector_ref_front, (const _AL_VECTOR*)); +AL_FUNC(void*, _al_vector_ref_back, (const _AL_VECTOR*)); +AL_FUNC(bool, _al_vector_append_array, (_AL_VECTOR *vec, unsigned int num, const void *arr)); +AL_FUNC(void*, _al_vector_alloc_back, (_AL_VECTOR*)); +AL_FUNC(void*, _al_vector_alloc_mid, (_AL_VECTOR*, unsigned int index)); +AL_FUNC(int, _al_vector_find, (const _AL_VECTOR*, const void *ptr_item)); +AL_FUNC(bool, _al_vector_contains, (const _AL_VECTOR*, const void *ptr_item)); +AL_FUNC(void, _al_vector_delete_at, (_AL_VECTOR*, unsigned int index)); +AL_FUNC(bool, _al_vector_find_and_delete, (_AL_VECTOR*, const void *ptr_item)); +AL_FUNC(void, _al_vector_free, (_AL_VECTOR*)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vi ts=8 sts=3 sw=3 et */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_wunicode.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_wunicode.h new file mode 100644 index 0000000..3ca897f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_wunicode.h @@ -0,0 +1,23 @@ +#ifndef __al_included_allegro5_aintern_wunicode_h +#define __al_included_allegro5_aintern_wunicode_h + +#ifdef ALLEGRO_WINDOWS + +#ifdef __cplusplus + extern "C" { +#endif + + +AL_FUNC(wchar_t *, _al_win_utf16, (const char *s)); +AL_FUNC(char *, _al_win_utf8, (const wchar_t *ws)); + + +#ifdef __cplusplus + } +#endif + +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_x.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_x.h new file mode 100644 index 0000000..f405a89 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_x.h @@ -0,0 +1,9 @@ +#ifndef __al_included_allegro5_aintern_x_h +#define __al_included_allegro5_aintern_x_h + +#include + +typedef struct ALLEGRO_SYSTEM_XGLX ALLEGRO_SYSTEM_XGLX; +typedef struct ALLEGRO_DISPLAY_XGLX ALLEGRO_DISPLAY_XGLX; + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xcursor.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xcursor.h new file mode 100644 index 0000000..5e2f4db --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xcursor.h @@ -0,0 +1,24 @@ +#ifndef __al_included_allegro5_aintern_xcursor_h +#define __al_included_allegro5_aintern_xcursor_h + +#ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR +#include +#endif + +#include "allegro5/internal/aintern_display.h" + +typedef struct ALLEGRO_MOUSE_CURSOR_XWIN ALLEGRO_MOUSE_CURSOR_XWIN; + +struct ALLEGRO_MOUSE_CURSOR_XWIN +{ + Cursor cursor; +}; + +ALLEGRO_MOUSE_CURSOR *_al_xwin_create_mouse_cursor(ALLEGRO_BITMAP *bmp, + int x_focus, int y_focus); +void _al_xwin_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *cursor); +void _al_xwin_add_cursor_functions(ALLEGRO_DISPLAY_INTERFACE *vt); + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xdisplay.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xdisplay.h new file mode 100644 index 0000000..6d2e74f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xdisplay.h @@ -0,0 +1,61 @@ +#ifndef __al_included_allegro5_aintern_xdisplay_h +#define __al_included_allegro5_aintern_xdisplay_h + +#include + +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_x.h" + +/* This is our version of ALLEGRO_DISPLAY with driver specific extra data. */ +struct ALLEGRO_DISPLAY_XGLX +{ + /* This must be the first member. */ + ALLEGRO_DISPLAY display; + + /* Driver specifics. */ + + Window window; + int xscreen; /* X Screen ID */ + int adapter; /* allegro virtual adapter id/index */ + GLXWindow glxwindow; + GLXContext context; + Atom wm_delete_window_atom; + XVisualInfo *xvinfo; /* Used when selecting the X11 visual to use. */ + GLXFBConfig *fbc; /* Used when creating the OpenGL context. */ + int glx_version; /* 130 means 1 major and 3 minor, aka 1.3 */ + + /* If our window is embedded by the XEmbed protocol, this gives + * the window ID of the embedder; Otherwise None. + */ + Window embedder_window; + + _AL_COND mapped; /* Condition variable to wait for mapping a window. */ + bool is_mapped; /* Set to true when mapped. */ + + int resize_count; /* Increments when resized. */ + bool programmatic_resize; /* Set while programmatic resize in progress. */ + + /* Cursor for this window. */ + Cursor invisible_cursor; + Cursor current_cursor; + bool cursor_hidden; + + /* Icon for this window. */ + Pixmap icon, icon_mask; + + /* Desktop position. */ + int x, y; + + /* al_set_mouse_xy implementation */ + bool mouse_warp; +}; + +void _al_display_xglx_await_resize(ALLEGRO_DISPLAY *d, int old_resize_count, bool delay_hack); +void _al_xglx_display_configure(ALLEGRO_DISPLAY *d, int x, int y, int width, int height, bool setglxy); +void _al_xglx_display_configure_event(ALLEGRO_DISPLAY *d, XEvent *event); +void _al_xwin_display_switch_handler(ALLEGRO_DISPLAY *d, + XFocusChangeEvent *event); +void _al_xwin_display_switch_handler_inner(ALLEGRO_DISPLAY *d, bool focus_in); +void _al_xwin_display_expose(ALLEGRO_DISPLAY *display, XExposeEvent *xevent); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xevents.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xevents.h new file mode 100644 index 0000000..367912d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xevents.h @@ -0,0 +1,8 @@ +#ifndef __al_included_allegro5_aintern_xevents_h +#define __al_included_allegro5_aintern_xevents_h + +#include "allegro5/internal/aintern_thread.h" + +void _al_xwin_background_thread(_AL_THREAD *self, void *arg); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xfullscreen.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xfullscreen.h new file mode 100644 index 0000000..5f553d5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xfullscreen.h @@ -0,0 +1,65 @@ +#ifndef __al_included_allegro5_aintern_xfullscreen_h +#define __al_included_allegro5_aintern_xfullscreen_h + +/* fullscreen and multi monitor stuff */ + +typedef struct _ALLEGRO_XGLX_MMON_INTERFACE _ALLEGRO_XGLX_MMON_INTERFACE; + +struct _ALLEGRO_XGLX_MMON_INTERFACE { + int (*get_num_display_modes)(ALLEGRO_SYSTEM_XGLX *s, int adapter); + ALLEGRO_DISPLAY_MODE *(*get_display_mode)(ALLEGRO_SYSTEM_XGLX *s, int, int, ALLEGRO_DISPLAY_MODE*); + bool (*set_mode)(ALLEGRO_SYSTEM_XGLX *, ALLEGRO_DISPLAY_XGLX *, int, int, int, int); + void (*store_mode)(ALLEGRO_SYSTEM_XGLX *); + void (*restore_mode)(ALLEGRO_SYSTEM_XGLX *, int); + void (*get_display_offset)(ALLEGRO_SYSTEM_XGLX *, int, int *, int *); + int (*get_num_adapters)(ALLEGRO_SYSTEM_XGLX *); + bool (*get_monitor_info)(ALLEGRO_SYSTEM_XGLX *, int, ALLEGRO_MONITOR_INFO *); + int (*get_default_adapter)(ALLEGRO_SYSTEM_XGLX *); + int (*get_adapter)(ALLEGRO_SYSTEM_XGLX *, ALLEGRO_DISPLAY_XGLX *); + int (*get_xscreen)(ALLEGRO_SYSTEM_XGLX *, int); + void (*post_setup)(ALLEGRO_SYSTEM_XGLX *, ALLEGRO_DISPLAY_XGLX *); + void (*handle_xevent)(ALLEGRO_SYSTEM_XGLX *, ALLEGRO_DISPLAY_XGLX *, XEvent *e); +}; + +extern _ALLEGRO_XGLX_MMON_INTERFACE _al_xglx_mmon_interface; + +int _al_xsys_mheadx_get_default_adapter(ALLEGRO_SYSTEM_XGLX *s); +int _al_xsys_mheadx_get_xscreen(ALLEGRO_SYSTEM_XGLX *s, int adapter); +void _al_xsys_get_active_window_center(ALLEGRO_SYSTEM_XGLX *s, int *x, int *y); + +void _al_xsys_mmon_exit(ALLEGRO_SYSTEM_XGLX *s); + +int _al_xglx_get_num_display_modes(ALLEGRO_SYSTEM_XGLX *s, int adapter); +ALLEGRO_DISPLAY_MODE *_al_xglx_get_display_mode( + ALLEGRO_SYSTEM_XGLX *s, int adapter, int index, ALLEGRO_DISPLAY_MODE *mode); +bool _al_xglx_fullscreen_set_mode(ALLEGRO_SYSTEM_XGLX *s, ALLEGRO_DISPLAY_XGLX *d, int w, int h, + int format, int refresh_rate); +void _al_xglx_store_video_mode(ALLEGRO_SYSTEM_XGLX *s); +void _al_xglx_restore_video_mode(ALLEGRO_SYSTEM_XGLX *s, int adapter); +void _al_xglx_fullscreen_to_display(ALLEGRO_SYSTEM_XGLX *s, + ALLEGRO_DISPLAY_XGLX *d); +void _al_xglx_set_fullscreen_window(ALLEGRO_DISPLAY *display, int value); +void _al_xglx_get_display_offset(ALLEGRO_SYSTEM_XGLX *s, int adapter, int *x, int *y); + +int _al_xglx_fullscreen_select_mode(ALLEGRO_SYSTEM_XGLX *s, int adapter, int w, int h, int format, int refresh_rate); + +bool _al_xglx_get_monitor_info(ALLEGRO_SYSTEM_XGLX *s, int adapter, ALLEGRO_MONITOR_INFO *info); +int _al_xglx_get_num_video_adapters(ALLEGRO_SYSTEM_XGLX *s); + +int _al_xglx_get_default_adapter(ALLEGRO_SYSTEM_XGLX *s); +int _al_xglx_get_xscreen(ALLEGRO_SYSTEM_XGLX *s, int adapter); + +void _al_xglx_set_above(ALLEGRO_DISPLAY *display, int value); + +int _al_xglx_get_adapter(ALLEGRO_SYSTEM_XGLX *s, ALLEGRO_DISPLAY_XGLX *d, bool recalc); + +void _al_xglx_handle_mmon_event(ALLEGRO_SYSTEM_XGLX *s, ALLEGRO_DISPLAY_XGLX *d, XEvent *e); + +#ifdef ALLEGRO_XWINDOWS_WITH_XRANDR +void _al_xsys_xrandr_init(ALLEGRO_SYSTEM_XGLX *s); +void _al_xsys_xrandr_exit(ALLEGRO_SYSTEM_XGLX *s); +#endif /* ALLEGRO_XWINDOWS_WITH_XRANDR */ + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xglx_config.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xglx_config.h new file mode 100644 index 0000000..c23802c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xglx_config.h @@ -0,0 +1,9 @@ +#ifndef __al_included_allegro5_aintern_xglx_h +#define __al_included_allegro5_aintern_xglx_h + +#include "allegro5/internal/aintern_x.h" + +void _al_xglx_config_select_visual(ALLEGRO_DISPLAY_XGLX *glx); +bool _al_xglx_config_create_context(ALLEGRO_DISPLAY_XGLX *glx); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xkeyboard.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xkeyboard.h new file mode 100644 index 0000000..964e0c6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xkeyboard.h @@ -0,0 +1,14 @@ +#ifndef __al_included_allegro5_aintern_xkeyboard_h +#define __al_included_allegro5_aintern_xkeyboard_h + +#include "allegro5/internal/aintern_keyboard.h" + +ALLEGRO_KEYBOARD_DRIVER *_al_xwin_keyboard_driver(void); +void _al_xwin_keyboard_handler(XKeyEvent *event, ALLEGRO_DISPLAY *display); +void _al_xwin_keyboard_switch_handler(ALLEGRO_DISPLAY *display, bool focus_in); +void _al_xwin_keyboard_handler_alternative(bool press, int hardware_keycode, + uint32_t unichar, ALLEGRO_DISPLAY *display); + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xmouse.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xmouse.h new file mode 100644 index 0000000..842f794 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xmouse.h @@ -0,0 +1,15 @@ +#ifndef __al_included_allegro5_aintern_xmouse_h +#define __al_included_allegro5_aintern_xmouse_h + +#include "allegro5/internal/aintern_mouse.h" + +ALLEGRO_MOUSE_DRIVER *_al_xwin_mouse_driver(void); +void _al_xwin_mouse_button_press_handler(int button, ALLEGRO_DISPLAY *display); +void _al_xwin_mouse_button_release_handler(int button, ALLEGRO_DISPLAY *d); +void _al_xwin_mouse_motion_notify_handler(int x, int y, ALLEGRO_DISPLAY *d); +void _al_xwin_mouse_switch_handler(ALLEGRO_DISPLAY *display, + const XCrossingEvent *event); +bool _al_xwin_grab_mouse(ALLEGRO_DISPLAY *display); +bool _al_xwin_ungrab_mouse(void); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xsystem.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xsystem.h new file mode 100644 index 0000000..811c6a5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xsystem.h @@ -0,0 +1,88 @@ +#ifndef __al_included_allegro5_aintern_xsystem_h +#define __al_included_allegro5_aintern_xsystem_h + +#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE +#include +#endif + +#ifdef ALLEGRO_XWINDOWS_WITH_XINERAMA +#include +#endif + +#ifdef ALLEGRO_XWINDOWS_WITH_XRANDR +#include +#endif + +#include "allegro5/internal/aintern_system.h" + +/* This is our version of ALLEGRO_SYSTEM with driver specific extra data. */ +struct ALLEGRO_SYSTEM_XGLX +{ + /* This must be the first member, we "derive" from it. */ + ALLEGRO_SYSTEM system; + + /* Driver specifics. */ + + /* X11 is not thread-safe. But we use a separate thread to handle X11 events. + * Plus, users may call OpenGL commands in the main thread, and we have no + * way to enforce locking for them. + * The only solution seems to be two X11 display connections. One to do our + * input handling, and one for OpenGL graphics. + * + * Note: these may be NULL if we are not connected to an X server, for + * headless command-line tools. We don't have a separate "null" system + * driver. + */ + /* The X11 display. You *MUST* only access this from one + * thread at a time, use the mutex lock below to ensure it. + */ + Display *x11display; + /* Another X11 display we use for graphics. You *MUST* + * only use this in the main thread. + */ + Display *gfxdisplay; + + Atom AllegroAtom; + Atom XEmbedAtom; + + _AL_THREAD thread; /* background thread. */ + _AL_MUTEX lock; /* thread lock for whenever we access internals. */ + // FIXME: One condition variable really would be enough. + _AL_COND resized; /* Condition variable to wait for resizing a window. */ + ALLEGRO_DISPLAY *mouse_grab_display; /* Best effort: may be inaccurate. */ + int toggle_mouse_grab_keycode; /* Disabled if zero */ + unsigned int toggle_mouse_grab_modifiers; + bool inhibit_screensaver; /* Should we inhibit the screensaver? */ + + bool mmon_interface_inited; +#ifdef ALLEGRO_XWINDOWS_WITH_XINERAMA + int xinerama_available; + int xinerama_screen_count; + XineramaScreenInfo *xinerama_screen_info; +#endif +#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE + /* For VidMode extension. */ + int xfvm_available; + int xfvm_screen_count; + struct { + int mode_count; + XF86VidModeModeInfo **modes; + XF86VidModeModeInfo *original_mode; + } *xfvm_screen; +#endif +#ifdef ALLEGRO_XWINDOWS_WITH_XRANDR + int xrandr_available; + int xrandr_event_base; + _AL_VECTOR xrandr_screens; + _AL_VECTOR xrandr_adaptermap; +#endif + + /* Used to keep track of how many adapters are in use, so the multi-head + * code can bail if we try to use more than one. */ + int adapter_use_count; + int adapter_map[32]; /* XXX magic constant */ +}; + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xwindow.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xwindow.h new file mode 100644 index 0000000..cf17fdd --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/aintern_xwindow.h @@ -0,0 +1,14 @@ +#ifndef __al_included_allegro5_aintern_xwindow_h +#define __al_included_allegro5_aintern_xwindow_h + +void _al_xwin_set_size_hints(ALLEGRO_DISPLAY *d, int x_off, int y_off); +void _al_xwin_reset_size_hints(ALLEGRO_DISPLAY *d); +void _al_xwin_set_fullscreen_window(ALLEGRO_DISPLAY *display, int value); +void _al_xwin_set_above(ALLEGRO_DISPLAY *display, int value); +void _al_xwin_set_frame(ALLEGRO_DISPLAY *display, bool frame_on); +void _al_xwin_set_icons(ALLEGRO_DISPLAY *d, + int num_icons, ALLEGRO_BITMAP *bitmaps[]); + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/alconfig.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/alconfig.h new file mode 100644 index 0000000..486c19b --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/alconfig.h @@ -0,0 +1,267 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +/* for backward compatibility */ +#ifdef USE_CONSOLE + #define ALLEGRO_NO_MAGIC_MAIN + #define ALLEGRO_USE_CONSOLE +#endif + + +/* include platform-specific stuff */ + +#include "allegro5/platform/alplatf.h" + + + +#if defined ALLEGRO_WATCOM + #include "allegro5/platform/alwatcom.h" +#elif defined ALLEGRO_MINGW32 + #include "allegro5/platform/almngw32.h" +#elif defined ALLEGRO_BCC32 + #include "allegro5/platform/albcc32.h" +#elif defined ALLEGRO_MSVC + #include "allegro5/platform/almsvc.h" +#elif defined ALLEGRO_IPHONE + #include "allegro5/platform/aliphonecfg.h" +#elif defined ALLEGRO_MACOSX + #include "allegro5/platform/alosxcfg.h" +#elif defined ALLEGRO_UNIX + #include "allegro5/platform/alucfg.h" +#else + #error platform not supported +#endif + + +#include "allegro5/platform/astdint.h" +#include "allegro5/platform/astdbool.h" + + + +/* special definitions for the GCC compiler */ +#ifdef __GNUC__ + #define ALLEGRO_GCC + + #ifndef AL_INLINE + #ifdef __cplusplus + #define AL_INLINE(type, name, args, code) \ + static inline type name args; \ + static inline type name args code + /* Needed if this header is included by C99 code, as + * "extern __inline__" in C99 exports a new global function. + */ + #elif __GNUC_STDC_INLINE__ + #define AL_INLINE(type, name, args, code) \ + extern __inline__ __attribute__((__gnu_inline__)) type name args; \ + extern __inline__ __attribute__((__gnu_inline__)) type name args code + #else + #define AL_INLINE(type, name, args, code) \ + extern __inline__ type name args; \ + extern __inline__ type name args code + #endif + #endif + + #ifndef AL_INLINE_STATIC + #ifdef __cplusplus + #define AL_INLINE_STATIC(type, name, args, code) \ + AL_INLINE(type, name, args, code) + #else + #define AL_INLINE_STATIC(type, name, args, code) \ + static __inline__ type name args; \ + static __inline__ type name args code + #endif + #endif + + #define AL_PRINTFUNC(type, name, args, a, b) AL_FUNC(type, name, args) __attribute__ ((format (printf, a, b))) + + #ifndef INLINE + #define INLINE __inline__ + #endif + + #ifndef ZERO_SIZE_ARRAY + #if __GNUC__ < 3 + #define ZERO_SIZE_ARRAY(type, name) __extension__ type name[0] + #else + #define ZERO_SIZE_ARRAY(type, name) type name[] /* ISO C99 flexible array members */ + #endif + #endif + + #ifndef LONG_LONG + #define LONG_LONG long long + #ifdef ALLEGRO_GUESS_INTTYPES_OK + #define int64_t signed long long + #define uint64_t unsigned long long + #endif + #endif + + #ifdef __i386__ + #define ALLEGRO_I386 + #endif + + #ifdef __amd64__ + #define ALLEGRO_AMD64 + #endif + + #ifdef __arm__ + #define ALLEGRO_ARM + #endif + + #ifndef AL_FUNC_DEPRECATED + #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) + #define AL_FUNC_DEPRECATED(type, name, args) AL_FUNC(__attribute__ ((deprecated)) type, name, args) + #define AL_PRINTFUNC_DEPRECATED(type, name, args, a, b) AL_PRINTFUNC(__attribute__ ((deprecated)) type, name, args, a, b) + #define AL_INLINE_DEPRECATED(type, name, args, code) AL_INLINE(__attribute__ ((deprecated)) type, name, args, code) + #endif + #endif + + #ifndef AL_ALIAS + #define AL_ALIAS(DECL, CALL) \ + static __attribute__((unused)) __inline__ DECL \ + { \ + return CALL; \ + } + #endif + + #ifndef AL_ALIAS_VOID_RET + #define AL_ALIAS_VOID_RET(DECL, CALL) \ + static __attribute__((unused)) __inline__ void DECL \ + { \ + CALL; \ + } + #endif +#endif + + +/* the rest of this file fills in some default definitions of language + * features and helper functions, which are conditionalised so they will + * only be included if none of the above headers defined custom versions. + */ + +#ifndef INLINE + #define INLINE +#endif + +#ifndef ZERO_SIZE_ARRAY + #define ZERO_SIZE_ARRAY(type, name) type name[] +#endif + +#ifndef AL_VAR + #define AL_VAR(type, name) extern type name +#endif + +#ifndef AL_ARRAY + #define AL_ARRAY(type, name) extern type name[] +#endif + +#ifndef AL_FUNC + #define AL_FUNC(type, name, args) type name args +#endif + +#ifndef AL_PRINTFUNC + #define AL_PRINTFUNC(type, name, args, a, b) AL_FUNC(type, name, args) +#endif + +#ifndef AL_METHOD + #define AL_METHOD(type, name, args) type (*name) args +#endif + +#ifndef AL_FUNCPTR + #define AL_FUNCPTR(type, name, args) extern type (*name) args +#endif + +#ifndef AL_FUNCPTRARRAY + #define AL_FUNCPTRARRAY(type, name, args) extern type (*name[]) args +#endif + +#ifndef AL_INLINE + #define AL_INLINE(type, name, args, code) type name args; +#endif + +#ifndef AL_FUNC_DEPRECATED + #define AL_FUNC_DEPRECATED(type, name, args) AL_FUNC(type, name, args) + #define AL_PRINTFUNC_DEPRECATED(type, name, args, a, b) AL_PRINTFUNC(type, name, args, a, b) + #define AL_INLINE_DEPRECATED(type, name, args, code) AL_INLINE(type, name, args, code) +#endif + +#ifndef AL_ALIAS + #define AL_ALIAS(DECL, CALL) \ + static INLINE DECL \ + { \ + return CALL; \ + } +#endif + +#ifndef AL_ALIAS_VOID_RET + #define AL_ALIAS_VOID_RET(DECL, CALL) \ + static INLINE void DECL \ + { \ + CALL; \ + } +#endif + + +#ifdef __cplusplus + extern "C" { +#endif + + +/* endian-independent 3-byte accessor macros */ +#ifdef ALLEGRO_LITTLE_ENDIAN + + #define READ3BYTES(p) ((*(unsigned char *)(p)) \ + | (*((unsigned char *)(p) + 1) << 8) \ + | (*((unsigned char *)(p) + 2) << 16)) + + #define WRITE3BYTES(p,c) ((*(unsigned char *)(p) = (c)), \ + (*((unsigned char *)(p) + 1) = (c) >> 8), \ + (*((unsigned char *)(p) + 2) = (c) >> 16)) + +#elif defined ALLEGRO_BIG_ENDIAN + + #define READ3BYTES(p) ((*(unsigned char *)(p) << 16) \ + | (*((unsigned char *)(p) + 1) << 8) \ + | (*((unsigned char *)(p) + 2))) + + #define WRITE3BYTES(p,c) ((*(unsigned char *)(p) = (c) >> 16), \ + (*((unsigned char *)(p) + 1) = (c) >> 8), \ + (*((unsigned char *)(p) + 2) = (c))) + +#else + #error endianess not defined +#endif + + +/* generic versions of the video memory access helpers */ +/* FIXME: why do we need macros for this? */ +#define bmp_write16(addr, c) (*((uint16_t *)(addr)) = (c)) +#define bmp_write32(addr, c) (*((uint32_t *)(addr)) = (c)) + +#define bmp_read16(addr) (*((uint16_t *)(addr))) +#define bmp_read32(addr) (*((uint32_t *)(addr))) + + + +/* default random function definition */ +#ifndef AL_RAND + #define AL_RAND() (rand()) +#endif + +#ifdef __cplusplus + } +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/bstrlib.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/bstrlib.h new file mode 100644 index 0000000..3378af3 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/internal/bstrlib.h @@ -0,0 +1,309 @@ +/* + * This source file has had its exported symbols prefixed with _al_ or _AL_ + * for the Allegro project. + */ + +/* + * This source file is part of the _al_bstring string library. This code was + * written by Paul Hsieh in 2002-2008, and is covered by the BSD open source + * license and the GPL. Refer to the accompanying documentation for details + * on usage and license. + */ + +/* + * bstrlib.c + * + * This file is the core module for implementing the _al_bstring functions. + */ + +#ifndef _AL_BSTRLIB_INCLUDE +#define _AL_BSTRLIB_INCLUDE + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +#if !defined (BSTRLIB_VSNP_OK) && !defined (BSTRLIB_NOVSNP) +# if defined (__TURBOC__) && !defined (__BORLANDC__) +# define BSTRLIB_NOVSNP +# endif +#endif + +#define _AL_BSTR_ERR (-1) +#define _AL_BSTR_OK (0) +#define _AL_BSTR_BS_BUFF_LENGTH_GET (0) + +typedef struct _al_tagbstring * _al_bstring; +typedef const struct _al_tagbstring * _al_const_bstring; + +/* Copy functions */ +#define _al_cstr2bstr _al_bfromcstr +extern _al_bstring _al_bfromcstr (const char * str); +extern _al_bstring _al_bfromcstralloc (int mlen, const char * str); +extern _al_bstring _al_blk2bstr (const void * blk, int len); +extern char * _al_bstr2cstr (_al_const_bstring s, char z); +extern int _al_bcstrfree (char * s); +extern _al_bstring _al_bstrcpy (_al_const_bstring b1); +extern int _al_bassign (_al_bstring a, _al_const_bstring b); +extern int _al_bassignmidstr (_al_bstring a, _al_const_bstring b, int left, int len); +extern int _al_bassigncstr (_al_bstring a, const char * str); +extern int _al_bassignblk (_al_bstring a, const void * s, int len); + +/* Destroy function */ +extern int _al_bdestroy (_al_bstring b); + +/* Space allocation hinting functions */ +extern int _al_balloc (_al_bstring s, int len); +extern int _al_ballocmin (_al_bstring b, int len); + +/* Substring extraction */ +extern _al_bstring _al_bmidstr (_al_const_bstring b, int left, int len); + +/* Various standard manipulations */ +extern int _al_bconcat (_al_bstring b0, _al_const_bstring b1); +extern int _al_bconchar (_al_bstring b0, char c); +extern int _al_bcatcstr (_al_bstring b, const char * s); +extern int _al_bcatblk (_al_bstring b, const void * s, int len); +extern int _al_binsert (_al_bstring s1, int pos, _al_const_bstring s2, unsigned char fill); +extern int _al_binsertch (_al_bstring s1, int pos, int len, unsigned char fill); +extern int _al_breplace (_al_bstring b1, int pos, int len, _al_const_bstring b2, unsigned char fill); +extern int _al_bdelete (_al_bstring s1, int pos, int len); +extern int _al_bsetstr (_al_bstring b0, int pos, _al_const_bstring b1, unsigned char fill); +extern int _al_btrunc (_al_bstring b, int n); + +/* Scan/search functions */ +extern int _al_bstricmp (_al_const_bstring b0, _al_const_bstring b1); +extern int _al_bstrnicmp (_al_const_bstring b0, _al_const_bstring b1, int n); +extern int _al_biseqcaseless (_al_const_bstring b0, _al_const_bstring b1); +extern int _al_bisstemeqcaselessblk (_al_const_bstring b0, const void * blk, int len); +extern int _al_biseq (_al_const_bstring b0, _al_const_bstring b1); +extern int _al_bisstemeqblk (_al_const_bstring b0, const void * blk, int len); +extern int _al_biseqcstr (_al_const_bstring b, const char * s); +extern int _al_biseqcstrcaseless (_al_const_bstring b, const char * s); +extern int _al_bstrcmp (_al_const_bstring b0, _al_const_bstring b1); +extern int _al_bstrncmp (_al_const_bstring b0, _al_const_bstring b1, int n); +extern int _al_binstr (_al_const_bstring s1, int pos, _al_const_bstring s2); +extern int _al_binstrr (_al_const_bstring s1, int pos, _al_const_bstring s2); +extern int _al_binstrcaseless (_al_const_bstring s1, int pos, _al_const_bstring s2); +extern int _al_binstrrcaseless (_al_const_bstring s1, int pos, _al_const_bstring s2); +extern int _al_bstrchrp (_al_const_bstring b, int c, int pos); +extern int _al_bstrrchrp (_al_const_bstring b, int c, int pos); +#define _al_bstrchr(b,c) _al_bstrchrp ((b), (c), 0) +#define _al_bstrrchr(b,c) _al_bstrrchrp ((b), (c), _al_blength(b)-1) +extern int _al_binchr (_al_const_bstring b0, int pos, _al_const_bstring b1); +extern int _al_binchrr (_al_const_bstring b0, int pos, _al_const_bstring b1); +extern int _al_bninchr (_al_const_bstring b0, int pos, _al_const_bstring b1); +extern int _al_bninchrr (_al_const_bstring b0, int pos, _al_const_bstring b1); +extern int _al_bfindreplace (_al_bstring b, _al_const_bstring find, _al_const_bstring repl, int pos); +extern int _al_bfindreplacecaseless (_al_bstring b, _al_const_bstring find, _al_const_bstring repl, int pos); + +/* List of string container functions */ +struct _al_bstrList { + int qty, mlen; + _al_bstring * entry; +}; +extern struct _al_bstrList * _al_bstrListCreate (void); +extern int _al_bstrListDestroy (struct _al_bstrList * sl); +extern int _al_bstrListAlloc (struct _al_bstrList * sl, int msz); +extern int _al_bstrListAllocMin (struct _al_bstrList * sl, int msz); + +/* String split and join functions */ +extern struct _al_bstrList * _al_bsplit (_al_const_bstring str, unsigned char splitChar); +extern struct _al_bstrList * _al_bsplits (_al_const_bstring str, _al_const_bstring splitStr); +extern struct _al_bstrList * _al_bsplitstr (_al_const_bstring str, _al_const_bstring splitStr); +extern _al_bstring _al_bjoin (const struct _al_bstrList * bl, _al_const_bstring sep); +extern int _al_bsplitcb (_al_const_bstring str, unsigned char splitChar, int pos, + int (* cb) (void * parm, int ofs, int len), void * parm); +extern int _al_bsplitscb (_al_const_bstring str, _al_const_bstring splitStr, int pos, + int (* cb) (void * parm, int ofs, int len), void * parm); +extern int _al_bsplitstrcb (_al_const_bstring str, _al_const_bstring splitStr, int pos, + int (* cb) (void * parm, int ofs, int len), void * parm); + +/* Miscellaneous functions */ +extern int _al_bpattern (_al_bstring b, int len); +extern int _al_btoupper (_al_bstring b); +extern int _al_btolower (_al_bstring b); +extern int _al_bltrimws (_al_bstring b); +extern int _al_brtrimws (_al_bstring b); +extern int _al_btrimws (_al_bstring b); + +#if !defined (BSTRLIB_NOVSNP) +extern _al_bstring _al_bformat (const char * fmt, ...); +extern int _al_bformata (_al_bstring b, const char * fmt, ...); +extern int _al_bassignformat (_al_bstring b, const char * fmt, ...); +extern int _al_bvcformata (_al_bstring b, int count, const char * fmt, va_list arglist); + +#define _al_bvformata(ret, b, fmt, lastarg) { \ +_al_bstring bstrtmp_b = (b); \ +const char * bstrtmp_fmt = (fmt); \ +int bstrtmp_r = _AL_BSTR_ERR, bstrtmp_sz = 16; \ + for (;;) { \ + va_list bstrtmp_arglist; \ + va_start (bstrtmp_arglist, lastarg); \ + bstrtmp_r = _al_bvcformata (bstrtmp_b, bstrtmp_sz, bstrtmp_fmt, bstrtmp_arglist); \ + va_end (bstrtmp_arglist); \ + if (bstrtmp_r >= 0) { /* Everything went ok */ \ + bstrtmp_r = _AL_BSTR_OK; \ + break; \ + } else if (-bstrtmp_r <= bstrtmp_sz) { /* A real error? */ \ + bstrtmp_r = _AL_BSTR_ERR; \ + break; \ + } \ + bstrtmp_sz = -bstrtmp_r; /* Doubled or target size */ \ + } \ + ret = bstrtmp_r; \ +} + +#endif + +typedef int (*_al_bNgetc) (void *parm); +typedef size_t (* _al_bNread) (void *buff, size_t elsize, size_t nelem, void *parm); + +/* Input functions */ +extern _al_bstring _al_bgets (_al_bNgetc getcPtr, void * parm, char terminator); +extern _al_bstring _al_bread (_al_bNread readPtr, void * parm); +extern int _al_bgetsa (_al_bstring b, _al_bNgetc getcPtr, void * parm, char terminator); +extern int _al_bassigngets (_al_bstring b, _al_bNgetc getcPtr, void * parm, char terminator); +extern int _al_breada (_al_bstring b, _al_bNread readPtr, void * parm); + +/* Stream functions */ +extern struct _al_bStream * _al_bsopen (_al_bNread readPtr, void * parm); +extern void * _al_bsclose (struct _al_bStream * s); +extern int _al_bsbufflength (struct _al_bStream * s, int sz); +extern int _al_bsreadln (_al_bstring b, struct _al_bStream * s, char terminator); +extern int _al_bsreadlns (_al_bstring r, struct _al_bStream * s, _al_const_bstring term); +extern int _al_bsread (_al_bstring b, struct _al_bStream * s, int n); +extern int _al_bsreadlna (_al_bstring b, struct _al_bStream * s, char terminator); +extern int _al_bsreadlnsa (_al_bstring r, struct _al_bStream * s, _al_const_bstring term); +extern int _al_bsreada (_al_bstring b, struct _al_bStream * s, int n); +extern int _al_bsunread (struct _al_bStream * s, _al_const_bstring b); +extern int _al_bspeek (_al_bstring r, const struct _al_bStream * s); +extern int _al_bssplitscb (struct _al_bStream * s, _al_const_bstring splitStr, + int (* cb) (void * parm, int ofs, _al_const_bstring entry), void * parm); +extern int _al_bssplitstrcb (struct _al_bStream * s, _al_const_bstring splitStr, + int (* cb) (void * parm, int ofs, _al_const_bstring entry), void * parm); +extern int _al_bseof (const struct _al_bStream * s); + +#ifndef __al_tagbstring_defined +#define __al_tagbstring_defined +struct _al_tagbstring { + int mlen; + int slen; + unsigned char * data; +}; +#endif + +/* Accessor macros */ +#define _al_blengthe(b, e) (((b) == (void *)0 || (b)->slen < 0) ? (int)(e) : ((b)->slen)) +#define _al_blength(b) (_al_blengthe ((b), 0)) +#define _al_bdataofse(b, o, e) (((b) == (void *)0 || (b)->data == (void*)0) ? (char *)(e) : ((char *)(b)->data) + (o)) +#define _al_bdataofs(b, o) (_al_bdataofse ((b), (o), (void *)0)) +#define _al_bdatae(b, e) (_al_bdataofse (b, 0, e)) +#define _al_bdata(b) (_al_bdataofs (b, 0)) +#define _al_bchare(b, p, e) ((((unsigned)(p)) < (unsigned)_al_blength(b)) ? ((b)->data[(p)]) : (e)) +#define _al_bchar(b, p) _al_bchare ((b), (p), '\0') + +/* Static constant string initialization macro */ +#define _al_bsStaticMlen(q,m) {(m), (int) sizeof(q)-1, (unsigned char *) ("" q "")} +#if defined(_MSC_VER) +# define _al_bsStatic(q) _al_bsStaticMlen(q,-32) +#endif +#ifndef _al_bsStatic +# define _al_bsStatic(q) _al_bsStaticMlen(q,-__LINE__) +#endif + +/* Static constant block parameter pair */ +#define _al_bsStaticBlkParms(q) ((void *)("" q "")), ((int) sizeof(q)-1) + +/* Reference building macros */ +#define _al_cstr2tbstr _al_btfromcstr +#define _al_btfromcstr(t,s) { \ + (t).data = (unsigned char *) (s); \ + (t).slen = ((t).data) ? ((int) (strlen) ((char *)(t).data)) : 0; \ + (t).mlen = -1; \ +} +#define _al_blk2tbstr(t,s,l) { \ + (t).data = (unsigned char *) (s); \ + (t).slen = l; \ + (t).mlen = -1; \ +} +#define _al_btfromblk(t,s,l) _al_blk2tbstr(t,s,l) +#define _al_bmid2tbstr(t,b,p,l) { \ + _al_const_bstring bstrtmp_s = (b); \ + if (bstrtmp_s && bstrtmp_s->data && bstrtmp_s->slen >= 0) { \ + int bstrtmp_left = (p); \ + int bstrtmp_len = (l); \ + if (bstrtmp_left < 0) { \ + bstrtmp_len += bstrtmp_left; \ + bstrtmp_left = 0; \ + } \ + if (bstrtmp_len > bstrtmp_s->slen - bstrtmp_left) \ + bstrtmp_len = bstrtmp_s->slen - bstrtmp_left; \ + if (bstrtmp_len <= 0) { \ + (t).data = (unsigned char *)""; \ + (t).slen = 0; \ + } else { \ + (t).data = bstrtmp_s->data + bstrtmp_left; \ + (t).slen = bstrtmp_len; \ + } \ + } else { \ + (t).data = (unsigned char *)""; \ + (t).slen = 0; \ + } \ + (t).mlen = -__LINE__; \ +} +#define _al_btfromblkltrimws(t,s,l) { \ + int bstrtmp_idx = 0, bstrtmp_len = (l); \ + unsigned char * bstrtmp_s = (s); \ + if (bstrtmp_s && bstrtmp_len >= 0) { \ + for (; bstrtmp_idx < bstrtmp_len; bstrtmp_idx++) { \ + if (!isspace (bstrtmp_s[bstrtmp_idx])) break; \ + } \ + } \ + (t).data = bstrtmp_s + bstrtmp_idx; \ + (t).slen = bstrtmp_len - bstrtmp_idx; \ + (t).mlen = -__LINE__; \ +} +#define _al_btfromblkrtrimws(t,s,l) { \ + int bstrtmp_len = (l) - 1; \ + unsigned char * bstrtmp_s = (s); \ + if (bstrtmp_s && bstrtmp_len >= 0) { \ + for (; bstrtmp_len >= 0; bstrtmp_len--) { \ + if (!isspace (bstrtmp_s[bstrtmp_len])) break; \ + } \ + } \ + (t).data = bstrtmp_s; \ + (t).slen = bstrtmp_len + 1; \ + (t).mlen = -__LINE__; \ +} +#define _al_btfromblktrimws(t,s,l) { \ + int bstrtmp_idx = 0, bstrtmp_len = (l) - 1; \ + unsigned char * bstrtmp_s = (s); \ + if (bstrtmp_s && bstrtmp_len >= 0) { \ + for (; bstrtmp_idx <= bstrtmp_len; bstrtmp_idx++) { \ + if (!isspace (bstrtmp_s[bstrtmp_idx])) break; \ + } \ + for (; bstrtmp_len >= bstrtmp_idx; bstrtmp_len--) { \ + if (!isspace (bstrtmp_s[bstrtmp_len])) break; \ + } \ + } \ + (t).data = bstrtmp_s + bstrtmp_idx; \ + (t).slen = bstrtmp_len + 1 - bstrtmp_idx; \ + (t).mlen = -__LINE__; \ +} + +/* Write protection macros */ +#define _al_bwriteprotect(t) { if ((t).mlen >= 0) (t).mlen = -1; } +#define _al_bwriteallow(t) { if ((t).mlen == -1) (t).mlen = (t).slen + ((t).slen == 0); } +#define _al_biswriteprotected(t) ((t).mlen <= 0) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/joystick.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/joystick.h new file mode 100644 index 0000000..0544830 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/joystick.h @@ -0,0 +1,91 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Joystick routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_joystick_h +#define __al_included_allegro5_joystick_h + +#include "allegro5/base.h" +#include "allegro5/events.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* internal values */ +#define _AL_MAX_JOYSTICK_AXES 3 +#define _AL_MAX_JOYSTICK_STICKS 8 +#define _AL_MAX_JOYSTICK_BUTTONS 32 + + + +/* Type: ALLEGRO_JOYSTICK + */ +typedef struct ALLEGRO_JOYSTICK ALLEGRO_JOYSTICK; + + + +/* Type: ALLEGRO_JOYSTICK_STATE + */ +typedef struct ALLEGRO_JOYSTICK_STATE ALLEGRO_JOYSTICK_STATE; + +struct ALLEGRO_JOYSTICK_STATE +{ + struct { + float axis[_AL_MAX_JOYSTICK_AXES]; /* -1.0 to 1.0 */ + } stick[_AL_MAX_JOYSTICK_STICKS]; + int button[_AL_MAX_JOYSTICK_BUTTONS]; /* 0 to 32767 */ +}; + + +/* Enum: ALLEGRO_JOYFLAGS + */ +enum ALLEGRO_JOYFLAGS +{ + ALLEGRO_JOYFLAG_DIGITAL = 0x01, + ALLEGRO_JOYFLAG_ANALOGUE = 0x02 +}; + + + +AL_FUNC(bool, al_install_joystick, (void)); +AL_FUNC(void, al_uninstall_joystick, (void)); +AL_FUNC(bool, al_is_joystick_installed, (void)); +AL_FUNC(bool, al_reconfigure_joysticks, (void)); + +AL_FUNC(int, al_get_num_joysticks, (void)); +AL_FUNC(ALLEGRO_JOYSTICK *, al_get_joystick, (int joyn)); +AL_FUNC(void, al_release_joystick, (ALLEGRO_JOYSTICK *)); +AL_FUNC(bool, al_get_joystick_active, (ALLEGRO_JOYSTICK *)); +AL_FUNC(const char*, al_get_joystick_name, (ALLEGRO_JOYSTICK *)); + +AL_FUNC(int, al_get_joystick_num_sticks, (ALLEGRO_JOYSTICK *)); +AL_FUNC(int, al_get_joystick_stick_flags, (ALLEGRO_JOYSTICK *, int stick)); /* junk? */ +AL_FUNC(const char*, al_get_joystick_stick_name, (ALLEGRO_JOYSTICK *, int stick)); + +AL_FUNC(int, al_get_joystick_num_axes, (ALLEGRO_JOYSTICK *, int stick)); +AL_FUNC(const char*, al_get_joystick_axis_name, (ALLEGRO_JOYSTICK *, int stick, int axis)); + +AL_FUNC(int, al_get_joystick_num_buttons, (ALLEGRO_JOYSTICK *)); +AL_FUNC(const char*, al_get_joystick_button_name, (ALLEGRO_JOYSTICK *, int buttonn)); + +AL_FUNC(void, al_get_joystick_state, (ALLEGRO_JOYSTICK *, ALLEGRO_JOYSTICK_STATE *ret_state)); + +AL_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_joystick_event_source, (void)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/keyboard.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/keyboard.h new file mode 100644 index 0000000..54aad11 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/keyboard.h @@ -0,0 +1,72 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Keyboard routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_keyboard_h +#define __al_included_allegro5_keyboard_h + +#include "allegro5/base.h" +#include "allegro5/events.h" +#include "allegro5/keycodes.h" + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct ALLEGRO_KEYBOARD ALLEGRO_KEYBOARD; + + + +/* Type: ALLEGRO_KEYBOARD_STATE + */ +typedef struct ALLEGRO_KEYBOARD_STATE ALLEGRO_KEYBOARD_STATE; + +struct ALLEGRO_KEYBOARD_STATE +{ + struct ALLEGRO_DISPLAY *display; /* public */ + /* internal */ + unsigned int __key_down__internal__[(ALLEGRO_KEY_MAX + 31) / 32]; +}; + + +AL_FUNC(bool, al_is_keyboard_installed, (void)); +AL_FUNC(bool, al_install_keyboard, (void)); +AL_FUNC(void, al_uninstall_keyboard, (void)); + +AL_FUNC(bool, al_set_keyboard_leds, (int leds)); + +AL_FUNC(const char *, al_keycode_to_name, (int keycode)); + +AL_FUNC(void, al_get_keyboard_state, (ALLEGRO_KEYBOARD_STATE *ret_state)); +AL_FUNC(bool, al_key_down, (const ALLEGRO_KEYBOARD_STATE *, int keycode)); + +AL_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_keyboard_event_source, (void)); + + +/* TODO: use the config system */ +AL_VAR(bool, _al_three_finger_flag); +AL_VAR(bool, _al_key_led_flag); + +#ifdef __cplusplus + } +#endif + +#endif + +/* + * Local Variables: + * c-basic-offset: 3 + * indent-tabs-mode: nil + * End: + */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/keycodes.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/keycodes.h new file mode 100644 index 0000000..58a8f8d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/keycodes.h @@ -0,0 +1,189 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Keycode constants. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_keycodes_h +#define __al_included_allegro5_keycodes_h + + + +/* Note these values are deliberately the same as in Allegro 4.1.x */ +enum +{ + ALLEGRO_KEY_A = 1, + ALLEGRO_KEY_B = 2, + ALLEGRO_KEY_C = 3, + ALLEGRO_KEY_D = 4, + ALLEGRO_KEY_E = 5, + ALLEGRO_KEY_F = 6, + ALLEGRO_KEY_G = 7, + ALLEGRO_KEY_H = 8, + ALLEGRO_KEY_I = 9, + ALLEGRO_KEY_J = 10, + ALLEGRO_KEY_K = 11, + ALLEGRO_KEY_L = 12, + ALLEGRO_KEY_M = 13, + ALLEGRO_KEY_N = 14, + ALLEGRO_KEY_O = 15, + ALLEGRO_KEY_P = 16, + ALLEGRO_KEY_Q = 17, + ALLEGRO_KEY_R = 18, + ALLEGRO_KEY_S = 19, + ALLEGRO_KEY_T = 20, + ALLEGRO_KEY_U = 21, + ALLEGRO_KEY_V = 22, + ALLEGRO_KEY_W = 23, + ALLEGRO_KEY_X = 24, + ALLEGRO_KEY_Y = 25, + ALLEGRO_KEY_Z = 26, + + ALLEGRO_KEY_0 = 27, + ALLEGRO_KEY_1 = 28, + ALLEGRO_KEY_2 = 29, + ALLEGRO_KEY_3 = 30, + ALLEGRO_KEY_4 = 31, + ALLEGRO_KEY_5 = 32, + ALLEGRO_KEY_6 = 33, + ALLEGRO_KEY_7 = 34, + ALLEGRO_KEY_8 = 35, + ALLEGRO_KEY_9 = 36, + + ALLEGRO_KEY_PAD_0 = 37, + ALLEGRO_KEY_PAD_1 = 38, + ALLEGRO_KEY_PAD_2 = 39, + ALLEGRO_KEY_PAD_3 = 40, + ALLEGRO_KEY_PAD_4 = 41, + ALLEGRO_KEY_PAD_5 = 42, + ALLEGRO_KEY_PAD_6 = 43, + ALLEGRO_KEY_PAD_7 = 44, + ALLEGRO_KEY_PAD_8 = 45, + ALLEGRO_KEY_PAD_9 = 46, + + ALLEGRO_KEY_F1 = 47, + ALLEGRO_KEY_F2 = 48, + ALLEGRO_KEY_F3 = 49, + ALLEGRO_KEY_F4 = 50, + ALLEGRO_KEY_F5 = 51, + ALLEGRO_KEY_F6 = 52, + ALLEGRO_KEY_F7 = 53, + ALLEGRO_KEY_F8 = 54, + ALLEGRO_KEY_F9 = 55, + ALLEGRO_KEY_F10 = 56, + ALLEGRO_KEY_F11 = 57, + ALLEGRO_KEY_F12 = 58, + + ALLEGRO_KEY_ESCAPE = 59, + ALLEGRO_KEY_TILDE = 60, + ALLEGRO_KEY_MINUS = 61, + ALLEGRO_KEY_EQUALS = 62, + ALLEGRO_KEY_BACKSPACE = 63, + ALLEGRO_KEY_TAB = 64, + ALLEGRO_KEY_OPENBRACE = 65, + ALLEGRO_KEY_CLOSEBRACE = 66, + ALLEGRO_KEY_ENTER = 67, + ALLEGRO_KEY_SEMICOLON = 68, + ALLEGRO_KEY_QUOTE = 69, + ALLEGRO_KEY_BACKSLASH = 70, + ALLEGRO_KEY_BACKSLASH2 = 71, /* DirectInput calls this DIK_OEM_102: "< > | on UK/Germany keyboards" */ + ALLEGRO_KEY_COMMA = 72, + ALLEGRO_KEY_FULLSTOP = 73, + ALLEGRO_KEY_SLASH = 74, + ALLEGRO_KEY_SPACE = 75, + + ALLEGRO_KEY_INSERT = 76, + ALLEGRO_KEY_DELETE = 77, + ALLEGRO_KEY_HOME = 78, + ALLEGRO_KEY_END = 79, + ALLEGRO_KEY_PGUP = 80, + ALLEGRO_KEY_PGDN = 81, + ALLEGRO_KEY_LEFT = 82, + ALLEGRO_KEY_RIGHT = 83, + ALLEGRO_KEY_UP = 84, + ALLEGRO_KEY_DOWN = 85, + + ALLEGRO_KEY_PAD_SLASH = 86, + ALLEGRO_KEY_PAD_ASTERISK = 87, + ALLEGRO_KEY_PAD_MINUS = 88, + ALLEGRO_KEY_PAD_PLUS = 89, + ALLEGRO_KEY_PAD_DELETE = 90, + ALLEGRO_KEY_PAD_ENTER = 91, + + ALLEGRO_KEY_PRINTSCREEN = 92, + ALLEGRO_KEY_PAUSE = 93, + + ALLEGRO_KEY_ABNT_C1 = 94, + ALLEGRO_KEY_YEN = 95, + ALLEGRO_KEY_KANA = 96, + ALLEGRO_KEY_CONVERT = 97, + ALLEGRO_KEY_NOCONVERT = 98, + ALLEGRO_KEY_AT = 99, + ALLEGRO_KEY_CIRCUMFLEX = 100, + ALLEGRO_KEY_COLON2 = 101, + ALLEGRO_KEY_KANJI = 102, + + ALLEGRO_KEY_PAD_EQUALS = 103, /* MacOS X */ + ALLEGRO_KEY_BACKQUOTE = 104, /* MacOS X */ + ALLEGRO_KEY_SEMICOLON2 = 105, /* MacOS X -- TODO: ask lillo what this should be */ + ALLEGRO_KEY_COMMAND = 106, /* MacOS X */ + ALLEGRO_KEY_UNKNOWN = 107, + + /* All codes up to before ALLEGRO_KEY_MODIFIERS can be freely + * assignedas additional unknown keys, like various multimedia + * and application keys keyboards may have. + */ + + ALLEGRO_KEY_MODIFIERS = 215, + + ALLEGRO_KEY_LSHIFT = 215, + ALLEGRO_KEY_RSHIFT = 216, + ALLEGRO_KEY_LCTRL = 217, + ALLEGRO_KEY_RCTRL = 218, + ALLEGRO_KEY_ALT = 219, + ALLEGRO_KEY_ALTGR = 220, + ALLEGRO_KEY_LWIN = 221, + ALLEGRO_KEY_RWIN = 222, + ALLEGRO_KEY_MENU = 223, + ALLEGRO_KEY_SCROLLLOCK = 224, + ALLEGRO_KEY_NUMLOCK = 225, + ALLEGRO_KEY_CAPSLOCK = 226, + + ALLEGRO_KEY_MAX +}; + + + +enum +{ + ALLEGRO_KEYMOD_SHIFT = 0x00001, + ALLEGRO_KEYMOD_CTRL = 0x00002, + ALLEGRO_KEYMOD_ALT = 0x00004, + ALLEGRO_KEYMOD_LWIN = 0x00008, + ALLEGRO_KEYMOD_RWIN = 0x00010, + ALLEGRO_KEYMOD_MENU = 0x00020, + ALLEGRO_KEYMOD_ALTGR = 0x00040, + ALLEGRO_KEYMOD_COMMAND = 0x00080, + ALLEGRO_KEYMOD_SCROLLLOCK = 0x00100, + ALLEGRO_KEYMOD_NUMLOCK = 0x00200, + ALLEGRO_KEYMOD_CAPSLOCK = 0x00400, + ALLEGRO_KEYMOD_INALTSEQ = 0x00800, + ALLEGRO_KEYMOD_ACCENT1 = 0x01000, + ALLEGRO_KEYMOD_ACCENT2 = 0x02000, + ALLEGRO_KEYMOD_ACCENT3 = 0x04000, + ALLEGRO_KEYMOD_ACCENT4 = 0x08000 +}; + + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/memory.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/memory.h new file mode 100644 index 0000000..697557c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/memory.h @@ -0,0 +1,73 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Memory management routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_memory_h +#define __al_included_allegro5_memory_h + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_MEMORY_INTERFACE + */ +typedef struct ALLEGRO_MEMORY_INTERFACE ALLEGRO_MEMORY_INTERFACE; + +struct ALLEGRO_MEMORY_INTERFACE { + void *(*mi_malloc)(size_t n, int line, const char *file, const char *func); + void (*mi_free)(void *ptr, int line, const char *file, const char *func); + void *(*mi_realloc)(void *ptr, size_t n, int line, const char *file, const char *func); + void *(*mi_calloc)(size_t count, size_t n, int line, const char *file, const char *func); +}; + +AL_FUNC(void, al_set_memory_interface, (ALLEGRO_MEMORY_INTERFACE *iface)); + + +/* Function: al_malloc + */ +#define al_malloc(n) \ + (al_malloc_with_context((n), __LINE__, __FILE__, __func__)) + +/* Function: al_free + */ +#define al_free(p) \ + (al_free_with_context((p), __LINE__, __FILE__, __func__)) + +/* Function: al_realloc + */ +#define al_realloc(p, n) \ + (al_realloc_with_context((p), (n), __LINE__, __FILE__, __func__)) + +/* Function: al_calloc + */ +#define al_calloc(c, n) \ + (al_calloc_with_context((c), (n), __LINE__, __FILE__, __func__)) + + +AL_FUNC(void *, al_malloc_with_context, (size_t n, + int line, const char *file, const char *func)); +AL_FUNC(void, al_free_with_context, (void *ptr, + int line, const char *file, const char *func)); +AL_FUNC(void *, al_realloc_with_context, (void *ptr, size_t n, + int line, const char *file, const char *func)); +AL_FUNC(void *, al_calloc_with_context, (size_t count, size_t n, + int line, const char *file, const char *func)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/monitor.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/monitor.h new file mode 100644 index 0000000..2e939da --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/monitor.h @@ -0,0 +1,33 @@ +#ifndef __al_included_allegro5_monitor_h +#define __al_included_allegro5_monitor_h + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Type: ALLEGRO_MONITOR_INFO + */ +typedef struct ALLEGRO_MONITOR_INFO +{ + int x1; + int y1; + int x2; + int y2; +} ALLEGRO_MONITOR_INFO; + +enum { + ALLEGRO_DEFAULT_DISPLAY_ADAPTER = -1 +}; + +AL_FUNC(int, al_get_num_video_adapters, (void)); +AL_FUNC(bool, al_get_monitor_info, (int adapter, ALLEGRO_MONITOR_INFO *info)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set ts=8 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse.h new file mode 100644 index 0000000..4001ad2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse.h @@ -0,0 +1,80 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Mouse routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_mouse_h +#define __al_included_allegro5_mouse_h + +#include "allegro5/base.h" +#include "allegro5/events.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Allow up to four extra axes for future expansion. */ +#define ALLEGRO_MOUSE_MAX_EXTRA_AXES 4 + + +typedef struct ALLEGRO_MOUSE ALLEGRO_MOUSE; + + +/* Type: ALLEGRO_MOUSE_STATE + */ +typedef struct ALLEGRO_MOUSE_STATE ALLEGRO_MOUSE_STATE; + +struct ALLEGRO_MOUSE_STATE +{ + /* (x, y) Primary mouse position + * (z) Mouse wheel position (1D 'wheel'), or, + * (w, z) Mouse wheel position (2D 'ball') + * display - the display the mouse is on (coordinates are relative to this) + * pressure - the pressure appleid to the mouse (for stylus/tablet) + */ + int x; + int y; + int z; + int w; + int more_axes[ALLEGRO_MOUSE_MAX_EXTRA_AXES]; + int buttons; + float pressure; + struct ALLEGRO_DISPLAY *display; +}; + + +AL_FUNC(bool, al_is_mouse_installed, (void)); +AL_FUNC(bool, al_install_mouse, (void)); +AL_FUNC(void, al_uninstall_mouse, (void)); +AL_FUNC(unsigned int, al_get_mouse_num_buttons, (void)); +AL_FUNC(unsigned int, al_get_mouse_num_axes, (void)); +AL_FUNC(bool, al_set_mouse_xy, (struct ALLEGRO_DISPLAY *display, int x, int y)); +AL_FUNC(bool, al_set_mouse_z, (int z)); +AL_FUNC(bool, al_set_mouse_w, (int w)); +AL_FUNC(bool, al_set_mouse_axis, (int axis, int value)); +AL_FUNC(void, al_get_mouse_state, (ALLEGRO_MOUSE_STATE *ret_state)); +AL_FUNC(bool, al_mouse_button_down, (const ALLEGRO_MOUSE_STATE *state, int button)); +AL_FUNC(int, al_get_mouse_state_axis, (const ALLEGRO_MOUSE_STATE *state, int axis)); +AL_FUNC(bool, al_get_mouse_cursor_position, (int *ret_x, int *ret_y)); +AL_FUNC(bool, al_grab_mouse, (struct ALLEGRO_DISPLAY *display)); +AL_FUNC(bool, al_ungrab_mouse, (void)); + +AL_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_mouse_event_source, (void)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse_cursor.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse_cursor.h new file mode 100644 index 0000000..69c7043 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/mouse_cursor.h @@ -0,0 +1,58 @@ +#ifndef __al_included_allegro5_mouse_cursor_h +#define __al_included_allegro5_mouse_cursor_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct ALLEGRO_MOUSE_CURSOR ALLEGRO_MOUSE_CURSOR; + +typedef enum ALLEGRO_SYSTEM_MOUSE_CURSOR +{ + ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE = 0, + ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT = 1, + ALLEGRO_SYSTEM_MOUSE_CURSOR_ARROW = 2, + ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY = 3, + ALLEGRO_SYSTEM_MOUSE_CURSOR_QUESTION = 4, + ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT = 5, + ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE = 6, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N = 7, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W = 8, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S = 9, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E = 10, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW = 11, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW = 12, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE = 13, + ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE = 14, + ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS = 15, + ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION = 16, + ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK = 17, + ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT = 18, + ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE = 19, + ALLEGRO_NUM_SYSTEM_MOUSE_CURSORS +} ALLEGRO_SYSTEM_MOUSE_CURSOR; + +struct ALLEGRO_BITMAP; +struct ALLEGRO_DISPLAY; + + +AL_FUNC(ALLEGRO_MOUSE_CURSOR *, al_create_mouse_cursor, ( + struct ALLEGRO_BITMAP *sprite, int xfocus, int yfocus)); +AL_FUNC(void, al_destroy_mouse_cursor, (ALLEGRO_MOUSE_CURSOR *)); +AL_FUNC(bool, al_set_mouse_cursor, (struct ALLEGRO_DISPLAY *display, + ALLEGRO_MOUSE_CURSOR *cursor)); +AL_FUNC(bool, al_set_system_mouse_cursor, (struct ALLEGRO_DISPLAY *display, + ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id)); +AL_FUNC(bool, al_show_mouse_cursor, (struct ALLEGRO_DISPLAY *display)); +AL_FUNC(bool, al_hide_mouse_cursor, (struct ALLEGRO_DISPLAY *display)); + + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_alias.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_alias.h new file mode 100644 index 0000000..4cb71a0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_alias.h @@ -0,0 +1,2564 @@ +/*Automatically generated by gl_mkalias.sh DO NOT EDIT!*/ +/**/ + +#ifdef _ALLEGRO_GL_VERSION_1_2 +#define glBlendColor _al_glBlendColor +#define glBlendEquation _al_glBlendEquation +#define glDrawRangeElements _al_glDrawRangeElements +#define glColorTable _al_glColorTable +#define glColorTableParameterfv _al_glColorTableParameterfv +#define glColorTableParameteriv _al_glColorTableParameteriv +#define glCopyColorTable _al_glCopyColorTable +#define glGetColorTable _al_glGetColorTable +#define glGetColorTableParameterfv _al_glGetColorTableParameterfv +#define glGetColorTableParameteriv _al_glGetColorTableParameteriv +#define glColorSubTable _al_glColorSubTable +#define glCopyColorSubTable _al_glCopyColorSubTable +#define glTexImage3D _al_glTexImage3D +#define glTexSubImage3D _al_glTexSubImage3D +#define glCopyTexSubImage3D _al_glCopyTexSubImage3D +#endif + +#if defined _ALLEGRO_GL_ARB_imaging +#define glConvolutionFilter1D _al_glConvolutionFilter1D +#define glConvolutionFilter2D _al_glConvolutionFilter2D +#define glConvolutionParameterf _al_glConvolutionParameterf +#define glConvolutionParameterfv _al_glConvolutionParameterfv +#define glConvolutionParameteri _al_glConvolutionParameteri +#define glConvolutionParameteriv _al_glConvolutionParameteriv +#define glCopyConvolutionFilter1D _al_glCopyConvolutionFilter1D +#define glCopyConvolutionFilter2D _al_glCopyConvolutionFilter2D +#define glGetConvolutionFilter _al_glGetConvolutionFilter +#define glGetConvolutionParameterfv _al_glGetConvolutionParameterfv +#define glGetConvolutionParameteriv _al_glGetConvolutionParameteriv +#define glGetSeparableFilter _al_glGetSeparableFilter +#define glSeparableFilter2D _al_glSeparableFilter2D +#define glGetHistogram _al_glGetHistogram +#define glGetHistogramParameterfv _al_glGetHistogramParameterfv +#define glGetHistogramParameteriv _al_glGetHistogramParameteriv +#define glGetMinmax _al_glGetMinmax +#define glGetMinmaxParameterfv _al_glGetMinmaxParameterfv +#define glGetMinmaxParameteriv _al_glGetMinmaxParameteriv +#define glHistogram _al_glHistogram +#define glMinmax _al_glMinmax +#define glResetHistogram _al_glResetHistogram +#define glResetMinmax _al_glResetMinmax +#endif + +#if defined _ALLEGRO_GL_VERSION_1_3 +#define glActiveTexture _al_glActiveTexture +#define glClientActiveTexture _al_glClientActiveTexture +#define glMultiTexCoord1d _al_glMultiTexCoord1d +#define glMultiTexCoord1dv _al_glMultiTexCoord1dv +#define glMultiTexCoord1f _al_glMultiTexCoord1f +#define glMultiTexCoord1fv _al_glMultiTexCoord1fv +#define glMultiTexCoord1i _al_glMultiTexCoord1i +#define glMultiTexCoord1iv _al_glMultiTexCoord1iv +#define glMultiTexCoord1s _al_glMultiTexCoord1s +#define glMultiTexCoord1sv _al_glMultiTexCoord1sv +#define glMultiTexCoord2d _al_glMultiTexCoord2d +#define glMultiTexCoord2dv _al_glMultiTexCoord2dv +#define glMultiTexCoord2f _al_glMultiTexCoord2f +#define glMultiTexCoord2fv _al_glMultiTexCoord2fv +#define glMultiTexCoord2i _al_glMultiTexCoord2i +#define glMultiTexCoord2iv _al_glMultiTexCoord2iv +#define glMultiTexCoord2s _al_glMultiTexCoord2s +#define glMultiTexCoord2sv _al_glMultiTexCoord2sv +#define glMultiTexCoord3d _al_glMultiTexCoord3d +#define glMultiTexCoord3dv _al_glMultiTexCoord3dv +#define glMultiTexCoord3f _al_glMultiTexCoord3f +#define glMultiTexCoord3fv _al_glMultiTexCoord3fv +#define glMultiTexCoord3i _al_glMultiTexCoord3i +#define glMultiTexCoord3iv _al_glMultiTexCoord3iv +#define glMultiTexCoord3s _al_glMultiTexCoord3s +#define glMultiTexCoord3sv _al_glMultiTexCoord3sv +#define glMultiTexCoord4d _al_glMultiTexCoord4d +#define glMultiTexCoord4dv _al_glMultiTexCoord4dv +#define glMultiTexCoord4f _al_glMultiTexCoord4f +#define glMultiTexCoord4fv _al_glMultiTexCoord4fv +#define glMultiTexCoord4i _al_glMultiTexCoord4i +#define glMultiTexCoord4iv _al_glMultiTexCoord4iv +#define glMultiTexCoord4s _al_glMultiTexCoord4s +#define glMultiTexCoord4sv _al_glMultiTexCoord4sv +#define glLoadTransposeMatrixf _al_glLoadTransposeMatrixf +#define glLoadTransposeMatrixd _al_glLoadTransposeMatrixd +#define glMultTransposeMatrixf _al_glMultTransposeMatrixf +#define glMultTransposeMatrixd _al_glMultTransposeMatrixd +#define glSampleCoverage _al_glSampleCoverage +#define glCompressedTexImage3D _al_glCompressedTexImage3D +#define glCompressedTexImage2D _al_glCompressedTexImage2D +#define glCompressedTexImage1D _al_glCompressedTexImage1D +#define glCompressedTexSubImage3D _al_glCompressedTexSubImage3D +#define glCompressedTexSubImage2D _al_glCompressedTexSubImage2D +#define glCompressedTexSubImage1D _al_glCompressedTexSubImage1D +#define glGetCompressedTexImage _al_glGetCompressedTexImage +#endif + +#if defined _ALLEGRO_GL_VERSION_1_4 +#define glBlendFuncSeparate _al_glBlendFuncSeparate +#define glFogCoordf _al_glFogCoordf +#define glFogCoordfv _al_glFogCoordfv +#define glFogCoordd _al_glFogCoordd +#define glFogCoorddv _al_glFogCoorddv +#define glFogCoordPointer _al_glFogCoordPointer +#define glMultiDrawArrays _al_glMultiDrawArrays +#define glMultiDrawElements _al_glMultiDrawElements +#define glPointParameterf _al_glPointParameterf +#define glPointParameterfv _al_glPointParameterfv +#define glPointParameteri _al_glPointParameteri +#define glPointParameteriv _al_glPointParameteriv +#define glSecondaryColor3b _al_glSecondaryColor3b +#define glSecondaryColor3bv _al_glSecondaryColor3bv +#define glSecondaryColor3d _al_glSecondaryColor3d +#define glSecondaryColor3dv _al_glSecondaryColor3dv +#define glSecondaryColor3f _al_glSecondaryColor3f +#define glSecondaryColor3fv _al_glSecondaryColor3fv +#define glSecondaryColor3i _al_glSecondaryColor3i +#define glSecondaryColor3iv _al_glSecondaryColor3iv +#define glSecondaryColor3s _al_glSecondaryColor3s +#define glSecondaryColor3sv _al_glSecondaryColor3sv +#define glSecondaryColor3ub _al_glSecondaryColor3ub +#define glSecondaryColor3ubv _al_glSecondaryColor3ubv +#define glSecondaryColor3ui _al_glSecondaryColor3ui +#define glSecondaryColor3uiv _al_glSecondaryColor3uiv +#define glSecondaryColor3us _al_glSecondaryColor3us +#define glSecondaryColor3usv _al_glSecondaryColor3usv +#define glSecondaryColorPointer _al_glSecondaryColorPointer +#define glWindowPos2d _al_glWindowPos2d +#define glWindowPos2dv _al_glWindowPos2dv +#define glWindowPos2f _al_glWindowPos2f +#define glWindowPos2fv _al_glWindowPos2fv +#define glWindowPos2i _al_glWindowPos2i +#define glWindowPos2iv _al_glWindowPos2iv +#define glWindowPos2s _al_glWindowPos2s +#define glWindowPos2sv _al_glWindowPos2sv +#define glWindowPos3d _al_glWindowPos3d +#define glWindowPos3dv _al_glWindowPos3dv +#define glWindowPos3f _al_glWindowPos3f +#define glWindowPos3fv _al_glWindowPos3fv +#define glWindowPos3i _al_glWindowPos3i +#define glWindowPos3iv _al_glWindowPos3iv +#define glWindowPos3s _al_glWindowPos3s +#define glWindowPos3sv _al_glWindowPos3sv +#endif + + +#if defined _ALLEGRO_GL_VERSION_1_5 +#define glBindBuffer _al_glBindBuffer +#define glDeleteBuffers _al_glDeleteBuffers +#define glGenBuffers _al_glGenBuffers +#define glIsBuffer _al_glIsBuffer +#define glBufferData _al_glBufferData +#define glBufferSubData _al_glBufferSubData +#define glGetBufferSubData _al_glGetBufferSubData +#define glMapBuffer _al_glMapBuffer +#define glUnmapBuffer _al_glUnmapBuffer +#define glGetBufferParameteriv _al_glGetBufferParameteriv +#define glGetBufferPointerv _al_glGetBufferPointerv +#define glGenQueries _al_glGenQueries +#define glDeleteQueries _al_glDeleteQueries +#define glIsQuery _al_glIsQuery +#define glBeginQuery _al_glBeginQuery +#define glEndQuery _al_glEndQuery +#define glGetQueryiv _al_glGetQueryiv +#define glGetQueryObjectiv _al_glGetQueryObjectiv +#define glGetQueryObjectuiv _al_glGetQueryObjectuiv +#endif + + +#if defined _ALLEGRO_GL_VERSION_2_0 +#define glBlendEquationSeparate _al_glBlendEquationSeparate +#define glCreateProgram _al_glCreateProgram +#define glCreateShader _al_glCreateShader +#define glDeleteProgram _al_glDeleteProgram +#define glDeleteShader _al_glDeleteShader +#define glAttachShader _al_glAttachShader +#define glDetachShader _al_glDetachShader +#define glShaderSource _al_glShaderSource +#define glCompileShader _al_glCompileShader +#define glIsProgram _al_glIsProgram +#define glIsShader _al_glIsShader +#define glLinkProgram _al_glLinkProgram +#define glUseProgram _al_glUseProgram +#define glValidateProgram _al_glValidateProgram +#define glUniform1f _al_glUniform1f +#define glUniform2f _al_glUniform2f +#define glUniform3f _al_glUniform3f +#define glUniform4f _al_glUniform4f +#define glUniform1i _al_glUniform1i +#define glUniform2i _al_glUniform2i +#define glUniform3i _al_glUniform3i +#define glUniform4i _al_glUniform4i +#define glUniform1fv _al_glUniform1fv +#define glUniform2fv _al_glUniform2fv +#define glUniform3fv _al_glUniform3fv +#define glUniform4fv _al_glUniform4fv +#define glUniform1iv _al_glUniform1iv +#define glUniform2iv _al_glUniform2iv +#define glUniform3iv _al_glUniform3iv +#define glUniform4iv _al_glUniform4iv +#define glUniformMatrix2fv _al_glUniformMatrix2fv +#define glUniformMatrix3fv _al_glUniformMatrix3fv +#define glUniformMatrix4fv _al_glUniformMatrix4fv +#define glGetShaderfv _al_glGetShaderfv +#define glGetShaderiv _al_glGetShaderiv +#define glGetProgramfv _al_glGetProgramfv +#define glGetProgramiv _al_glGetProgramiv +#define glGetShaderInfoLog _al_glGetShaderInfoLog +#define glGetProgramInfoLog _al_glGetProgramInfoLog +#define glGetAttachedShaders _al_glGetAttachedShaders +#define glGetUniformLocation _al_glGetUniformLocation +#define glGetActiveUniform _al_glGetActiveUniform +#define glGetUniformfv _al_glGetUniformfv +#define glGetUniformiv _al_glGetUniformiv +#define glGetShaderSource _al_glGetShaderSource +#define glVertexAttrib1f _al_glVertexAttrib1f +#define glVertexAttrib1s _al_glVertexAttrib1s +#define glVertexAttrib1d _al_glVertexAttrib1d +#define glVertexAttrib2f _al_glVertexAttrib2f +#define glVertexAttrib2s _al_glVertexAttrib2s +#define glVertexAttrib2d _al_glVertexAttrib2d +#define glVertexAttrib3f _al_glVertexAttrib3f +#define glVertexAttrib3s _al_glVertexAttrib3s +#define glVertexAttrib3d _al_glVertexAttrib3d +#define glVertexAttrib4f _al_glVertexAttrib4f +#define glVertexAttrib4s _al_glVertexAttrib4s +#define glVertexAttrib4d _al_glVertexAttrib4d +#define glVertexAttrib4Nub _al_glVertexAttrib4Nub +#define glVertexAttrib1fv _al_glVertexAttrib1fv +#define glVertexAttrib1sv _al_glVertexAttrib1sv +#define glVertexAttrib1dv _al_glVertexAttrib1dv +#define glVertexAttrib2fv _al_glVertexAttrib2fv +#define glVertexAttrib2sv _al_glVertexAttrib2sv +#define glVertexAttrib2dv _al_glVertexAttrib2dv +#define glVertexAttrib3fv _al_glVertexAttrib3fv +#define glVertexAttrib3sv _al_glVertexAttrib3sv +#define glVertexAttrib3dv _al_glVertexAttrib3dv +#define glVertexAttrib4fv _al_glVertexAttrib4fv +#define glVertexAttrib4sv _al_glVertexAttrib4sv +#define glVertexAttrib4dv _al_glVertexAttrib4dv +#define glVertexAttrib4iv _al_glVertexAttrib4iv +#define glVertexAttrib4bv _al_glVertexAttrib4bv +#define glVertexAttrib4ubv _al_glVertexAttrib4ubv +#define glVertexAttrib4usv _al_glVertexAttrib4usv +#define glVertexAttrib4uiv _al_glVertexAttrib4uiv +#define glVertexAttrib4Nbv _al_glVertexAttrib4Nbv +#define glVertexAttrib4Nsv _al_glVertexAttrib4Nsv +#define glVertexAttrib4Niv _al_glVertexAttrib4Niv +#define glVertexAttrib4Nubv _al_glVertexAttrib4Nubv +#define glVertexAttrib4Nusv _al_glVertexAttrib4Nusv +#define glVertexAttrib4Nuiv _al_glVertexAttrib4Nuiv +#define glVertexAttribPointer _al_glVertexAttribPointer +#define glEnableVertexAttribArray _al_glEnableVertexAttribArray +#define glDisableVertexAttribArray _al_glDisableVertexAttribArray + +#define glBindAttribLocation _al_glBindAttribLocation +#define glGetActiveAttrib _al_glGetActiveAttrib +#define glGetAttribLocation _al_glGetAttribLocation +#define glGetVertexAttribdv _al_glGetVertexAttribdv +#define glGetVertexAttribfv _al_glGetVertexAttribfv +#define glGetVertexAttribiv _al_glGetVertexAttribiv +#define glGetVertexAttribPointerv _al_glGetVertexAttribPointerv + +#define glDrawBuffers _al_glDrawBuffers + +#define glStencilOpSeparate _al_glStencilOpSeparate +#define glStencilFuncSeparate _al_glStencilFuncSeparate + +#endif + + +#if defined _ALLEGRO_GL_VERSION_2_1 +#define glUniformMatrix2x3fv _al_glUniformMatrix2x3fv +#define glUniformMatrix3x2fv _al_glUniformMatrix3x2fv +#define glUniformMatrix2x4fv _al_glUniformMatrix2x4fv +#define glUniformMatrix4x2fv _al_glUniformMatrix4x2fv +#define glUniformMatrix3x4fv _al_glUniformMatrix3x4fv +#define glUniformMatrix4x3fv _al_glUniformMatrix4x3fv +#endif + +#if defined _ALLEGRO_GL_VERSION_3_0 +/*OpenGL3.0alsoreusesentrypointsfromtheseextensions:*/ +/*ARB_framebuffer_object*/ +/*ARB_map_buffer_range*/ +/*ARB_vertex_array_object*/ +#define glColorMaski _al_glColorMaski +#define glGetBooleani_v _al_glGetBooleani_v +#define glGetIntegeri_v _al_glGetIntegeri_v +#define glEnablei _al_glEnablei +#define glDisablei _al_glDisablei +#define glIsEnabledi _al_glIsEnabledi +#define glBeginTransformFeedback _al_glBeginTransformFeedback +#define glEndTransformFeedback _al_glEndTransformFeedback +#define glBindBufferRange _al_glBindBufferRange +#define glBindBufferBase _al_glBindBufferBase +#define glTransformFeedbackVaryings _al_glTransformFeedbackVaryings +#define glGetTransformFeedbackVarying _al_glGetTransformFeedbackVarying +#define glClampColor _al_glClampColor +#define glBeginConditionalRender _al_glBeginConditionalRender +#define glEndConditionalRender _al_glEndConditionalRender +#define glVertexAttribI1i _al_glVertexAttribI1i +#define glVertexAttribI2i _al_glVertexAttribI2i +#define glVertexAttribI3i _al_glVertexAttribI3i +#define glVertexAttribI4i _al_glVertexAttribI4i +#define glVertexAttribI1ui _al_glVertexAttribI1ui +#define glVertexAttribI2ui _al_glVertexAttribI2ui +#define glVertexAttribI3ui _al_glVertexAttribI3ui +#define glVertexAttribI4ui _al_glVertexAttribI4ui +#define glVertexAttribI1iv _al_glVertexAttribI1iv +#define glVertexAttribI2iv _al_glVertexAttribI2iv +#define glVertexAttribI3iv _al_glVertexAttribI3iv +#define glVertexAttribI4iv _al_glVertexAttribI4iv +#define glVertexAttribI1uiv _al_glVertexAttribI1uiv +#define glVertexAttribI2uiv _al_glVertexAttribI2uiv +#define glVertexAttribI3uiv _al_glVertexAttribI3uiv +#define glVertexAttribI4uiv _al_glVertexAttribI4uiv +#define glVertexAttribI4bv _al_glVertexAttribI4bv +#define glVertexAttribI4sv _al_glVertexAttribI4sv +#define glVertexAttribI4ubv _al_glVertexAttribI4ubv +#define glVertexAttribI4usv _al_glVertexAttribI4usv +#define glVertexAttribIPointer _al_glVertexAttribIPointer +#define glGetVertexAttribIiv _al_glGetVertexAttribIiv +#define glGetVertexAttribIuiv _al_glGetVertexAttribIuiv +#define glGetUniformuiv _al_glGetUniformuiv +#define glBindFragDataLocation _al_glBindFragDataLocation +#define glGetFragDataLocation _al_glGetFragDataLocation +#define glUniform1ui _al_glUniform1ui +#define glUniform2ui _al_glUniform2ui +#define glUniform3ui _al_glUniform3ui +#define glUniform4ui _al_glUniform4ui +#define glUniform1uiv _al_glUniform1uiv +#define glUniform2uiv _al_glUniform2uiv +#define glUniform3uiv _al_glUniform3uiv +#define glUniform4uiv _al_glUniform4uiv +#define glTexParameterIiv _al_glTexParameterIiv +#define glTexParameterIuiv _al_glTexParameterIuiv +#define glGetTexParameterIiv _al_glGetTexParameterIiv +#define glGetTexParameterIuiv _al_glGetTexParameterIuiv +#define glClearBufferiv _al_glClearBufferiv +#define glClearBufferuiv _al_glClearBufferuiv +#define glClearBufferfv _al_glClearBufferfv +#define glClearBufferfi _al_glClearBufferfi +#define glGetStringi _al_glGetStringi +#endif + + +#if defined _ALLEGRO_GL_VERSION_3_1 +/*OpenGL3.1alsoreusesentrypointsfromtheseextensions:*/ +/*ARB_copy_buffer*/ +/*ARB_uniform_buffer_object*/ +#define glDrawArraysInstanced _al_glDrawArraysInstanced +#define glDrawElementsInstanced _al_glDrawElementsInstanced +#define glTexBuffer _al_glTexBuffer +#define glPrimitiveRestartIndex _al_glPrimitiveRestartIndex +#endif + +#if defined _ALLEGRO_GL_VERSION_3_2 +/*OpenGL3.2alsoreusesentrypointsfromtheseextensions:*/ +/*ARB_draw_elements_base_vertex*/ +/*ARB_provoking_vertex*/ +/*ARB_sync*/ +/*ARB_texture_multisample*/ +#define glGetInteger64i_v _al_glGetInteger64i_v +#define glGetBufferParameteri64v _al_glGetBufferParameteri64v +#define glProgramParameteri _al_glProgramParameteri +#define glFramebufferTexture _al_glFramebufferTexture +#endif + +#if defined _ALLEGRO_GL_VERSION_3_3 +/*OpenGL3.3alsoreusesentrypointsfromtheseextensions:*/ +/*ARB_blend_func_extended*/ +/*ARB_sampler_objects*/ +/*ARB_explicit_attrib_location,butithasnone*/ +/*ARB_occlusion_query2(noentrypoints)*/ +/*ARB_shader_bit_encoding(noentrypoints)*/ +/*ARB_texture_rgb10_a2ui(noentrypoints)*/ +/*ARB_texture_swizzle(noentrypoints)*/ +/*ARB_timer_query*/ +/*ARB_vertex_type_2_10_10_10_rev*/ +#endif + + +/**/ +/**/ + +#ifdef _ALLEGRO_GL_ARB_multitexture +#define glActiveTextureARB _al_glActiveTextureARB +#define glClientActiveTextureARB _al_glClientActiveTextureARB +#define glMultiTexCoord1dARB _al_glMultiTexCoord1dARB +#define glMultiTexCoord1dvARB _al_glMultiTexCoord1dvARB +#define glMultiTexCoord1fARB _al_glMultiTexCoord1fARB +#define glMultiTexCoord1fvARB _al_glMultiTexCoord1fvARB +#define glMultiTexCoord1iARB _al_glMultiTexCoord1iARB +#define glMultiTexCoord1ivARB _al_glMultiTexCoord1ivARB +#define glMultiTexCoord1sARB _al_glMultiTexCoord1sARB +#define glMultiTexCoord1svARB _al_glMultiTexCoord1svARB +#define glMultiTexCoord2dARB _al_glMultiTexCoord2dARB +#define glMultiTexCoord2dvARB _al_glMultiTexCoord2dvARB +#define glMultiTexCoord2fARB _al_glMultiTexCoord2fARB +#define glMultiTexCoord2fvARB _al_glMultiTexCoord2fvARB +#define glMultiTexCoord2iARB _al_glMultiTexCoord2iARB +#define glMultiTexCoord2ivARB _al_glMultiTexCoord2ivARB +#define glMultiTexCoord2sARB _al_glMultiTexCoord2sARB +#define glMultiTexCoord2svARB _al_glMultiTexCoord2svARB +#define glMultiTexCoord3dARB _al_glMultiTexCoord3dARB +#define glMultiTexCoord3dvARB _al_glMultiTexCoord3dvARB +#define glMultiTexCoord3fARB _al_glMultiTexCoord3fARB +#define glMultiTexCoord3fvARB _al_glMultiTexCoord3fvARB +#define glMultiTexCoord3iARB _al_glMultiTexCoord3iARB +#define glMultiTexCoord3ivARB _al_glMultiTexCoord3ivARB +#define glMultiTexCoord3sARB _al_glMultiTexCoord3sARB +#define glMultiTexCoord3svARB _al_glMultiTexCoord3svARB +#define glMultiTexCoord4dARB _al_glMultiTexCoord4dARB +#define glMultiTexCoord4dvARB _al_glMultiTexCoord4dvARB +#define glMultiTexCoord4fARB _al_glMultiTexCoord4fARB +#define glMultiTexCoord4fvARB _al_glMultiTexCoord4fvARB +#define glMultiTexCoord4iARB _al_glMultiTexCoord4iARB +#define glMultiTexCoord4ivARB _al_glMultiTexCoord4ivARB +#define glMultiTexCoord4sARB _al_glMultiTexCoord4sARB +#define glMultiTexCoord4svARB _al_glMultiTexCoord4svARB +#endif + +#if defined _ALLEGRO_GL_ARB_transpose_matrix +#define glLoadTransposeMatrixfARB _al_glLoadTransposeMatrixfARB +#define glLoadTransposeMatrixdARB _al_glLoadTransposeMatrixdARB +#define glMultTransposeMatrixfARB _al_glMultTransposeMatrixfARB +#define glMultTransposeMatrixdARB _al_glMultTransposeMatrixdARB +#endif + +#if defined _ALLEGRO_GL_ARB_multisample +#define glSampleCoverageARB _al_glSampleCoverageARB +#endif + +#if defined _ALLEGRO_GL_ARB_texture_compression +#define glCompressedTexImage3DARB _al_glCompressedTexImage3DARB +#define glCompressedTexImage2DARB _al_glCompressedTexImage2DARB +#define glCompressedTexImage1DARB _al_glCompressedTexImage1DARB +#define glCompressedTexSubImage3DARB _al_glCompressedTexSubImage3DARB +#define glCompressedTexSubImage2DARB _al_glCompressedTexSubImage2DARB +#define glCompressedTexSubImage1DARB _al_glCompressedTexSubImage1DARB +#define glGetCompressedTexImageARB _al_glGetCompressedTexImageARB +#endif + +#if defined _ALLEGRO_GL_ARB_point_parameters +#define glPointParameterfARB _al_glPointParameterfARB +#define glPointParameterfvARB _al_glPointParameterfvARB +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_blend +#define glWeightbvARB _al_glWeightbvARB +#define glWeightsvARB _al_glWeightsvARB +#define glWeightivARB _al_glWeightivARB +#define glWeightfvARB _al_glWeightfvARB +#define glWeightdvARB _al_glWeightdvARB +#define glWeightubvARB _al_glWeightubvARB +#define glWeightusvARB _al_glWeightusvARB +#define glWeightuivARB _al_glWeightuivARB +#define glWeightPointerARB _al_glWeightPointerARB +#define glVertexBlendARB _al_glVertexBlendARB +#endif + +#if defined _ALLEGRO_GL_ARB_matrix_palette +#define glCurrentPaletteMatrixARB _al_glCurrentPaletteMatrixARB +#define glMatrixIndexubvARB _al_glMatrixIndexubvARB +#define glMatrixIndexusvARB _al_glMatrixIndexusvARB +#define glMatrixIndexuivARB _al_glMatrixIndexuivARB +#define glMatrixIndexPointerARB _al_glMatrixIndexPointerARB +#endif + +#if defined _ALLEGRO_GL_ARB_window_pos +#define glWindowPos2dARB _al_glWindowPos2dARB +#define glWindowPos2dvARB _al_glWindowPos2dvARB +#define glWindowPos2fARB _al_glWindowPos2fARB +#define glWindowPos2fvARB _al_glWindowPos2fvARB +#define glWindowPos2iARB _al_glWindowPos2iARB +#define glWindowPos2ivARB _al_glWindowPos2ivARB +#define glWindowPos2sARB _al_glWindowPos2sARB +#define glWindowPos2svARB _al_glWindowPos2svARB +#define glWindowPos3dARB _al_glWindowPos3dARB +#define glWindowPos3dvARB _al_glWindowPos3dvARB +#define glWindowPos3fARB _al_glWindowPos3fARB +#define glWindowPos3fvARB _al_glWindowPos3fvARB +#define glWindowPos3iARB _al_glWindowPos3iARB +#define glWindowPos3ivARB _al_glWindowPos3ivARB +#define glWindowPos3sARB _al_glWindowPos3sARB +#define glWindowPos3svARB _al_glWindowPos3svARB +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_program +#define glVertexAttrib1dARB _al_glVertexAttrib1dARB +#define glVertexAttrib1dvARB _al_glVertexAttrib1dvARB +#define glVertexAttrib1fARB _al_glVertexAttrib1fARB +#define glVertexAttrib1fvARB _al_glVertexAttrib1fvARB +#define glVertexAttrib1sARB _al_glVertexAttrib1sARB +#define glVertexAttrib1svARB _al_glVertexAttrib1svARB +#define glVertexAttrib2dARB _al_glVertexAttrib2dARB +#define glVertexAttrib2dvARB _al_glVertexAttrib2dvARB +#define glVertexAttrib2fARB _al_glVertexAttrib2fARB +#define glVertexAttrib2fvARB _al_glVertexAttrib2fvARB +#define glVertexAttrib2sARB _al_glVertexAttrib2sARB +#define glVertexAttrib2svARB _al_glVertexAttrib2svARB +#define glVertexAttrib3dARB _al_glVertexAttrib3dARB +#define glVertexAttrib3dvARB _al_glVertexAttrib3dvARB +#define glVertexAttrib3fARB _al_glVertexAttrib3fARB +#define glVertexAttrib3fvARB _al_glVertexAttrib3fvARB +#define glVertexAttrib3sARB _al_glVertexAttrib3sARB +#define glVertexAttrib3svARB _al_glVertexAttrib3svARB +#define glVertexAttrib4NbvARB _al_glVertexAttrib4NbvARB +#define glVertexAttrib4NivARB _al_glVertexAttrib4NivARB +#define glVertexAttrib4NsvARB _al_glVertexAttrib4NsvARB +#define glVertexAttrib4NubARB _al_glVertexAttrib4NubARB +#define glVertexAttrib4NubvARB _al_glVertexAttrib4NubvARB +#define glVertexAttrib4NuivARB _al_glVertexAttrib4NuivARB +#define glVertexAttrib4NusvARB _al_glVertexAttrib4NusvARB +#define glVertexAttrib4bvARB _al_glVertexAttrib4bvARB +#define glVertexAttrib4dARB _al_glVertexAttrib4dARB +#define glVertexAttrib4dvARB _al_glVertexAttrib4dvARB +#define glVertexAttrib4fARB _al_glVertexAttrib4fARB +#define glVertexAttrib4fvARB _al_glVertexAttrib4fvARB +#define glVertexAttrib4ivARB _al_glVertexAttrib4ivARB +#define glVertexAttrib4sARB _al_glVertexAttrib4sARB +#define glVertexAttrib4svARB _al_glVertexAttrib4svARB +#define glVertexAttrib4ubvARB _al_glVertexAttrib4ubvARB +#define glVertexAttrib4uivARB _al_glVertexAttrib4uivARB +#define glVertexAttrib4usvARB _al_glVertexAttrib4usvARB +#define glVertexAttribPointerARB _al_glVertexAttribPointerARB +#define glEnableVertexAttribArrayARB _al_glEnableVertexAttribArrayARB +#define glDisableVertexAttribArrayARB _al_glDisableVertexAttribArrayARB +#define glProgramStringARB _al_glProgramStringARB +#define glBindProgramARB _al_glBindProgramARB +#define glDeleteProgramsARB _al_glDeleteProgramsARB +#define glGenProgramsARB _al_glGenProgramsARB +#define glProgramEnvParameter4dARB _al_glProgramEnvParameter4dARB +#define glProgramEnvParameter4dvARB _al_glProgramEnvParameter4dvARB +#define glProgramEnvParameter4fARB _al_glProgramEnvParameter4fARB +#define glProgramEnvParameter4fvARB _al_glProgramEnvParameter4fvARB +#define glProgramLocalParameter4dARB _al_glProgramLocalParameter4dARB +#define glProgramLocalParameter4dvARB _al_glProgramLocalParameter4dvARB +#define glProgramLocalParameter4fARB _al_glProgramLocalParameter4fARB +#define glProgramLocalParameter4fvARB _al_glProgramLocalParameter4fvARB +#define glGetProgramEnvParameterdvARB _al_glGetProgramEnvParameterdvARB +#define glGetProgramEnvParameterfvARB _al_glGetProgramEnvParameterfvARB +#define glGetProgramLocalParameterdvARB _al_glGetProgramLocalParameterdvARB +#define glGetProgramLocalParameterfvARB _al_glGetProgramLocalParameterfvARB +#define glGetProgramivARB _al_glGetProgramivARB +#define glGetProgramStringARB _al_glGetProgramStringARB +#define glGetVertexAttribdvARB _al_glGetVertexAttribdvARB +#define glGetVertexAttribfvARB _al_glGetVertexAttribfvARB +#define glGetVertexAttribivARB _al_glGetVertexAttribivARB +#define glGetVertexAttribPointervARB _al_glGetVertexAttribPointervARB +#define glIsProgramARB _al_glIsProgramARB +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_buffer_object +#define glBindBufferARB _al_glBindBufferARB +#define glDeleteBuffersARB _al_glDeleteBuffersARB +#define glGenBuffersARB _al_glGenBuffersARB +#define glIsBufferARB _al_glIsBufferARB +#define glBufferDataARB _al_glBufferDataARB +#define glBufferSubDataARB _al_glBufferSubDataARB +#define glGetBufferSubDataARB _al_glGetBufferSubDataARB +#define glMapBufferARB _al_glMapBufferARB +#define glUnmapBufferARB _al_glUnmapBufferARB +#define glGetBufferParameterivARB _al_glGetBufferParameterivARB +#define glGetBufferPointervARB _al_glGetBufferPointervARB +#endif + +#if defined _ALLEGRO_GL_ARB_occlusion_query +#define glGenQueriesARB _al_glGenQueriesARB +#define glDeleteQueriesARB _al_glDeleteQueriesARB +#define glIsQueryARB _al_glIsQueryARB +#define glBeginQueryARB _al_glBeginQueryARB +#define glEndQueryARB _al_glEndQueryARB +#define glGetQueryivARB _al_glGetQueryivARB +#define glGetQueryObjectivARB _al_glGetQueryObjectivARB +#define glGetQueryObjectuivARB _al_glGetQueryObjectuivARB +#endif + +#if defined _ALLEGRO_GL_ARB_shader_objects +#define glDeleteObjectARB _al_glDeleteObjectARB +#define glGetHandleARB _al_glGetHandleARB +#define glDetachObjectARB _al_glDetachObjectARB +#define glCreateShaderObjectARB _al_glCreateShaderObjectARB +#define glShaderSourceARB _al_glShaderSourceARB +#define glCompileShaderARB _al_glCompileShaderARB +#define glCreateProgramObjectARB _al_glCreateProgramObjectARB +#define glAttachObjectARB _al_glAttachObjectARB +#define glLinkProgramARB _al_glLinkProgramARB +#define glUseProgramObjectARB _al_glUseProgramObjectARB +#define glValidateProgramARB _al_glValidateProgramARB +#define glUniform1fARB _al_glUniform1fARB +#define glUniform2fARB _al_glUniform2fARB +#define glUniform3fARB _al_glUniform3fARB +#define glUniform4fARB _al_glUniform4fARB +#define glUniform1iARB _al_glUniform1iARB +#define glUniform2iARB _al_glUniform2iARB +#define glUniform3iARB _al_glUniform3iARB +#define glUniform4iARB _al_glUniform4iARB +#define glUniform1fvARB _al_glUniform1fvARB +#define glUniform2fvARB _al_glUniform2fvARB +#define glUniform3fvARB _al_glUniform3fvARB +#define glUniform4fvARB _al_glUniform4fvARB +#define glUniform1ivARB _al_glUniform1ivARB +#define glUniform2ivARB _al_glUniform2ivARB +#define glUniform3ivARB _al_glUniform3ivARB +#define glUniform4ivARB _al_glUniform4ivARB +#define glUniformMatrix2fvARB _al_glUniformMatrix2fvARB +#define glUniformMatrix3fvARB _al_glUniformMatrix3fvARB +#define glUniformMatrix4fvARB _al_glUniformMatrix4fvARB +#define glGetObjectParameterfvARB _al_glGetObjectParameterfvARB +#define glGetObjectParameterivARB _al_glGetObjectParameterivARB +#define glGetInfoLogARB _al_glGetInfoLogARB +#define glGetAttachedObjectsARB _al_glGetAttachedObjectsARB +#define glGetUniformLocationARB _al_glGetUniformLocationARB +#define glGetActiveUniformARB _al_glGetActiveUniformARB +#define glGetUniformfvARB _al_glGetUniformfvARB +#define glGetUniformivARB _al_glGetUniformivARB +#define glGetShaderSourceARB _al_glGetShaderSourceARB +#endif + +#ifdef _ALLEGRO_GL_ARB_vertex_shader +#ifndef GL_ARB_vertex_program +#define glVertexAttrib1fARB _al_glVertexAttrib1fARB +#define glVertexAttrib1sARB _al_glVertexAttrib1sARB +#define glVertexAttrib1dARB _al_glVertexAttrib1dARB +#define glVertexAttrib2fARB _al_glVertexAttrib2fARB +#define glVertexAttrib2sARB _al_glVertexAttrib2sARB +#define glVertexAttrib2dARB _al_glVertexAttrib2dARB +#define glVertexAttrib3fARB _al_glVertexAttrib3fARB +#define glVertexAttrib3sARB _al_glVertexAttrib3sARB +#define glVertexAttrib3dARB _al_glVertexAttrib3dARB +#define glVertexAttrib4fARB _al_glVertexAttrib4fARB +#define glVertexAttrib4sARB _al_glVertexAttrib4sARB +#define glVertexAttrib4dARB _al_glVertexAttrib4dARB +#define glVertexAttrib4NubARB _al_glVertexAttrib4NubARB +#define glVertexAttrib1fvARB _al_glVertexAttrib1fvARB +#define glVertexAttrib1svARB _al_glVertexAttrib1svARB +#define glVertexAttrib1dvARB _al_glVertexAttrib1dvARB +#define glVertexAttrib2fvARB _al_glVertexAttrib2fvARB +#define glVertexAttrib2svARB _al_glVertexAttrib2svARB +#define glVertexAttrib2dvARB _al_glVertexAttrib2dvARB +#define glVertexAttrib3fvARB _al_glVertexAttrib3fvARB +#define glVertexAttrib3svARB _al_glVertexAttrib3svARB +#define glVertexAttrib3dvARB _al_glVertexAttrib3dvARB +#define glVertexAttrib4fvARB _al_glVertexAttrib4fvARB +#define glVertexAttrib4svARB _al_glVertexAttrib4svARB +#define glVertexAttrib4dvARB _al_glVertexAttrib4dvARB +#define glVertexAttrib4ivARB _al_glVertexAttrib4ivARB +#define glVertexAttrib4bvARB _al_glVertexAttrib4bvARB +#define glVertexAttrib4ubvARB _al_glVertexAttrib4ubvARB +#define glVertexAttrib4usvARB _al_glVertexAttrib4usvARB +#define glVertexAttrib4uivARB _al_glVertexAttrib4uivARB +#define glVertexAttrib4NbvARB _al_glVertexAttrib4NbvARB +#define glVertexAttrib4NsvARB _al_glVertexAttrib4NsvARB +#define glVertexAttrib4NivARB _al_glVertexAttrib4NivARB +#define glVertexAttrib4NubvARB _al_glVertexAttrib4NubvARB +#define glVertexAttrib4NusvARB _al_glVertexAttrib4NusvARB +#define glVertexAttrib4NuivARB _al_glVertexAttrib4NuivARB +#define glVertexAttribPointerARB _al_glVertexAttribPointerARB +#define glEnableVertexAttribArrayARB _al_glEnableVertexAttribArrayARB +#define glDisableVertexAttribArrayARB _al_glDisableVertexAttribArrayARB +#endif +#define glBindAttribLocationARB _al_glBindAttribLocationARB +#define glGetActiveAttribARB _al_glGetActiveAttribARB +#define glGetAttribLocationARB _al_glGetAttribLocationARB +#ifndef GL_ARB_vertex_program +#define glGetVertexAttribdvARB _al_glGetVertexAttribdvARB +#define glGetVertexAttribfvARB _al_glGetVertexAttribfvARB +#define glGetVertexAttribivARB _al_glGetVertexAttribivARB +#define glGetVertexAttribPointervARB _al_glGetVertexAttribPointervARB +#endif +#endif + +#if defined _ALLEGRO_GL_ARB_draw_buffers +#define glDrawBuffersARB _al_glDrawBuffersARB +#endif + +#if defined _ALLEGRO_GL_ARB_color_buffer_float +#define glClampColorARB _al_glClampColorARB +#endif + +#if defined _ALLEGRO_GL_ARB_draw_instanced +#define glDrawArraysInstancedARB _al_glDrawArraysInstancedARB +#define glDrawElementsInstancedARB _al_glDrawElementsInstancedARB +#endif + +#if defined _ALLEGRO_GL_ARB_framebuffer_object +#define glIsRenderbuffer _al_glIsRenderbuffer +#define glBindRenderbuffer _al_glBindRenderbuffer +#define glDeleteRenderbuffers _al_glDeleteRenderbuffers +#define glGenRenderbuffers _al_glGenRenderbuffers +#define glRenderbufferStorage _al_glRenderbufferStorage +#define glGetRenderbufferParameteriv _al_glGetRenderbufferParameteriv +#define glIsFramebuffer _al_glIsFramebuffer +#define glBindFramebuffer _al_glBindFramebuffer +#define glDeleteFramebuffers _al_glDeleteFramebuffers +#define glGenFramebuffers _al_glGenFramebuffers +#define glCheckFramebufferStatus _al_glCheckFramebufferStatus +#define glFramebufferTexture1D _al_glFramebufferTexture1D +#define glFramebufferTexture2D _al_glFramebufferTexture2D +#define glFramebufferTexture3D _al_glFramebufferTexture3D +#define glFramebufferRenderbuffer _al_glFramebufferRenderbuffer +#define glGetFramebufferAttachmentParameteriv _al_glGetFramebufferAttachmentParameteriv +#define glGenerateMipmap _al_glGenerateMipmap +#define glBlitFramebuffer _al_glBlitFramebuffer +#define glRenderbufferStorageMultisample _al_glRenderbufferStorageMultisample +#define glFramebufferTextureLayer _al_glFramebufferTextureLayer +#endif + +#if defined _ALLEGRO_GL_ARB_geometry_shader4 +#define glProgramParameteriARB _al_glProgramParameteriARB +#define glFramebufferTextureARB _al_glFramebufferTextureARB +#define glFramebufferTextureLayerARB _al_glFramebufferTextureLayerARB +#define glFramebufferTextureFaceARB _al_glFramebufferTextureFaceARB +#endif + +#if defined _ALLEGRO_GL_ARB_instanced_arrays +#define glVertexAttribDivisor _al_glVertexAttribDivisor +#endif + +#if defined _ALLEGRO_GL_ARB_map_buffer_range +#define glMapBufferRange _al_glMapBufferRange +#define glFlushMappedBufferRange _al_glFlushMappedBufferRange +#endif + +#if defined _ALLEGRO_GL_ARB_texture_buffer_object +#define glTexBufferARB _al_glTexBufferARB +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_array_object +#define glBindVertexArray _al_glBindVertexArray +#define glDeleteVertexArrays _al_glDeleteVertexArrays +#define glGenVertexArrays _al_glGenVertexArrays +#define glIsVertexArray _al_glIsVertexArray +#endif + +#if defined _ALLEGRO_GL_ARB_uniform_buffer_object +#define glGetUniformIndices _al_glGetUniformIndices +#define glGetActiveUniformsiv _al_glGetActiveUniformsiv +#define glGetActiveUniformName _al_glGetActiveUniformName +#define glGetUniformBlockIndex _al_glGetUniformBlockIndex +#define glGetActiveUniformBlockiv _al_glGetActiveUniformBlockiv +#define glGetActiveUniformBlockName _al_glGetActiveUniformBlockName +#define glUniformBlockBinding _al_glUniformBlockBinding +#endif + +#if defined _ALLEGRO_GL_ARB_copy_buffer +#define glCopyBufferSubData _al_glCopyBufferSubData +#endif + + +#if defined _ALLEGRO_GL_ARB_draw_elements_base_vertex +#define glDrawElementsBaseVertex _al_glDrawElementsBaseVertex +#define glDrawRangeElementsBaseVertex _al_glDrawRangeElementsBaseVertex +#define glDrawElementsInstancedBaseVertex _al_glDrawElementsInstancedBaseVertex +#define glMultiDrawElementsBaseVertex _al_glMultiDrawElementsBaseVertex +#endif + +#if defined _ALLEGRO_GL_ARB_provoking_vertex +#define glProvokingVertex _al_glProvokingVertex +#endif + +#if defined _ALLEGRO_GL_ARB_sync +#define glFenceSync _al_glFenceSync +#define glIsSync _al_glIsSync +#define glDeleteSync _al_glDeleteSync +#define glClientWaitSync _al_glClientWaitSync +#define glWaitSync _al_glWaitSync +#define glGetInteger64v _al_glGetInteger64v +#define glGetSynciv _al_glGetSynciv +#endif + +#if defined _ALLEGRO_GL_ARB_texture_multisample +#define glTexImage2DMultisample _al_glTexImage2DMultisample +#define glTexImage3DMultisample _al_glTexImage3DMultisample +#define glGetMultisamplefv _al_glGetMultisamplefv +#define glSampleMaski _al_glSampleMaski +#endif + +#if defined _ALLEGRO_GL_ARB_draw_buffers_blend +#define glBlendEquationi _al_glBlendEquationi +#define glBlendEquationSeparatei _al_glBlendEquationSeparatei +#define glBlendFunci _al_glBlendFunci +#define glBlendFuncSeparatei _al_glBlendFuncSeparatei +#endif + +#if defined _ALLEGRO_GL_ARB_sample_shading +#define glMinSampleShading _al_glMinSampleShading +#endif + +#if defined _ALLEGRO_GL_ARB_shading_language_include +#define glNamedStringARB _al_glNamedStringARB +#define glDeleteNamedStringARB _al_glDeleteNamedStringARB +#define glCompileShaderIncludeARB _al_glCompileShaderIncludeARB +#define glIsNamedStringARB _al_glIsNamedStringARB +#define glGetNamedStringARB _al_glGetNamedStringARB +#define glGetNamedStringivARB _al_glGetNamedStringivARB +#endif + +#if defined _ALLEGRO_GL_ARB_blend_func_extended +#define glBindFragDataLocationIndexed _al_glBindFragDataLocationIndexed +#define glGetFragDataIndex _al_glGetFragDataIndex +#endif + +#if defined _ALLEGRO_GL_ARB_sampler_objects +#define glGenSamplers _al_glGenSamplers +#define glDeleteSamplers _al_glDeleteSamplers +#define glIsSampler _al_glIsSampler +#define glBindSampler _al_glBindSampler +#define glSamplerParameteri _al_glSamplerParameteri +#define glSamplerParameteriv _al_glSamplerParameteriv +#define glSamplerParameterf _al_glSamplerParameterf +#define glSamplerParameterfv _al_glSamplerParameterfv +#define glSamplerParameterIiv _al_glSamplerParameterIiv +#define glSamplerParameterIuiv _al_glSamplerParameterIuiv +#define glGetSamplerParameteriv _al_glGetSamplerParameteriv +#define glGetSamplerParameterIiv _al_glGetSamplerParameterIiv +#define glGetSamplerParameterfv _al_glGetSamplerParameterfv +#define glGetSamplerParameterIfv _al_glGetSamplerParameterIfv +#endif + +#if defined _ALLEGRO_GL_ARB_timer_query +#define glQueryCounter _al_glQueryCounter +#define glGetQueryObjecti64v _al_glGetQueryObjecti64v +#define glGetQueryObjectui64v _al_glGetQueryObjectui64v +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_type_2_10_10_10_rev +#define glVertexP2ui _al_glVertexP2ui +#define glVertexP2uiv _al_glVertexP2uiv +#define glVertexP3ui _al_glVertexP3ui +#define glVertexP3uiv _al_glVertexP3uiv +#define glVertexP4ui _al_glVertexP4ui +#define glVertexP4uiv _al_glVertexP4uiv +#define glTexCoordP1ui _al_glTexCoordP1ui +#define glTexCoordP1uiv _al_glTexCoordP1uiv +#define glTexCoordP2ui _al_glTexCoordP2ui +#define glTexCoordP2uiv _al_glTexCoordP2uiv +#define glTexCoordP3ui _al_glTexCoordP3ui +#define glTexCoordP3uiv _al_glTexCoordP3uiv +#define glTexCoordP4ui _al_glTexCoordP4ui +#define glTexCoordP4uiv _al_glTexCoordP4uiv +#define glMultiTexCoordP1ui _al_glMultiTexCoordP1ui +#define glMultiTexCoordP1uiv _al_glMultiTexCoordP1uiv +#define glMultiTexCoordP2ui _al_glMultiTexCoordP2ui +#define glMultiTexCoordP2uiv _al_glMultiTexCoordP2uiv +#define glMultiTexCoordP3ui _al_glMultiTexCoordP3ui +#define glMultiTexCoordP3uiv _al_glMultiTexCoordP3uiv +#define glMultiTexCoordP4ui _al_glMultiTexCoordP4ui +#define glMultiTexCoordP4uiv _al_glMultiTexCoordP4uiv +#define glNormalP3ui _al_glNormalP3ui +#define glNormalP3uiv _al_glNormalP3uiv +#define glColorP3ui _al_glColorP3ui +#define glColorP3uiv _al_glColorP3uiv +#define glColorP4ui _al_glColorP4ui +#define glColorP4uiv _al_glColorP4uiv +#define glSecondaryColorP3ui _al_glSecondaryColorP3ui +#define glSecondaryColorP3uiv _al_glSecondaryColorP3uiv +#define glVertexAttribP1ui _al_glVertexAttribP1ui +#define glVertexAttribP1uiv _al_glVertexAttribP1uiv +#define glVertexAttribP2ui _al_glVertexAttribP2ui +#define glVertexAttribP2uiv _al_glVertexAttribP2uiv +#define glVertexAttribP3ui _al_glVertexAttribP3ui +#define glVertexAttribP3uiv _al_glVertexAttribP3uiv +#define glVertexAttribP4ui _al_glVertexAttribP4ui +#define glVertexAttribP4uiv _al_glVertexAttribP4uiv +#endif + +#if defined _ALLEGRO_GL_ARB_draw_indirect +#define glDrawArraysIndirect _al_glDrawArraysIndirect +#define glDrawElementsIndirect _al_glDrawElementsIndirect +#endif + +#if defined _ALLEGRO_GL_ARB_gpu_shader_fp64 +#define glUniform1d _al_glUniform1d +#define glUniform2d _al_glUniform2d +#define glUniform3d _al_glUniform3d +#define glUniform4d _al_glUniform4d +#define glUniform1dv _al_glUniform1dv +#define glUniform2dv _al_glUniform2dv +#define glUniform3dv _al_glUniform3dv +#define glUniform4dv _al_glUniform4dv +#define glUniformMatrix2dv _al_glUniformMatrix2dv +#define glUniformMatrix3dv _al_glUniformMatrix3dv +#define glUniformMatrix4dv _al_glUniformMatrix4dv +#define glUniformMatrix2x3dv _al_glUniformMatrix2x3dv +#define glUniformMatrix2x4dv _al_glUniformMatrix2x4dv +#define glUniformMatrix3x2dv _al_glUniformMatrix3x2dv +#define glUniformMatrix3x4dv _al_glUniformMatrix3x4dv +#define glUniformMatrix4x2dv _al_glUniformMatrix4x2dv +#define glUniformMatrix4x3dv _al_glUniformMatrix4x3dv +#define glGetUniformdv _al_glGetUniformdv +#define glProgramUniform1dEXT _al_glProgramUniform1dEXT +#define glProgramUniform2dEXT _al_glProgramUniform2dEXT +#define glProgramUniform3dEXT _al_glProgramUniform3dEXT +#define glProgramUniform4dEXT _al_glProgramUniform4dEXT +#define glProgramUniform1dvEXT _al_glProgramUniform1dvEXT +#define glProgramUniform2dvEXT _al_glProgramUniform2dvEXT +#define glProgramUniform3dvEXT _al_glProgramUniform3dvEXT +#define glProgramUniform4dvEXT _al_glProgramUniform4dvEXT +#define glProgramUniformMatrix2dvEXT _al_glProgramUniformMatrix2dvEXT +#define glProgramUniformMatrix3dvEXT _al_glProgramUniformMatrix3dvEXT +#define glProgramUniformMatrix4dvEXT _al_glProgramUniformMatrix4dvEXT +#define glProgramUniformMatrix2x3dvEXT _al_glProgramUniformMatrix2x3dvEXT +#define glProgramUniformMatrix2x4dvEXT _al_glProgramUniformMatrix2x4dvEXT +#define glProgramUniformMatrix3x2dvEXT _al_glProgramUniformMatrix3x2dvEXT +#define glProgramUniformMatrix3x4dvEXT _al_glProgramUniformMatrix3x4dvEXT +#define glProgramUniformMatrix4x2dvEXT _al_glProgramUniformMatrix4x2dvEXT +#define glProgramUniformMatrix4x3dvEXT _al_glProgramUniformMatrix4x3dvEXT +#endif + +#if defined _ALLEGRO_GL_ARB_shader_subroutine +#define glGetSubroutineUniformLocation _al_glGetSubroutineUniformLocation +#define glGetSubroutineIndex _al_glGetSubroutineIndex +#define glGetActiveSubroutineUniformiv _al_glGetActiveSubroutineUniformiv +#define glGetActiveSubroutineUniformName _al_glGetActiveSubroutineUniformName +#define glGetActiveSubroutineName _al_glGetActiveSubroutineName +#define glUniformSubroutinesuiv _al_glUniformSubroutinesuiv +#define glGetUniformSubroutineuiv _al_glGetUniformSubroutineuiv +#define glGetProgramStageiv _al_glGetProgramStageiv +#endif + +#if defined _ALLEGRO_GL_ARB_tessellation_shader +#define glPatchParameteri _al_glPatchParameteri +#define glPatchParameterfv _al_glPatchParameterfv +#endif + +#if defined _ALLEGRO_GL_ARB_transform_feedback2 +#define glBindTransformFeedback _al_glBindTransformFeedback +#define glDeleteTransformFeedbacks _al_glDeleteTransformFeedbacks +#define glGenTransformFeedbacks _al_glGenTransformFeedbacks +#define glIsTransformFeedback _al_glIsTransformFeedback +#define glPauseTransformFeedback _al_glPauseTransformFeedback +#define glResumeTransformFeedback _al_glResumeTransformFeedback +#define glDrawTransformFeedback _al_glDrawTransformFeedback +#endif + +#if defined _ALLEGRO_GL_ARB_transform_feedback3 +#define glDrawTransformFeedbackStream _al_glDrawTransformFeedbackStream +#define glBeginQueryIndexed _al_glBeginQueryIndexed +#define glEndQueryIndexed _al_glEndQueryIndexed +#define glGetQueryIndexediv _al_glGetQueryIndexediv +#endif + + +/**/ + + +#if defined _ALLEGRO_GL_EXT_blend_color +#define glBlendColorEXT _al_glBlendColorEXT +#endif + +#if defined _ALLEGRO_GL_EXT_polygon_offset +#define glPolygonOffsetEXT _al_glPolygonOffsetEXT +#endif + +#if defined _ALLEGRO_GL_EXT_texture3D +#define glTexImage3DEXT _al_glTexImage3DEXT +#define glTexSubImage3DEXT _al_glTexSubImage3DEXT +#endif + +#if defined _ALLEGRO_GL_SGIS_texture_filter4 +#define glGetTexFilterFuncSGIS _al_glGetTexFilterFuncSGIS +#define glTexFilterFuncSGIS _al_glTexFilterFuncSGIS +#endif + +#if defined _ALLEGRO_GL_EXT_subtexture +#define glTexSubImage1DEXT _al_glTexSubImage1DEXT +#define glTexSubImage2DEXT _al_glTexSubImage2DEXT +#endif + +#if defined _ALLEGRO_GL_EXT_copy_texture +#define glCopyTexImage1DEXT _al_glCopyTexImage1DEXT +#define glCopyTexImage2DEXT _al_glCopyTexImage2DEXT +#define glCopyTexSubImage1DEXT _al_glCopyTexSubImage1DEXT +#define glCopyTexSubImage2DEXT _al_glCopyTexSubImage2DEXT +#define glCopyTexSubImage3DEXT _al_glCopyTexSubImage3DEXT +#endif + +#if defined _ALLEGRO_GL_EXT_histogram +#define glGetHistogramEXT _al_glGetHistogramEXT +#define glGetHistogramParameterfvEXT _al_glGetHistogramParameterfvEXT +#define glGetHistogramParameterivEXT _al_glGetHistogramParameterivEXT +#define glGetMinmaxEXT _al_glGetMinmaxEXT +#define glGetMinmaxParameterfvEXT _al_glGetMinmaxParameterfvEXT +#define glGetMinmaxParameterivEXT _al_glGetMinmaxParameterivEXT +#define glHistogramEXT _al_glHistogramEXT +#define glMinmaxEXT _al_glMinmaxEXT +#define glResetHistogramEXT _al_glResetHistogramEXT +#define glResetMinmaxEXT _al_glResetMinmaxEXT +#endif + +#if defined _ALLEGRO_GL_EXT_convolution +#define glConvolutionFilter1DEXT _al_glConvolutionFilter1DEXT +#define glConvolutionFilter2DEXT _al_glConvolutionFilter2DEXT +#define glConvolutionParameterfEXT _al_glConvolutionParameterfEXT +#define glConvolutionParameterfvEXT _al_glConvolutionParameterfvEXT +#define glConvolutionParameteriEXT _al_glConvolutionParameteriEXT +#define glConvolutionParameterivEXT _al_glConvolutionParameterivEXT +#define glCopyConvolutionFilter1DEXT _al_glCopyConvolutionFilter1DEXT +#define glCopyConvolutionFilter2DEXT _al_glCopyConvolutionFilter2DEXT +#define glGetConvolutionFilterEXT _al_glGetConvolutionFilterEXT +#define glGetConvolutionParameterfvEXT _al_glGetConvolutionParameterfvEXT +#define glGetConvolutionParameterivEXT _al_glGetConvolutionParameterivEXT +#define glGetSeparableFilterEXT _al_glGetSeparableFilterEXT +#define glSeparableFilter2DEXT _al_glSeparableFilter2DEXT +#endif + +#if defined _ALLEGRO_GL_SGI_color_table +#define glColorTableSGI _al_glColorTableSGI +#define glColorTableParameterfvSGI _al_glColorTableParameterfvSGI +#define glColorTableParameterivSGI _al_glColorTableParameterivSGI +#define glCopyColorTableSGI _al_glCopyColorTableSGI +#define glGetColorTableSGI _al_glGetColorTableSGI +#define glGetColorTableParameterfvSGI _al_glGetColorTableParameterfvSGI +#define glGetColorTableParameterivSGI _al_glGetColorTableParameterivSGI +#endif + +#if defined _ALLEGRO_GL_SGIX_pixel_texture +#define glPixelTexGenSGIX _al_glPixelTexGenSGIX +#endif + +#if defined _ALLEGRO_GL_SGIS_pixel_texture +#define glPixelTexGenParameteriSGIS _al_glPixelTexGenParameteriSGIS +#define glPixelTexGenParameterivSGIS _al_glPixelTexGenParameterivSGIS +#define glPixelTexGenParameterfSGIS _al_glPixelTexGenParameterfSGIS +#define glPixelTexGenParameterfvSGIS _al_glPixelTexGenParameterfvSGIS +#define glGetPixelTexGenParameterivSGIS _al_glGetPixelTexGenParameterivSGIS +#define glGetPixelTexGenParameterfvSGIS _al_glGetPixelTexGenParameterfvSGIS +#endif + +#if defined _ALLEGRO_GL_SGIS_texture4D +#define glTexImage4DSGIS _al_glTexImage4DSGIS +#define glTexSubImage4DSGIS _al_glTexSubImage4DSGIS +#endif + +#if defined _ALLEGRO_GL_EXT_texture_object +#define glAreTexturesResidentEXT _al_glAreTexturesResidentEXT +#define glBindTextureEXT _al_glBindTextureEXT +#define glDeleteTexturesEXT _al_glDeleteTexturesEXT +#define glGenTexturesEXT _al_glGenTexturesEXT +#define glIsTextureEXT _al_glIsTextureEXT +#define glPrioritizeTexturesEXT _al_glPrioritizeTexturesEXT +#endif + +#if defined _ALLEGRO_GL_SGIS_detail_texture +#define glDetailTexFuncSGIS _al_glDetailTexFuncSGIS +#define glGetDetailTexFuncSGIS _al_glGetDetailTexFuncSGIS +#endif + +#if defined _ALLEGRO_GL_SGIS_sharpen_texture +#define glSharpenTexFuncSGIS _al_glSharpenTexFuncSGIS +#define glGetSharpenTexFuncSGIS _al_glGetSharpenTexFuncSGIS +#endif + +#if defined _ALLEGRO_GL_SGIS_multisample +#define glSampleMaskSGIS _al_glSampleMaskSGIS +#define glSamplePatternSGIS _al_glSamplePatternSGIS +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_array +#define glArrayElementEXT _al_glArrayElementEXT +#define glColorPointerEXT _al_glColorPointerEXT +#define glDrawArraysEXT _al_glDrawArraysEXT +#define glEdgeFlagPointerEXT _al_glEdgeFlagPointerEXT +#define glGetPointervEXT _al_glGetPointervEXT +#define glIndexPointerEXT _al_glIndexPointerEXT +#define glNormalPointerEXT _al_glNormalPointerEXT +#define glTexCoordPointerEXT _al_glTexCoordPointerEXT +#define glVertexPointerEXT _al_glVertexPointerEXT +#endif + +#if defined _ALLEGRO_GL_EXT_blend_minmax +#define glBlendEquationEXT _al_glBlendEquationEXT +#endif + +#if defined _ALLEGRO_GL_SGIX_sprite +#define glSpriteParameterfSGIX _al_glSpriteParameterfSGIX +#define glSpriteParameterfvSGIX _al_glSpriteParameterfvSGIX +#define glSpriteParameteriSGIX _al_glSpriteParameteriSGIX +#define glSpriteParameterivSGIX _al_glSpriteParameterivSGIX +#endif + +#if defined _ALLEGRO_GL_EXT_point_parameters +#define glPointParameterfEXT _al_glPointParameterfEXT +#define glPointParameterfvEXT _al_glPointParameterfvEXT +#endif + +#if defined _ALLEGRO_GL_SGIS_point_parameters +#define glPointParameterfSGIS _al_glPointParameterfSGIS +#define glPointParameterfvSGIS _al_glPointParameterfvSGIS +#endif + +#if defined _ALLEGRO_GL_SGIX_instruments +#define glGetInstrumentsSGIX _al_glGetInstrumentsSGIX +#define glInstrumentsBufferSGIX _al_glInstrumentsBufferSGIX +#define glPollInstrumentsSGIX _al_glPollInstrumentsSGIX +#define glReadInstrumentsSGIX _al_glReadInstrumentsSGIX +#define glStartInstrumentsSGIX _al_glStartInstrumentsSGIX +#define glStopInstrumentsSGIX _al_glStopInstrumentsSGIX +#endif + +#if defined _ALLEGRO_GL_SGIX_framezoom +#define glFrameZoomSGIX _al_glFrameZoomSGIX +#endif + +#if defined _ALLEGRO_GL_SGIX_tag_sample_buffer +#define glTagSampleBufferSGIX _al_glTagSampleBufferSGIX +#endif + +#if defined _ALLEGRO_GL_SGIX_polynomial_ffd +#define glDeformationMap3dSGIX _al_glDeformationMap3dSGIX +#define glDeformationMap3fSGIX _al_glDeformationMap3fSGIX +#define glDeformSGIX _al_glDeformSGIX +#define glLoadIdentityDeformationMapSGIX _al_glLoadIdentityDeformationMapSGIX +#endif + +#if defined _ALLEGRO_GL_SGIX_reference_plane +#define glReferencePlaneSGIX _al_glReferencePlaneSGIX +#endif + +#if defined _ALLEGRO_GL_SGIX_flush_raster +#define glFlushRasterSGIX _al_glFlushRasterSGIX +#endif + +#if defined _ALLEGRO_GL_SGIS_fog_function +#define glFogFuncSGIS _al_glFogFuncSGIS +#define glGetFogFuncSGIS _al_glGetFogFuncSGIS +#endif + +#if defined _ALLEGRO_GL_HP_image_transform +#define glImageTransformParameteriHP _al_glImageTransformParameteriHP +#define glImageTransformParameterfHP _al_glImageTransformParameterfHP +#define glImageTransformParameterivHP _al_glImageTransformParameterivHP +#define glImageTransformParameterfvHP _al_glImageTransformParameterfvHP +#define glGetImageTransformParameterivHP _al_glGetImageTransformParameterivHP +#define glGetImageTransformParameterfvHP _al_glGetImageTransformParameterfvHP +#endif + +#if defined _ALLEGRO_GL_EXT_color_subtable +#ifndef GL_EXT_paletted_texture +#define glColorSubTableEXT _al_glColorSubTableEXT +#endif +#define glCopyColorSubTableEXT _al_glCopyColorSubTableEXT +#endif + +#if defined _ALLEGRO_GL_PGI_misc_hints +#define glHintPGI _al_glHintPGI +#endif + +#if defined _ALLEGRO_GL_EXT_paletted_texture +#define glColorTableEXT _al_glColorTableEXT +#define glGetColorTableEXT _al_glGetColorTableEXT +#define glGetColorTableParameterivEXT _al_glGetColorTableParameterivEXT +#define glGetColorTableParameterfvEXT _al_glGetColorTableParameterfvEXT +#endif + +#if defined _ALLEGRO_GL_SGIX_list_priority +#define glGetListParameterfvSGIX _al_glGetListParameterfvSGIX +#define glGetListParameterivSGIX _al_glGetListParameterivSGIX +#define glListParameterfSGIX _al_glListParameterfSGIX +#define glListParameterfvSGIX _al_glListParameterfvSGIX +#define glListParameteriSGIX _al_glListParameteriSGIX +#define glListParameterivSGIX _al_glListParameterivSGIX +#endif + +#if defined _ALLEGRO_GL_EXT_index_material +#define glIndexMaterialEXT _al_glIndexMaterialEXT +#endif + +#if defined _ALLEGRO_GL_EXT_index_func +#define glIndexFuncEXT _al_glIndexFuncEXT +#endif + +#if defined _ALLEGRO_GL_EXT_compiled_vertex_array +#define glLockArraysEXT _al_glLockArraysEXT +#define glUnlockArraysEXT _al_glUnlockArraysEXT +#endif + +#if defined _ALLEGRO_GL_EXT_cull_vertex +#define glCullParameterdvEXT _al_glCullParameterdvEXT +#define glCullParameterfvEXT _al_glCullParameterfvEXT +#endif + +#if defined _ALLEGRO_GL_SGIX_fragment_lighting +#define glFragmentColorMaterialSGIX _al_glFragmentColorMaterialSGIX +#define glFragmentLightfSGIX _al_glFragmentLightfSGIX +#define glFragmentLightfvSGIX _al_glFragmentLightfvSGIX +#define glFragmentLightiSGIX _al_glFragmentLightiSGIX +#define glFragmentLightivSGIX _al_glFragmentLightivSGIX +#define glFragmentLightModelfSGIX _al_glFragmentLightModelfSGIX +#define glFragmentLightModelfvSGIX _al_glFragmentLightModelfvSGIX +#define glFragmentLightModeliSGIX _al_glFragmentLightModeliSGIX +#define glFragmentLightModelivSGIX _al_glFragmentLightModelivSGIX +#define glFragmentMaterialfSGIX _al_glFragmentMaterialfSGIX +#define glFragmentMaterialfvSGIX _al_glFragmentMaterialfvSGIX +#define glFragmentMaterialiSGIX _al_glFragmentMaterialiSGIX +#define glFragmentMaterialivSGIX _al_glFragmentMaterialivSGIX +#define glGetFragmentLightfvSGIX _al_glGetFragmentLightfvSGIX +#define glGetFragmentLightivSGIX _al_glGetFragmentLightivSGIX +#define glGetFragmentMaterialfvSGIX _al_glGetFragmentMaterialfvSGIX +#define glGetFragmentMaterialivSGIX _al_glGetFragmentMaterialivSGIX +#define glLightEnviSGIX _al_glLightEnviSGIX +#endif + +#if defined _ALLEGRO_GL_EXT_draw_range_elements +#define glDrawRangeElementsEXT _al_glDrawRangeElementsEXT +#endif + +#if defined _ALLEGRO_GL_EXT_light_texture +#define glApplyTextureEXT _al_glApplyTextureEXT +#define glTextureLightEXT _al_glTextureLightEXT +#define glTextureMaterialEXT _al_glTextureMaterialEXT +#endif + +#if defined _ALLEGRO_GL_SGIX_async +#define glAsyncMarkerSGIX _al_glAsyncMarkerSGIX +#define glFinishAsyncSGIX _al_glFinishAsyncSGIX +#define glPollAsyncSGIX _al_glPollAsyncSGIX +#define glGenAsyncMarkersSGIX _al_glGenAsyncMarkersSGIX +#define glDeleteAsyncMarkersSGIX _al_glDeleteAsyncMarkersSGIX +#define glIsAsyncMarkerSGIX _al_glIsAsyncMarkerSGIX +#endif + +#if defined _ALLEGRO_GL_INTEL_parallel_arrays +#define glVertexPointervINTEL _al_glVertexPointervINTEL +#define glNormalPointervINTEL _al_glNormalPointervINTEL +#define glColorPointervINTEL _al_glColorPointervINTEL +#define glTexCoordPointervINTEL _al_glTexCoordPointervINTEL +#endif + +#if defined _ALLEGRO_GL_EXT_pixel_transform +#define glPixelTransformParameteriEXT _al_glPixelTransformParameteriEXT +#define glPixelTransformParameterfEXT _al_glPixelTransformParameterfEXT +#define glPixelTransformParameterivEXT _al_glPixelTransformParameterivEXT +#define glPixelTransformParameterfvEXT _al_glPixelTransformParameterfvEXT +#endif + +#if defined _ALLEGRO_GL_EXT_secondary_color +#define glSecondaryColor3bEXT _al_glSecondaryColor3bEXT +#define glSecondaryColor3bvEXT _al_glSecondaryColor3bvEXT +#define glSecondaryColor3dEXT _al_glSecondaryColor3dEXT +#define glSecondaryColor3dvEXT _al_glSecondaryColor3dvEXT +#define glSecondaryColor3fEXT _al_glSecondaryColor3fEXT +#define glSecondaryColor3fvEXT _al_glSecondaryColor3fvEXT +#define glSecondaryColor3iEXT _al_glSecondaryColor3iEXT +#define glSecondaryColor3ivEXT _al_glSecondaryColor3ivEXT +#define glSecondaryColor3sEXT _al_glSecondaryColor3sEXT +#define glSecondaryColor3svEXT _al_glSecondaryColor3svEXT +#define glSecondaryColor3ubEXT _al_glSecondaryColor3ubEXT +#define glSecondaryColor3ubvEXT _al_glSecondaryColor3ubvEXT +#define glSecondaryColor3uiEXT _al_glSecondaryColor3uiEXT +#define glSecondaryColor3uivEXT _al_glSecondaryColor3uivEXT +#define glSecondaryColor3usEXT _al_glSecondaryColor3usEXT +#define glSecondaryColor3usvEXT _al_glSecondaryColor3usvEXT +#define glSecondaryColorPointerEXT _al_glSecondaryColorPointerEXT +#endif + +#if defined _ALLEGRO_GL_EXT_texture_perturb_normal +#define glTextureNormalEXT _al_glTextureNormalEXT +#endif + +#if defined _ALLEGRO_GL_EXT_multi_draw_arrays +#define glMultiDrawArraysEXT _al_glMultiDrawArraysEXT +#define glMultiDrawElementsEXT _al_glMultiDrawElementsEXT +#endif + +#if defined _ALLEGRO_GL_EXT_fog_coord +#define glFogCoordfEXT _al_glFogCoordfEXT +#define glFogCoordfvEXT _al_glFogCoordfvEXT +#define glFogCoorddEXT _al_glFogCoorddEXT +#define glFogCoorddvEXT _al_glFogCoorddvEXT +#define glFogCoordPointerEXT _al_glFogCoordPointerEXT +#endif + +#if defined _ALLEGRO_GL_EXT_coordinate_frame +#define glTangent3bEXT _al_glTangent3bEXT +#define glTangent3bvEXT _al_glTangent3bvEXT +#define glTangent3dEXT _al_glTangent3dEXT +#define glTangent3dvEXT _al_glTangent3dvEXT +#define glTangent3fEXT _al_glTangent3fEXT +#define glTangent3fvEXT _al_glTangent3fvEXT +#define glTangent3iEXT _al_glTangent3iEXT +#define glTangent3ivEXT _al_glTangent3ivEXT +#define glTangent3sEXT _al_glTangent3sEXT +#define glTangent3svEXT _al_glTangent3svEXT +#define glBinormal3bEXT _al_glBinormal3bEXT +#define glBinormal3bvEXT _al_glBinormal3bvEXT +#define glBinormal3dEXT _al_glBinormal3dEXT +#define glBinormal3dvEXT _al_glBinormal3dvEXT +#define glBinormal3fEXT _al_glBinormal3fEXT +#define glBinormal3fvEXT _al_glBinormal3fvEXT +#define glBinormal3iEXT _al_glBinormal3iEXT +#define glBinormal3ivEXT _al_glBinormal3ivEXT +#define glBinormal3sEXT _al_glBinormal3sEXT +#define glBinormal3svEXT _al_glBinormal3svEXT +#define glTangentPointerEXT _al_glTangentPointerEXT +#define glBinormalPointerEXT _al_glBinormalPointerEXT +#endif + +#if defined _ALLEGRO_GL_SUNX_constant_data +#define glFinishTextureSUNX _al_glFinishTextureSUNX +#endif + +#if defined _ALLEGRO_GL_SUN_global_alpha +#define glGlobalAlphaFactorbSUN _al_glGlobalAlphaFactorbSUN +#define glGlobalAlphaFactorsSUN _al_glGlobalAlphaFactorsSUN +#define glGlobalAlphaFactoriSUN _al_glGlobalAlphaFactoriSUN +#define glGlobalAlphaFactorfSUN _al_glGlobalAlphaFactorfSUN +#define glGlobalAlphaFactordSUN _al_glGlobalAlphaFactordSUN +#define glGlobalAlphaFactorubSUN _al_glGlobalAlphaFactorubSUN +#define glGlobalAlphaFactorusSUN _al_glGlobalAlphaFactorusSUN +#define glGlobalAlphaFactoruiSUN _al_glGlobalAlphaFactoruiSUN +#endif + +#if defined _ALLEGRO_GL_SUN_triangle_list +#define glReplacementCodeuiSUN _al_glReplacementCodeuiSUN +#define glReplacementCodeusSUN _al_glReplacementCodeusSUN +#define glReplacementCodeubSUN _al_glReplacementCodeubSUN +#define glReplacementCodeuivSUN _al_glReplacementCodeuivSUN +#define glReplacementCodeusvSUN _al_glReplacementCodeusvSUN +#define glReplacementCodeubvSUN _al_glReplacementCodeubvSUN +#define glReplacementCodePointerSUN _al_glReplacementCodePointerSUN +#endif + +#if defined _ALLEGRO_GL_SUN_vertex +#define glColor4ubVertex2fSUN _al_glColor4ubVertex2fSUN +#define glColor4ubVertex2fvSUN _al_glColor4ubVertex2fvSUN +#define glColor4ubVertex3fSUN _al_glColor4ubVertex3fSUN +#define glColor4ubVertex3fvSUN _al_glColor4ubVertex3fvSUN +#define glColor3fVertex3fSUN _al_glColor3fVertex3fSUN +#define glColor3fVertex3fvSUN _al_glColor3fVertex3fvSUN +#define glNormal3fVertex3fSUN _al_glNormal3fVertex3fSUN +#define glNormal3fVertex3fvSUN _al_glNormal3fVertex3fvSUN +#define glColor4fNormal3fVertex3fSUN _al_glColor4fNormal3fVertex3fSUN +#define glColor4fNormal3fVertex3fvSUN _al_glColor4fNormal3fVertex3fvSUN +#define glTexCoord2fVertex3fSUN _al_glTexCoord2fVertex3fSUN +#define glTexCoord2fVertex3fvSUN _al_glTexCoord2fVertex3fvSUN +#define glTexCoord4fVertex4fSUN _al_glTexCoord4fVertex4fSUN +#define glTexCoord4fVertex4fvSUN _al_glTexCoord4fVertex4fvSUN +#define glTexCoord2fColor4ubVertex3fSUN _al_glTexCoord2fColor4ubVertex3fSUN +#define glTexCoord2fColor4ubVertex3fvSUN _al_glTexCoord2fColor4ubVertex3fvSUN +#define glTexCoord2fColor3fVertex3fSUN _al_glTexCoord2fColor3fVertex3fSUN +#define glTexCoord2fColor3fVertex3fvSUN _al_glTexCoord2fColor3fVertex3fvSUN +#define glTexCoord2fNormal3fVertex3fSUN _al_glTexCoord2fNormal3fVertex3fSUN +#define glTexCoord2fNormal3fVertex3fvSUN _al_glTexCoord2fNormal3fVertex3fvSUN +#define glTexCoord2fColor4fNormal3fVertex3fSUN _al_glTexCoord2fColor4fNormal3fVertex3fSUN +#define glTexCoord2fColor4fNormal3fVertex3fvSUN _al_glTexCoord2fColor4fNormal3fVertex3fvSUN +#define glTexCoord4fColor4fNormal3fVertex4fSUN _al_glTexCoord4fColor4fNormal3fVertex4fSUN +#define glTexCoord4fColor4fNormal3fVertex4fvSUN _al_glTexCoord4fColor4fNormal3fVertex4fvSUN +#define glReplacementCodeuiVertex3fSUN _al_glReplacementCodeuiVertex3fSUN +#define glReplacementCodeuiVertex3fvSUN _al_glReplacementCodeuiVertex3fvSUN +#define glReplacementCodeuiColor4ubVertex3fSUN _al_glReplacementCodeuiColor4ubVertex3fSUN +#define glReplacementCodeuiColor4ubVertex3fvSUN _al_glReplacementCodeuiColor4ubVertex3fvSUN +#define glReplacementCodeuiColor3fVertex3fSUN _al_glReplacementCodeuiColor3fVertex3fSUN +#define glReplacementCodeuiColor3fVertex3fvSUN _al_glReplacementCodeuiColor3fVertex3fvSUN +#define glReplacementCodeuiNormal3fVertex3fSUN _al_glReplacementCodeuiNormal3fVertex3fSUN +#define glReplacementCodeuiNormal3fVertex3fvSUN _al_glReplacementCodeuiNormal3fVertex3fvSUN +#define glReplacementCodeuiColor4fNormal3fVertex3fSUN _al_glReplacementCodeuiColor4fNormal3fVertex3fSUN +#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN _al_glReplacementCodeuiColor4fNormal3fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fVertex3fSUN _al_glReplacementCodeuiTexCoord2fVertex3fSUN +#define glReplacementCodeuiTexCoord2fVertex3fvSUN _al_glReplacementCodeuiTexCoord2fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN _al_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN _al_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN _al_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN _al_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN +#endif + +#if defined _ALLEGRO_GL_EXT_blend_func_separate +#define glBlendFuncSeparateEXT _al_glBlendFuncSeparateEXT +#endif + +#if defined _ALLEGRO_GL_INGR_blend_func_separate +#define glBlendFuncSeparateINGR _al_glBlendFuncSeparateINGR +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_weighting +#define glVertexWeightfEXT _al_glVertexWeightfEXT +#define glVertexWeightfvEXT _al_glVertexWeightfvEXT +#define glVertexWeightPointerEXT _al_glVertexWeightPointerEXT +#endif + +#if defined _ALLEGRO_GL_NV_vertex_array_range +#define glFlushVertexArrayRangeNV _al_glFlushVertexArrayRangeNV +#define glVertexArrayRangeNV _al_glVertexArrayRangeNV +#endif + +#if defined _ALLEGRO_GL_NV_register_combiners +#define glCombinerParameterfvNV _al_glCombinerParameterfvNV +#define glCombinerParameterfNV _al_glCombinerParameterfNV +#define glCombinerParameterivNV _al_glCombinerParameterivNV +#define glCombinerParameteriNV _al_glCombinerParameteriNV +#define glCombinerInputNV _al_glCombinerInputNV +#define glCombinerOutputNV _al_glCombinerOutputNV +#define glFinalCombinerInputNV _al_glFinalCombinerInputNV +#define glGetCombinerInputParameterfvNV _al_glGetCombinerInputParameterfvNV +#define glGetCombinerInputParameterivNV _al_glGetCombinerInputParameterivNV +#define glGetCombinerOutputParameterfvNV _al_glGetCombinerOutputParameterfvNV +#define glGetCombinerOutputParameterivNV _al_glGetCombinerOutputParameterivNV +#define glGetFinalCombinerInputParameterfvNV _al_glGetFinalCombinerInputParameterfvNV +#define glGetFinalCombinerInputParameterivNV _al_glGetFinalCombinerInputParameterivNV +#endif + +#if defined _ALLEGRO_GL_MESA_resize_buffers +#define glResizeBuffersMESA _al_glResizeBuffersMESA +#endif + +#if defined _ALLEGRO_GL_MESA_window_pos +#define glWindowPos2dMESA _al_glWindowPos2dMESA +#define glWindowPos2dvMESA _al_glWindowPos2dvMESA +#define glWindowPos2fMESA _al_glWindowPos2fMESA +#define glWindowPos2fvMESA _al_glWindowPos2fvMESA +#define glWindowPos2iMESA _al_glWindowPos2iMESA +#define glWindowPos2ivMESA _al_glWindowPos2ivMESA +#define glWindowPos2sMESA _al_glWindowPos2sMESA +#define glWindowPos2svMESA _al_glWindowPos2svMESA +#define glWindowPos3dMESA _al_glWindowPos3dMESA +#define glWindowPos3dvMESA _al_glWindowPos3dvMESA +#define glWindowPos3fMESA _al_glWindowPos3fMESA +#define glWindowPos3fvMESA _al_glWindowPos3fvMESA +#define glWindowPos3iMESA _al_glWindowPos3iMESA +#define glWindowPos3ivMESA _al_glWindowPos3ivMESA +#define glWindowPos3sMESA _al_glWindowPos3sMESA +#define glWindowPos3svMESA _al_glWindowPos3svMESA +#define glWindowPos4dMESA _al_glWindowPos4dMESA +#define glWindowPos4dvMESA _al_glWindowPos4dvMESA +#define glWindowPos4fMESA _al_glWindowPos4fMESA +#define glWindowPos4fvMESA _al_glWindowPos4fvMESA +#define glWindowPos4iMESA _al_glWindowPos4iMESA +#define glWindowPos4ivMESA _al_glWindowPos4ivMESA +#define glWindowPos4sMESA _al_glWindowPos4sMESA +#define glWindowPos4svMESA _al_glWindowPos4svMESA +#endif + +#if defined _ALLEGRO_GL_IBM_multimode_draw_arrays +#define glMultiModeDrawArraysIBM _al_glMultiModeDrawArraysIBM +#define glMultiModeDrawElementsIBM _al_glMultiModeDrawElementsIBM +#endif + +#ifdef AGK_IBM_vertex_array_lists +#define glColorPointerListIBM _al_glColorPointerListIBM +#define glSecondaryColorPointerListIBM _al_glSecondaryColorPointerListIBM +#define glEdgeFlagPointerListIBM _al_glEdgeFlagPointerListIBM +#define glFogCoordPointerListIBM _al_glFogCoordPointerListIBM +#define glIndexPointerListIBM _al_glIndexPointerListIBM +#define glNormalPointerListIBM _al_glNormalPointerListIBM +#define glTexCoordPointerListIBM _al_glTexCoordPointerListIBM +#define glVertexPointerListIBM _al_glVertexPointerListIBM +#endif + +#if defined _ALLEGRO_GL_3DFX_tbuffer +#define glTbufferMask3DFX _al_glTbufferMask3DFX +#endif + +#if defined _ALLEGRO_GL_EXT_multisample +#define glSampleMaskEXT _al_glSampleMaskEXT +#define glSamplePatternEXT _al_glSamplePatternEXT +#endif + +#if defined _ALLEGRO_GL_SGIS_texture_color_mask +#define glTextureColorMaskSGIS _al_glTextureColorMaskSGIS +#endif + +#if defined _ALLEGRO_GL_SGIX_igloo_interface +#define glIglooInterfaceSGIX _al_glIglooInterfaceSGIX +#endif + +#if defined _ALLEGRO_GL_NV_fence +#define glDeleteFencesNV _al_glDeleteFencesNV +#define glGenFencesNV _al_glGenFencesNV +#define glIsFenceNV _al_glIsFenceNV +#define glTestFenceNV _al_glTestFenceNV +#define glGetFenceivNV _al_glGetFenceivNV +#define glFinishFenceNV _al_glFinishFenceNV +#define glSetFenceNV _al_glSetFenceNV +#endif + +#if defined _ALLEGRO_GL_NV_evaluators +#define glMapControlPointsNV _al_glMapControlPointsNV +#define glMapParameterivNV _al_glMapParameterivNV +#define glMapParameterfvNV _al_glMapParameterfvNV +#define glGetMapControlPointsNV _al_glGetMapControlPointsNV +#define glGetMapParameterivNV _al_glGetMapParameterivNV +#define glGetMapParameterfvNV _al_glGetMapParameterfvNV +#define glGetMapAttribParameterivNV _al_glGetMapAttribParameterivNV +#define glGetMapAttribParameterfvNV _al_glGetMapAttribParameterfvNV +#define glEvalMapsNV _al_glEvalMapsNV +#endif + +#if defined _ALLEGRO_GL_NV_register_combiners2 +#define glCombinerStageParameterfvNV _al_glCombinerStageParameterfvNV +#define glGetCombinerStageParameterfvNV _al_glGetCombinerStageParameterfvNV +#endif + +#if defined _ALLEGRO_GL_NV_vertex_program +#define glAreProgramsResidentNV _al_glAreProgramsResidentNV +#define glBindProgramNV _al_glBindProgramNV +#define glDeleteProgramsNV _al_glDeleteProgramsNV +#define glExecuteProgramNV _al_glExecuteProgramNV +#define glGenProgramsNV _al_glGenProgramsNV +#define glGetProgramParameterdvNV _al_glGetProgramParameterdvNV +#define glGetProgramParameterfvNV _al_glGetProgramParameterfvNV +#define glGetProgramivNV _al_glGetProgramivNV +#define glGetProgramStringNV _al_glGetProgramStringNV +#define glGetTrackMatrixivNV _al_glGetTrackMatrixivNV +#define glGetVertexAttribdvNV _al_glGetVertexAttribdvNV +#define glGetVertexAttribfvNV _al_glGetVertexAttribfvNV +#define glGetVertexAttribivNV _al_glGetVertexAttribivNV +#define glGetVertexAttribPointervNV _al_glGetVertexAttribPointervNV +#define glIsProgramNV _al_glIsProgramNV +#define glLoadProgramNV _al_glLoadProgramNV +#define glProgramParameter4dNV _al_glProgramParameter4dNV +#define glProgramParameter4dvNV _al_glProgramParameter4dvNV +#define glProgramParameter4fNV _al_glProgramParameter4fNV +#define glProgramParameter4fvNV _al_glProgramParameter4fvNV +#define glProgramParameters4dvNV _al_glProgramParameters4dvNV +#define glProgramParameters4fvNV _al_glProgramParameters4fvNV +#define glRequestResidentProgramsNV _al_glRequestResidentProgramsNV +#define glTrackMatrixNV _al_glTrackMatrixNV +#define glVertexAttribPointerNV _al_glVertexAttribPointerNV +#define glVertexAttrib1dNV _al_glVertexAttrib1dNV +#define glVertexAttrib1dvNV _al_glVertexAttrib1dvNV +#define glVertexAttrib1fNV _al_glVertexAttrib1fNV +#define glVertexAttrib1fvNV _al_glVertexAttrib1fvNV +#define glVertexAttrib1sNV _al_glVertexAttrib1sNV +#define glVertexAttrib1svNV _al_glVertexAttrib1svNV +#define glVertexAttrib2dNV _al_glVertexAttrib2dNV +#define glVertexAttrib2dvNV _al_glVertexAttrib2dvNV +#define glVertexAttrib2fNV _al_glVertexAttrib2fNV +#define glVertexAttrib2fvNV _al_glVertexAttrib2fvNV +#define glVertexAttrib2sNV _al_glVertexAttrib2sNV +#define glVertexAttrib2svNV _al_glVertexAttrib2svNV +#define glVertexAttrib3dNV _al_glVertexAttrib3dNV +#define glVertexAttrib3dvNV _al_glVertexAttrib3dvNV +#define glVertexAttrib3fNV _al_glVertexAttrib3fNV +#define glVertexAttrib3fvNV _al_glVertexAttrib3fvNV +#define glVertexAttrib3sNV _al_glVertexAttrib3sNV +#define glVertexAttrib3svNV _al_glVertexAttrib3svNV +#define glVertexAttrib4dNV _al_glVertexAttrib4dNV +#define glVertexAttrib4dvNV _al_glVertexAttrib4dvNV +#define glVertexAttrib4fNV _al_glVertexAttrib4fNV +#define glVertexAttrib4fvNV _al_glVertexAttrib4fvNV +#define glVertexAttrib4sNV _al_glVertexAttrib4sNV +#define glVertexAttrib4svNV _al_glVertexAttrib4svNV +#define glVertexAttrib4ubNV _al_glVertexAttrib4ubNV +#define glVertexAttrib4ubvNV _al_glVertexAttrib4ubvNV +#define glVertexAttribs1dvNV _al_glVertexAttribs1dvNV +#define glVertexAttribs1fvNV _al_glVertexAttribs1fvNV +#define glVertexAttribs1svNV _al_glVertexAttribs1svNV +#define glVertexAttribs2dvNV _al_glVertexAttribs2dvNV +#define glVertexAttribs2fvNV _al_glVertexAttribs2fvNV +#define glVertexAttribs2svNV _al_glVertexAttribs2svNV +#define glVertexAttribs3dvNV _al_glVertexAttribs3dvNV +#define glVertexAttribs3fvNV _al_glVertexAttribs3fvNV +#define glVertexAttribs3svNV _al_glVertexAttribs3svNV +#define glVertexAttribs4dvNV _al_glVertexAttribs4dvNV +#define glVertexAttribs4fvNV _al_glVertexAttribs4fvNV +#define glVertexAttribs4svNV _al_glVertexAttribs4svNV +#define glVertexAttribs4ubvNV _al_glVertexAttribs4ubvNV +#endif + +#if defined _ALLEGRO_GL_ATI_envmap_bumpmap +#define glTexBumpParameterivATI _al_glTexBumpParameterivATI +#define glTexBumpParameterfvATI _al_glTexBumpParameterfvATI +#define glGetTexBumpParameterivATI _al_glGetTexBumpParameterivATI +#define glGetTexBumpParameterfvATI _al_glGetTexBumpParameterfvATI +#endif + +#if defined _ALLEGRO_GL_ATI_fragment_shader +#define glGenFragmentShadersATI _al_glGenFragmentShadersATI +#define glBindFragmentShaderATI _al_glBindFragmentShaderATI +#define glDeleteFragmentShaderATI _al_glDeleteFragmentShaderATI +#define glBeginFragmentShaderATI _al_glBeginFragmentShaderATI +#define glEndFragmentShaderATI _al_glEndFragmentShaderATI +#define glPassTexCoordATI _al_glPassTexCoordATI +#define glSampleMapATI _al_glSampleMapATI +#define glColorFragmentOp1ATI _al_glColorFragmentOp1ATI +#define glColorFragmentOp2ATI _al_glColorFragmentOp2ATI +#define glColorFragmentOp3ATI _al_glColorFragmentOp3ATI +#define glAlphaFragmentOp1ATI _al_glAlphaFragmentOp1ATI +#define glAlphaFragmentOp2ATI _al_glAlphaFragmentOp2ATI +#define glAlphaFragmentOp3ATI _al_glAlphaFragmentOp3ATI +#define glSetFragmentShaderConstantATI _al_glSetFragmentShaderConstantATI +#endif + +#if defined _ALLEGRO_GL_ATI_pn_triangles +#define glPNTrianglesiATI _al_glPNTrianglesiATI +#define glPNTrianglesfATI _al_glPNTrianglesfATI +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_array_object +#define glNewObjectBufferATI _al_glNewObjectBufferATI +#define glIsObjectBufferATI _al_glIsObjectBufferATI +#define glUpdateObjectBufferATI _al_glUpdateObjectBufferATI +#define glGetObjectBufferfvATI _al_glGetObjectBufferfvATI +#define glGetObjectBufferivATI _al_glGetObjectBufferivATI +#define glFreeObjectBufferATI _al_glFreeObjectBufferATI +#define glArrayObjectATI _al_glArrayObjectATI +#define glGetArrayObjectfvATI _al_glGetArrayObjectfvATI +#define glGetArrayObjectivATI _al_glGetArrayObjectivATI +#define glVariantArrayObjectATI _al_glVariantArrayObjectATI +#define glGetVariantArrayObjectfvATI _al_glGetVariantArrayObjectfvATI +#define glGetVariantArrayObjectivATI _al_glGetVariantArrayObjectivATI +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_shader +#define glBeginVertexShaderEXT _al_glBeginVertexShaderEXT +#define glEndVertexShaderEXT _al_glEndVertexShaderEXT +#define glBindVertexShaderEXT _al_glBindVertexShaderEXT +#define glGenVertexShadersEXT _al_glGenVertexShadersEXT +#define glDeleteVertexShaderEXT _al_glDeleteVertexShaderEXT +#define glShaderOp1EXT _al_glShaderOp1EXT +#define glShaderOp2EXT _al_glShaderOp2EXT +#define glShaderOp3EXT _al_glShaderOp3EXT +#define glSwizzleEXT _al_glSwizzleEXT +#define glWriteMaskEXT _al_glWriteMaskEXT +#define glInsertComponentEXT _al_glInsertComponentEXT +#define glExtractComponentEXT _al_glExtractComponentEXT +#define glGenSymbolsEXT _al_glGenSymbolsEXT +#define glSetInvariantEXT _al_glSetInvariantEXT +#define glSetLocalConstantEXT _al_glSetLocalConstantEXT +#define glVariantbvEXT _al_glVariantbvEXT +#define glVariantsvEXT _al_glVariantsvEXT +#define glVariantivEXT _al_glVariantivEXT +#define glVariantfvEXT _al_glVariantfvEXT +#define glVariantdvEXT _al_glVariantdvEXT +#define glVariantubvEXT _al_glVariantubvEXT +#define glVariantusvEXT _al_glVariantusvEXT +#define glVariantuivEXT _al_glVariantuivEXT +#define glVariantPointerEXT _al_glVariantPointerEXT +#define glEnableVariantClientStateEXT _al_glEnableVariantClientStateEXT +#define glDisableVariantClientStateEXT _al_glDisableVariantClientStateEXT +#define glBindLightParameterEXT _al_glBindLightParameterEXT +#define glBindMaterialParameterEXT _al_glBindMaterialParameterEXT +#define glBindTexGenParameterEXT _al_glBindTexGenParameterEXT +#define glBindTextureUnitParameterEXT _al_glBindTextureUnitParameterEXT +#define glBindParameterEXT _al_glBindParameterEXT +#define glIsVariantEnabledEXT _al_glIsVariantEnabledEXT +#define glGetVariantBooleanvEXT _al_glGetVariantBooleanvEXT +#define glGetVariantIntegervEXT _al_glGetVariantIntegervEXT +#define glGetVariantFloatvEXT _al_glGetVariantFloatvEXT +#define glGetVariantPointervEXT _al_glGetVariantPointervEXT +#define glGetInvariantBooleanvEXT _al_glGetInvariantBooleanvEXT +#define glGetInvariantIntegervEXT _al_glGetInvariantIntegervEXT +#define glGetInvariantFloatvEXT _al_glGetInvariantFloatvEXT +#define glGetLocalConstantBooleanvEXT _al_glGetLocalConstantBooleanvEXT +#define glGetLocalConstantIntegervEXT _al_glGetLocalConstantIntegervEXT +#define glGetLocalConstantFloatvEXT _al_glGetLocalConstantFloatvEXT +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_streams +#define glVertexStream1sATI _al_glVertexStream1sATI +#define glVertexStream1svATI _al_glVertexStream1svATI +#define glVertexStream1iATI _al_glVertexStream1iATI +#define glVertexStream1ivATI _al_glVertexStream1ivATI +#define glVertexStream1fATI _al_glVertexStream1fATI +#define glVertexStream1fvATI _al_glVertexStream1fvATI +#define glVertexStream1dATI _al_glVertexStream1dATI +#define glVertexStream1dvATI _al_glVertexStream1dvATI +#define glVertexStream2sATI _al_glVertexStream2sATI +#define glVertexStream2svATI _al_glVertexStream2svATI +#define glVertexStream2iATI _al_glVertexStream2iATI +#define glVertexStream2ivATI _al_glVertexStream2ivATI +#define glVertexStream2fATI _al_glVertexStream2fATI +#define glVertexStream2fvATI _al_glVertexStream2fvATI +#define glVertexStream2dATI _al_glVertexStream2dATI +#define glVertexStream2dvATI _al_glVertexStream2dvATI +#define glVertexStream3sATI _al_glVertexStream3sATI +#define glVertexStream3svATI _al_glVertexStream3svATI +#define glVertexStream3iATI _al_glVertexStream3iATI +#define glVertexStream3ivATI _al_glVertexStream3ivATI +#define glVertexStream3fATI _al_glVertexStream3fATI +#define glVertexStream3fvATI _al_glVertexStream3fvATI +#define glVertexStream3dATI _al_glVertexStream3dATI +#define glVertexStream3dvATI _al_glVertexStream3dvATI +#define glVertexStream4sATI _al_glVertexStream4sATI +#define glVertexStream4svATI _al_glVertexStream4svATI +#define glVertexStream4iATI _al_glVertexStream4iATI +#define glVertexStream4ivATI _al_glVertexStream4ivATI +#define glVertexStream4fATI _al_glVertexStream4fATI +#define glVertexStream4fvATI _al_glVertexStream4fvATI +#define glVertexStream4dATI _al_glVertexStream4dATI +#define glVertexStream4dvATI _al_glVertexStream4dvATI +#define glNormalStream3bATI _al_glNormalStream3bATI +#define glNormalStream3bvATI _al_glNormalStream3bvATI +#define glNormalStream3sATI _al_glNormalStream3sATI +#define glNormalStream3svATI _al_glNormalStream3svATI +#define glNormalStream3iATI _al_glNormalStream3iATI +#define glNormalStream3ivATI _al_glNormalStream3ivATI +#define glNormalStream3fATI _al_glNormalStream3fATI +#define glNormalStream3fvATI _al_glNormalStream3fvATI +#define glNormalStream3dATI _al_glNormalStream3dATI +#define glNormalStream3dvATI _al_glNormalStream3dvATI +#define glClientActiveVertexStreamATI _al_glClientActiveVertexStreamATI +#define glVertexBlendEnviATI _al_glVertexBlendEnviATI +#define glVertexBlendEnvfATI _al_glVertexBlendEnvfATI +#endif + +#if defined _ALLEGRO_GL_ATI_element_array +#define glElementPointerATI _al_glElementPointerATI +#define glDrawElementArrayATI _al_glDrawElementArrayATI +#define glDrawRangeElementArrayATI _al_glDrawRangeElementArrayATI +#endif + +#if defined _ALLEGRO_GL_SUN_mesh_array +#define glDrawMeshArraysSUN _al_glDrawMeshArraysSUN +#endif + +#if defined _ALLEGRO_GL_NV_occlusion_query +#define glGenOcclusionQueriesNV _al_glGenOcclusionQueriesNV +#define glDeleteOcclusionQueriesNV _al_glDeleteOcclusionQueriesNV +#define glIsOcclusionQueryNV _al_glIsOcclusionQueryNV +#define glBeginOcclusionQueryNV _al_glBeginOcclusionQueryNV +#define glEndOcclusionQueryNV _al_glEndOcclusionQueryNV +#define glGetOcclusionQueryivNV _al_glGetOcclusionQueryivNV +#define glGetOcclusionQueryuivNV _al_glGetOcclusionQueryuivNV +#endif + +#if defined _ALLEGRO_GL_NV_point_sprite +#define glPointParameteriNV _al_glPointParameteriNV +#define glPointParameterivNV _al_glPointParameterivNV +#endif + +#if defined _ALLEGRO_GL_EXT_stencil_two_side +#define glActiveStencilFaceEXT _al_glActiveStencilFaceEXT +#endif + +#if defined _ALLEGRO_GL_APPLE_element_array +#define glElementPointerAPPLE _al_glElementPointerAPPLE +#define glDrawElementArrayAPPLE _al_glDrawElementArrayAPPLE +#define glDrawRangeElementArrayAPPLE _al_glDrawRangeElementArrayAPPLE +#define glMultiDrawElementArrayAPPLE _al_glMultiDrawElementArrayAPPLE +#define glMultiDrawRangeElementArrayAPPLE _al_glMultiDrawRangeElementArrayAPPLE +#endif + +#if defined _ALLEGRO_GL_APPLE_fence +#define glGenFencesAPPLE _al_glGenFencesAPPLE +#define glDeleteFencesAPPLE _al_glDeleteFencesAPPLE +#define glSetFenceAPPLE _al_glSetFenceAPPLE +#define glIsFenceAPPLE _al_glIsFenceAPPLE +#define glTestFenceAPPLE _al_glTestFenceAPPLE +#define glFinishFenceAPPLE _al_glFinishFenceAPPLE +#define glTestObjectAPPLE _al_glTestObjectAPPLE +#define glFinishObjectAPPLE _al_glFinishObjectAPPLE +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_array_object +#define glBindVertexArrayAPPLE _al_glBindVertexArrayAPPLE +#define glDeleteVertexArraysAPPLE _al_glDeleteVertexArraysAPPLE +#define glGenVertexArraysAPPLE _al_glGenVertexArraysAPPLE +#define glIsVertexArrayAPPLE _al_glIsVertexArrayAPPLE +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_array_range +#define glVertexArrayRangeAPPLE _al_glVertexArrayRangeAPPLE +#define glFlushVertexArrayRangeAPPLE _al_glFlushVertexArrayRangeAPPLE +#define glVertexArrayParameteriAPPLE _al_glVertexArrayParameteriAPPLE +#endif + +#if defined _ALLEGRO_GL_ATI_draw_buffers +#define glDrawBuffersATI _al_glDrawBuffersATI +#endif + +#if defined _ALLEGRO_GL_NV_fragment_program +#define glProgramNamedParameter4fNV _al_glProgramNamedParameter4fNV +#define glProgramNamedParameter4dNV _al_glProgramNamedParameter4dNV +#define glProgramNamedParameter4fvNV _al_glProgramNamedParameter4fvNV +#define glProgramNamedParameter4dvNV _al_glProgramNamedParameter4dvNV +#define glGetProgramNamedParameterfvNV _al_glGetProgramNamedParameterfvNV +#define glGetProgramNamedParameterdvNV _al_glGetProgramNamedParameterdvNV +#endif + +#if defined _ALLEGRO_GL_NV_half_float +#define glVertex2hNV _al_glVertex2hNV +#define glVertex2hvNV _al_glVertex2hvNV +#define glVertex3hNV _al_glVertex3hNV +#define glVertex3hvNV _al_glVertex3hvNV +#define glVertex4hNV _al_glVertex4hNV +#define glVertex4hvNV _al_glVertex4hvNV +#define glNormal3hNV _al_glNormal3hNV +#define glNormal3hvNV _al_glNormal3hvNV +#define glColor3hNV _al_glColor3hNV +#define glColor3hvNV _al_glColor3hvNV +#define glColor4hNV _al_glColor4hNV +#define glColor4hvNV _al_glColor4hvNV +#define glTexCoord1hNV _al_glTexCoord1hNV +#define glTexCoord1hvNV _al_glTexCoord1hvNV +#define glTexCoord2hNV _al_glTexCoord2hNV +#define glTexCoord2hvNV _al_glTexCoord2hvNV +#define glTexCoord3hNV _al_glTexCoord3hNV +#define glTexCoord3hvNV _al_glTexCoord3hvNV +#define glTexCoord4hNV _al_glTexCoord4hNV +#define glTexCoord4hvNV _al_glTexCoord4hvNV +#define glMultiTexCoord1hNV _al_glMultiTexCoord1hNV +#define glMultiTexCoord1hvNV _al_glMultiTexCoord1hvNV +#define glMultiTexCoord2hNV _al_glMultiTexCoord2hNV +#define glMultiTexCoord2hvNV _al_glMultiTexCoord2hvNV +#define glMultiTexCoord3hNV _al_glMultiTexCoord3hNV +#define glMultiTexCoord3hvNV _al_glMultiTexCoord3hvNV +#define glMultiTexCoord4hNV _al_glMultiTexCoord4hNV +#define glMultiTexCoord4hvNV _al_glMultiTexCoord4hvNV +#define glFogCoordhNV _al_glFogCoordhNV +#define glFogCoordhvNV _al_glFogCoordhvNV +#define glSecondaryColor3hNV _al_glSecondaryColor3hNV +#define glSecondaryColor3hvNV _al_glSecondaryColor3hvNV +#define glVertexWeighthNV _al_glVertexWeighthNV +#define glVertexWeighthvNV _al_glVertexWeighthvNV +#define glVertexAttrib1hNV _al_glVertexAttrib1hNV +#define glVertexAttrib1hvNV _al_glVertexAttrib1hvNV +#define glVertexAttrib2hNV _al_glVertexAttrib2hNV +#define glVertexAttrib2hvNV _al_glVertexAttrib2hvNV +#define glVertexAttrib3hNV _al_glVertexAttrib3hNV +#define glVertexAttrib3hvNV _al_glVertexAttrib3hvNV +#define glVertexAttrib4hNV _al_glVertexAttrib4hNV +#define glVertexAttrib4hvNV _al_glVertexAttrib4hvNV +#define glVertexAttribs1hvNV _al_glVertexAttribs1hvNV +#define glVertexAttribs2hvNV _al_glVertexAttribs2hvNV +#define glVertexAttribs3hvNV _al_glVertexAttribs3hvNV +#define glVertexAttribs4hvNV _al_glVertexAttribs4hvNV +#endif + +#if defined _ALLEGRO_GL_NV_pixel_data_range +#define glPixelDataRangeNV _al_glPixelDataRangeNV +#define glFlushPixelDataRangeNV _al_glFlushPixelDataRangeNV +#endif + +#if defined _ALLEGRO_GL_NV_primitive_restart +#define glPrimitiveRestartNV _al_glPrimitiveRestartNV +#define glPrimitiveRestartIndexNV _al_glPrimitiveRestartIndexNV +#endif + +#if defined _ALLEGRO_GL_ATI_map_object_buffer +#define glMapObjectBufferATI _al_glMapObjectBufferATI +#define glUnmapObjectBufferATI _al_glUnmapObjectBufferATI +#endif + +#if defined _ALLEGRO_GL_ATI_separate_stencil +#define glStencilOpSeparateATI _al_glStencilOpSeparateATI +#define glStencilFuncSeparateATI _al_glStencilFuncSeparateATI +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_attrib_array_object +#define glVertexAttribArrayObjectATI _al_glVertexAttribArrayObjectATI +#define glGetVertexAttribArrayObjectfvATI _al_glGetVertexAttribArrayObjectfvATI +#define glGetVertexAttribArrayObjectivATI _al_glGetVertexAttribArrayObjectivATI +#endif + +#if defined _ALLEGRO_GL_OES_byte_coordinates +#define glVertex2bOES _al_glVertex2bOES +#define glVertex3bOES _al_glVertex3bOES +#define glVertex4bOES _al_glVertex4bOES +#define glVertex2bvOES _al_glVertex2bvOES +#define glVertex3bvOES _al_glVertex3bvOES +#define glVertex4bvOES _al_glVertex4bvOES +#define glTexCoord1bOES _al_glTexCoord1bOES +#define glTexCoord2bOES _al_glTexCoord2bOES +#define glTexCoord3bOES _al_glTexCoord3bOES +#define glTexCoord4bOES _al_glTexCoord4bOES +#define glTexCoord1bvOES _al_glTexCoord1bvOES +#define glTexCoord2bvOES _al_glTexCoord2bvOES +#define glTexCoord3bvOES _al_glTexCoord3bvOES +#define glTexCoord4bvOES _al_glTexCoord4bvOES +#define glMultiTexCoord1bOES _al_glMultiTexCoord1bOES +#define glMultiTexCoord2bOES _al_glMultiTexCoord2bOES +#define glMultiTexCoord3bOES _al_glMultiTexCoord3bOES +#define glMultiTexCoord4bOES _al_glMultiTexCoord4bOES +#define glMultiTexCoord1bvOES _al_glMultiTexCoord1bvOES +#define glMultiTexCoord2bvOES _al_glMultiTexCoord2bvOES +#define glMultiTexCoord3bvOES _al_glMultiTexCoord3bvOES +#define glMultiTexCoord4bvOES _al_glMultiTexCoord4bvOES +#endif + +#if defined _ALLEGRO_GL_OES_fixed_point +#define glVertex2xOES _al_glVertex2xOES +#define glVertex3xOES _al_glVertex3xOES +#define glVertex4xOES _al_glVertex4xOES +#define glVertex2xvOES _al_glVertex2xvOES +#define glVertex3xvOES _al_glVertex3xvOES +#define glVertex4xvOES _al_glVertex4xvOES +#define glNormal3xOES _al_glNormal3xOES +#define glNormal3xvOES _al_glNormal3xvOES +#define glTexCoord1xOES _al_glTexCoord1xOES +#define glTexCoord2xOES _al_glTexCoord2xOES +#define glTexCoord3xOES _al_glTexCoord3xOES +#define glTexCoord4xOES _al_glTexCoord4xOES +#define glTexCoord1xvOES _al_glTexCoord1xvOES +#define glTexCoord2xvOES _al_glTexCoord2xvOES +#define glTexCoord3xvOES _al_glTexCoord3xvOES +#define glTexCoord4xvOES _al_glTexCoord4xvOES +#define glMultiTexCoord1xOES _al_glMultiTexCoord1xOES +#define glMultiTexCoord2xOES _al_glMultiTexCoord2xOES +#define glMultiTexCoord3xOES _al_glMultiTexCoord3xOES +#define glMultiTexCoord4xOES _al_glMultiTexCoord4xOES +#define glMultiTexCoord1xvOES _al_glMultiTexCoord1xvOES +#define glMultiTexCoord2xvOES _al_glMultiTexCoord2xvOES +#define glMultiTexCoord3xvOES _al_glMultiTexCoord3xvOES +#define glMultiTexCoord4xvOES _al_glMultiTexCoord4xvOES +#define glColor3xOES _al_glColor3xOES +#define glColor4xOES _al_glColor4xOES +#define glColor3xvOES _al_glColor3xvOES +#define glColor4xvOES _al_glColor4xvOES +#define glIndexxOES _al_glIndexxOES +#define glIndexxvOES _al_glIndexxvOES +#define glRectxOES _al_glRectxOES +#define glRectxvOES _al_glRectxvOES +#define glDepthRangexOES _al_glDepthRangexOES +#define glLoadMatrixxOES _al_glLoadMatrixxOES +#define glMultMatrixxOES _al_glMultMatrixxOES +#define glLoadTransposeMatrixxOES _al_glLoadTransposeMatrixxOES +#define glMultTransposeMatrixxOES _al_glMultTransposeMatrixxOES +#define glRotatexOES _al_glRotatexOES +#define glScalexOES _al_glScalexOES +#define glTranslatexOES _al_glTranslatexOES +#define glFrustumxOES _al_glFrustumxOES +#define glOrthoxOES _al_glOrthoxOES +#define glTexGenxOES _al_glTexGenxOES +#define glTexGenxvOES _al_glTexGenxvOES +#define glGetTexGenxvOES _al_glGetTexGenxvOES +#define glClipPlanexOES _al_glClipPlanexOES +#define glGetClipPlanexOES _al_glGetClipPlanexOES +#define glRasterPos2xOES _al_glRasterPos2xOES +#define glRasterPos3xOES _al_glRasterPos3xOES +#define glRasterPos4xOES _al_glRasterPos4xOES +#define glRasterPos2xvOES _al_glRasterPos2xvOES +#define glRasterPos3xvOES _al_glRasterPos3xvOES +#define glRasterPos4xvOES _al_glRasterPos4xvOES +#define glMaterialxOES _al_glMaterialxOES +#define glMaterialxvOES _al_glMaterialxvOES +#define glGetMaterialxOES _al_glGetMaterialxOES +#define glLightxOES _al_glLightxOES +#define glLightxvOES _al_glLightxvOES +#define glGetLightxOES _al_glGetLightxOES +#define glLightModelxOES _al_glLightModelxOES +#define glLightModelxvOES _al_glLightModelxvOES +#define glPointSizexOES _al_glPointSizexOES +#define glLineWidthxOES _al_glLineWidthxOES +#define glPolygonOffsetxOES _al_glPolygonOffsetxOES +#define glPixelStorex _al_glPixelStorex +#define glPixelTransferxOES _al_glPixelTransferxOES +#define glPixelMapx _al_glPixelMapx +#define glGetPixelMapxv _al_glGetPixelMapxv +#define glConvolutionParameterxOES _al_glConvolutionParameterxOES +#define glConvolutionParameterxvOES _al_glConvolutionParameterxvOES +#define glGetConvolutionParameterxvOES _al_glGetConvolutionParameterxvOES +#define glGetHistogramParameterxvOES _al_glGetHistogramParameterxvOES +#define glPixelZoomxOES _al_glPixelZoomxOES +#define glBitmapxOES _al_glBitmapxOES +#define glTexParameterxOES _al_glTexParameterxOES +#define glTexParameterxvOES _al_glTexParameterxvOES +#define glGetTexParameterxvOES _al_glGetTexParameterxvOES +#define glGetTexLevelParameterxvOES _al_glGetTexLevelParameterxvOES +#define glPrioritizeTexturesxOES _al_glPrioritizeTexturesxOES +#define glTexEnvxOES _al_glTexEnvxOES +#define glTexEnvxvOES _al_glTexEnvxvOES +#define glGetTexEnvxvOES _al_glGetTexEnvxvOES +#define glFogxOES _al_glFogxOES +#define glFogxvOES _al_glFogxvOES +#define glSampleCoverageOES _al_glSampleCoverageOES +#define glAlphaFuncxOES _al_glAlphaFuncxOES +#define glBlendColorxOES _al_glBlendColorxOES +#define glClearColorxOES _al_glClearColorxOES +#define glClearDepthxOES _al_glClearDepthxOES +#define glClearAccumxOES _al_glClearAccumxOES +#define glAccumxOES _al_glAccumxOES +#define glMap1xOES _al_glMap1xOES +#define glMap2xOES _al_glMap2xOES +#define glMapGrid1xOES _al_glMapGrid1xOES +#define glMapGrid2xOES _al_glMapGrid2xOES +#define glGetMapxvOES _al_glGetMapxvOES +#define glEvalCoord1xOES _al_glEvalCoord1xOES +#define glEvalCoord2xOES _al_glEvalCoord2xOES +#define glEvalCoord1xvOES _al_glEvalCoord1xvOES +#define glEvalCoord2xvOES _al_glEvalCoord2xvOES +#define glFeedbackBufferxOES _al_glFeedbackBufferxOES +#define glPassThroughxOES _al_glPassThroughxOES +#define glGetFixedvOES _al_glGetFixedvOES +#endif + +#if defined _ALLEGRO_GL_OES_single_precision +#define glDepthRangefOES _al_glDepthRangefOES +#define glFrustumfOES _al_glFrustumfOES +#define glOrthofOES _al_glOrthofOES +#define glClipPlanefOES _al_glClipPlanefOES +#define glGetClipPlanefOES _al_glGetClipPlanefOES +#define glClearDepthfOES _al_glClearDepthfOES +#endif + +#if defined _ALLEGRO_GL_OES_query_matrix +#define glQueryMatrixxOES _al_glQueryMatrixxOES +#endif + +#if defined _ALLEGRO_GL_EXT_depth_bounds_test +#define glDepthBoundsEXT _al_glDepthBoundsEXT +#endif + + +#if defined _ALLEGRO_GL_EXT_blend_equation_separate +#define glBlendEquationSeparateEXT _al_glBlendEquationSeparateEXT +#endif + + +#if defined _ALLEGRO_GL_EXT_framebuffer_object +#define glIsRenderbufferEXT _al_glIsRenderbufferEXT +#define glBindRenderbufferEXT _al_glBindRenderbufferEXT +#define glDeleteRenderbuffersEXT _al_glDeleteRenderbuffersEXT +#define glGenRenderbuffersEXT _al_glGenRenderbuffersEXT +#define glRenderbufferStorageEXT _al_glRenderbufferStorageEXT +#define glGetRenderbufferParameterivEXT _al_glGetRenderbufferParameterivEXT +#define glIsFramebufferEXT _al_glIsFramebufferEXT +#define glBindFramebufferEXT _al_glBindFramebufferEXT +#define glDeleteFramebuffersEXT _al_glDeleteFramebuffersEXT +#define glGenFramebuffersEXT _al_glGenFramebuffersEXT +#define glCheckFramebufferStatusEXT _al_glCheckFramebufferStatusEXT +#define glFramebufferTexture1DEXT _al_glFramebufferTexture1DEXT +#define glFramebufferTexture2DEXT _al_glFramebufferTexture2DEXT +#define glFramebufferTexture3DEXT _al_glFramebufferTexture3DEXT +#define glFramebufferRenderbufferEXT _al_glFramebufferRenderbufferEXT +#define glGetFramebufferAttachmentParameterivEXT _al_glGetFramebufferAttachmentParameterivEXT +#define glGenerateMipmapEXT _al_glGenerateMipmapEXT +#endif + +#if defined _ALLEGRO_GL_GREMEDY_string_marker +#define glStringMarkerGREMEDY _al_glStringMarkerGREMEDY +#endif + +#if defined _ALLEGRO_GL_EXT_stencil_clear_tag +#define glStencilClearTagEXT _al_glStencilClearTagEXT +#endif + +#if defined _ALLEGRO_GL_EXT_framebuffer_blit +#define glBlitFramebufferEXT _al_glBlitFramebufferEXT +#endif + +#if defined _ALLEGRO_GL_EXT_framebuffer_multisample +#define glRenderbufferStorageMultisampleEXT _al_glRenderbufferStorageMultisampleEXT +#endif + +#if defined _ALLEGRO_GL_EXT_timer_query +#define glGetQueryObjecti64vEXT _al_glGetQueryObjecti64vEXT +#define glGetQueryObjectui64vEXT _al_glGetQueryObjectui64vEXT +#endif + +#if defined _ALLEGRO_GL_EXT_gpu_program_parameters +#define glProgramEnvParameters4fvEXT _al_glProgramEnvParameters4fvEXT +#define glProgramLocalParameters4fvEXT _al_glProgramLocalParameters4fvEXT +#endif + +#if defined _ALLEGRO_GL_APPLE_flush_buffer_range +#define glBufferParameteriAPPLE _al_glBufferParameteriAPPLE +#define glFlushMappedBufferRangeAPPLE _al_glFlushMappedBufferRangeAPPLE +#endif + +#if defined _ALLEGRO_GL_EXT_bindable_uniform +#define glUniformBufferEXT _al_glUniformBufferEXT +#define glGetUniformBufferSizeEXT _al_glGetUniformBufferSizeEXT +#define glGetUniformOffsetEXT _al_glGetUniformOffsetEXT +#endif + +#if defined _ALLEGRO_GL_EXT_draw_buffers2 +#define glColorMaskIndexedEXT _al_glColorMaskIndexedEXT +#define glGetBooleanIndexedvEXT _al_glGetBooleanIndexedvEXT +#define glGetIntegerIndexedvEXT _al_glGetIntegerIndexedvEXT +#define glEnableIndexedEXT _al_glEnableIndexedEXT +#define glDisableIndexedEXT _al_glDisableIndexedEXT +#define glIsEnabledIndexedEXT _al_glIsEnabledIndexedEXT +#endif + +#if defined _ALLEGRO_GL_EXT_draw_instanced +#define glDrawArraysInstancedEXT _al_glDrawArraysInstancedEXT +#define glDrawElementsInstancedEXT _al_glDrawElementsInstancedEXT +#endif + +#if defined _ALLEGRO_GL_EXT_geometry_shader4 +#define glProgramParameteriEXT _al_glProgramParameteriEXT +#define glFramebufferTextureEXT _al_glFramebufferTextureEXT +#if !defined _ALLEGRO_GL_EXT_texture_array +#define glFramebufferTextureLayerEXT _al_glFramebufferTextureLayerEXT +#endif +#define glFramebufferTextureFaceEXT _al_glFramebufferTextureFaceEXT +#endif + +#if defined _ALLEGRO_GL_EXT_gpu_shader4 +#define glVertexAttribI1iEXT _al_glVertexAttribI1iEXT +#define glVertexAttribI2iEXT _al_glVertexAttribI2iEXT +#define glVertexAttribI3iEXT _al_glVertexAttribI3iEXT +#define glVertexAttribI4iEXT _al_glVertexAttribI4iEXT +#define glVertexAttribI1uiEXT _al_glVertexAttribI1uiEXT +#define glVertexAttribI2uiEXT _al_glVertexAttribI2uiEXT +#define glVertexAttribI3uiEXT _al_glVertexAttribI3uiEXT +#define glVertexAttribI4uiEXT _al_glVertexAttribI4uiEXT +#define glVertexAttribI1ivEXT _al_glVertexAttribI1ivEXT +#define glVertexAttribI2ivEXT _al_glVertexAttribI2ivEXT +#define glVertexAttribI3ivEXT _al_glVertexAttribI3ivEXT +#define glVertexAttribI4ivEXT _al_glVertexAttribI4ivEXT +#define glVertexAttribI1uivEXT _al_glVertexAttribI1uivEXT +#define glVertexAttribI2uivEXT _al_glVertexAttribI2uivEXT +#define glVertexAttribI3uivEXT _al_glVertexAttribI3uivEXT +#define glVertexAttribI4uivEXT _al_glVertexAttribI4uivEXT +#define glVertexAttribI4bvEXT _al_glVertexAttribI4bvEXT +#define glVertexAttribI4svEXT _al_glVertexAttribI4svEXT +#define glVertexAttribI4ubvEXT _al_glVertexAttribI4ubvEXT +#define glVertexAttribI4usvEXT _al_glVertexAttribI4usvEXT +#define glVertexAttribIPointerEXT _al_glVertexAttribIPointerEXT +#define glGetVertexAttribIivEXT _al_glGetVertexAttribIivEXT +#define glGetVertexAttribIuivEXT _al_glGetVertexAttribIuivEXT +#define glUniform1uiEXT _al_glUniform1uiEXT +#define glUniform2uiEXT _al_glUniform2uiEXT +#define glUniform3uiEXT _al_glUniform3uiEXT +#define glUniform4uiEXT _al_glUniform4uiEXT +#define glUniform1uivEXT _al_glUniform1uivEXT +#define glUniform2uivEXT _al_glUniform2uivEXT +#define glUniform3uivEXT _al_glUniform3uivEXT +#define glUniform4uivEXT _al_glUniform4uivEXT +#define glGetUniformuivEXT _al_glGetUniformuivEXT +#define glBindFragDataLocationEXT _al_glBindFragDataLocationEXT +#define glGetFragDataLocationEXT _al_glGetFragDataLocationEXT +#endif + +#if defined _ALLEGRO_GL_EXT_texture_array +#define glFramebufferTextureLayerEXT _al_glFramebufferTextureLayerEXT +#endif + +#if defined _ALLEGRO_GL_EXT_texture_buffer_object +#define glTexBufferEXT _al_glTexBufferEXT +#endif + +#if defined _ALLEGRO_GL_texture_integer +#define glClearColorIiEXT _al_glClearColorIiEXT +#define glClearColorIuiEXT _al_glClearColorIuiEXT +#define glTexParameterIivEXT _al_glTexParameterIivEXT +#define glTexParameterIuivEXT _al_glTexParameterIuivEXT +#define glGetTexParameterIivEXT _al_glGetTexParameterIivEXT +#define glGetTexParameterIiuvEXT _al_glGetTexParameterIiuvEXT +#endif + +#if defined _ALLEGRO_GL_NV_depth_buffer_float +#define glDepthRangedNV _al_glDepthRangedNV +#define glClearDepthdNV _al_glClearDepthdNV +#define glDepthBoundsdNV _al_glDepthBoundsdNV +#endif + +#if defined _ALLEGRO_GL_NV_framebuffer_multisample_coverage +#define glRenderbufferStorageMultsampleCoverageNV _al_glRenderbufferStorageMultsampleCoverageNV +#endif + +#if defined _ALLEGRO_GL_NV_geometry_program4 +#define glProgramVertexLimitNV _al_glProgramVertexLimitNV +#if !defined _ALLEGRO_GL_EXT_geometry_shader4 +#define glFramebufferTextureEXT _al_glFramebufferTextureEXT +#if !defined _ALLEGRO_GL_EXT_texture_array +#define glFramebufferTextureLayerEXT _al_glFramebufferTextureLayerEXT +#endif +#endif +#endif + +#if defined _ALLEGRO_GL_NV_gpu_program4 +#define glProgramLocalParameterI4iNV _al_glProgramLocalParameterI4iNV +#define glProgramLocalParameterI4ivNV _al_glProgramLocalParameterI4ivNV +#define glProgramLocalParametersI4ivNV _al_glProgramLocalParametersI4ivNV +#define glProgramLocalParameterI4uiNV _al_glProgramLocalParameterI4uiNV +#define glProgramLocalParameterI4uivNV _al_glProgramLocalParameterI4uivNV +#define glProgramLocalParametersI4uivNV _al_glProgramLocalParametersI4uivNV +#define glProgramEnvParameterI4iNV _al_glProgramEnvParameterI4iNV +#define glProgramEnvParameterI4ivNV _al_glProgramEnvParameterI4ivNV +#define glProgramEnvParametersI4ivNV _al_glProgramEnvParametersI4ivNV +#define glProgramEnvParameterI4uiNV _al_glProgramEnvParameterI4uiNV +#define glProgramEnvParameterI4uivNV _al_glProgramEnvParameterI4uivNV +#define glProgramEnvParametersI4uivNV _al_glProgramEnvParametersI4uivNV +#define glGetProgramLocalParameterIivNV _al_glGetProgramLocalParameterIivNV +#define glGetProgramLocalParameterIuivNV _al_glGetProgramLocalParameterIuivNV +#define glGetProgramEnvParameterIivNV _al_glGetProgramEnvParameterIivNV +#define glGetProgramEnvParameterIuivNV _al_glGetProgramEnvParameterIuivNV +#endif + +#if defined _ALLEGRO_GL_NV_parameter_buffer_object +#if !defined _ALLEGRO_GL_NV_transform_feedback +#define glBindBufferRangeNV _al_glBindBufferRangeNV +#define glBindBufferOffsetNV _al_glBindBufferOffsetNV +#define glBindBufferBaseNV _al_glBindBufferBaseNV +#endif +#define glProgramBufferParametersfvNV _al_glProgramBufferParametersfvNV +#define glProgramBufferParametersIivNV _al_glProgramBufferParametersIivNV +#define glProgramBufferParametersIuivNV _al_glProgramBufferParametersIuivNV +#if !defined _ALLEGRO_GL_EXT_draw_buffers2 +#define glGetIntegerIndexedvEXT _al_glGetIntegerIndexedvEXT +#endif +#endif + +#if defined _ALLEGRO_GL_NV_transform_feedback +#define glBindBufferRangeNV _al_glBindBufferRangeNV +#define glBindBufferOffsetNV _al_glBindBufferOffsetNV +#define glBindBufferBaseNV _al_glBindBufferBaseNV +#define glTransformFeedbackAttribsNV _al_glTransformFeedbackAttribsNV +#define glTransformFeedbackVaryingsNV _al_glTransformFeedbackVaryingsNV +#define glBeginTransformFeedbackNV _al_glBeginTransformFeedbackNV +#define glEndTransformFeedbackNV _al_glEndTransformFeedbackNV +#define glGetVaryingLocationNV _al_glGetVaryingLocationNV +#define glGetActiveVaryingNV _al_glGetActiveVaryingNV +#define glActiveVaryingNV _al_glActiveVaryingNV +#define glGetTransformFeedbackVaryingNV _al_glGetTransformFeedbackVaryingNV +#if !defined _ALLEGRO_GL_EXT_draw_buffers2 +#define glGetBooleanIndexedvEXT _al_glGetBooleanIndexedvEXT +/*AGL_API(void,GetIntegerIndexedvEXT,(GLenum,GLuint,GLint*))*/ +#endif +#endif + +#if defined _ALLEGRO_GL_NV_vertex_program4 +#ifndef _ALLEGRO_GL_EXT_gpu_shader4 +#define glVertexAttribI1iEXT _al_glVertexAttribI1iEXT +#define glVertexAttribI2iEXT _al_glVertexAttribI2iEXT +#define glVertexAttribI3iEXT _al_glVertexAttribI3iEXT +#define glVertexAttribI4iEXT _al_glVertexAttribI4iEXT +#define glVertexAttribI1uiEXT _al_glVertexAttribI1uiEXT +#define glVertexAttribI2uiEXT _al_glVertexAttribI2uiEXT +#define glVertexAttribI3uiEXT _al_glVertexAttribI3uiEXT +#define glVertexAttribI4uiEXT _al_glVertexAttribI4uiEXT +#define glVertexAttribI1ivEXT _al_glVertexAttribI1ivEXT +#define glVertexAttribI2ivEXT _al_glVertexAttribI2ivEXT +#define glVertexAttribI3ivEXT _al_glVertexAttribI3ivEXT +#define glVertexAttribI4ivEXT _al_glVertexAttribI4ivEXT +#define glVertexAttribI1uivEXT _al_glVertexAttribI1uivEXT +#define glVertexAttribI2uivEXT _al_glVertexAttribI2uivEXT +#define glVertexAttribI3uivEXT _al_glVertexAttribI3uivEXT +#define glVertexAttribI4uivEXT _al_glVertexAttribI4uivEXT +#define glVertexAttribI4bvEXT _al_glVertexAttribI4bvEXT +#define glVertexAttribI4svEXT _al_glVertexAttribI4svEXT +#define glVertexAttribI4ubvEXT _al_glVertexAttribI4ubvEXT +#define glVertexAttribI4usvEXT _al_glVertexAttribI4usvEXT +#define glVertexAttribIPointerEXT _al_glVertexAttribIPointerEXT +#define glGetVertexAttribIivEXT _al_glGetVertexAttribIivEXT +#define glGetVertexAttribIuivEXT _al_glGetVertexAttribIuivEXT +#endif +#endif + +#if defined _ALLEGRO_GL_GREMEDY_frame_terminator +#define glFrameTerminatorGREMEDY _al_glFrameTerminatorGREMEDY +#endif + +#if defined _ALLEGRO_GL_NV_conditional_render +#define glBeginConditionalRenderNV _al_glBeginConditionalRenderNV +#define glEndConditionalRenderNV _al_glEndConditionalRenderNV +#endif + +#if defined _ALLEGRO_GL_EXT_transform_feedback +#define glBeginTransformFeedbackEXT _al_glBeginTransformFeedbackEXT +#define glEndTransformFeedbackEXT _al_glEndTransformFeedbackEXT +#define glBindBufferRangeEXT _al_glBindBufferRangeEXT +#define glBindBufferOffsetEXT _al_glBindBufferOffsetEXT +#define glBindBufferBaseEXT _al_glBindBufferBaseEXT +#define glTransformFeedbackVaryingsEXT _al_glTransformFeedbackVaryingsEXT +#define glGetTransformFeedbackVaryingEXT _al_glGetTransformFeedbackVaryingEXT +#endif + +#if defined _ALLEGRO_GL_EXT_direct_state_access +#define glClientAttribDefaultEXT _al_glClientAttribDefaultEXT +#define glPushClientAttribDefaultEXT _al_glPushClientAttribDefaultEXT +#define glMatrixLoadfEXT _al_glMatrixLoadfEXT +#define glMatrixLoaddEXT _al_glMatrixLoaddEXT +#define glMatrixMultfEXT _al_glMatrixMultfEXT +#define glMatrixMultdEXT _al_glMatrixMultdEXT +#define glMatrixLoadIdentityEXT _al_glMatrixLoadIdentityEXT +#define glMatrixRotatefEXT _al_glMatrixRotatefEXT +#define glMatrixRotatedEXT _al_glMatrixRotatedEXT +#define glMatrixScalefEXT _al_glMatrixScalefEXT +#define glMatrixScaledEXT _al_glMatrixScaledEXT +#define glMatrixTranslatefEXT _al_glMatrixTranslatefEXT +#define glMatrixTranslatedEXT _al_glMatrixTranslatedEXT +#define glMatrixFrustumEXT _al_glMatrixFrustumEXT +#define glMatrixOrthoEXT _al_glMatrixOrthoEXT +#define glMatrixPopEXT _al_glMatrixPopEXT +#define glMatrixPushEXT _al_glMatrixPushEXT +#define glMatrixLoadTransposefEXT _al_glMatrixLoadTransposefEXT +#define glMatrixLoadTransposedEXT _al_glMatrixLoadTransposedEXT +#define glMatrixMultTransposefEXT _al_glMatrixMultTransposefEXT +#define glMatrixMultTransposedEXT _al_glMatrixMultTransposedEXT +#define glTextureParameterfEXT _al_glTextureParameterfEXT +#define glTextureParameterfvEXT _al_glTextureParameterfvEXT +#define glTextureParameteriEXT _al_glTextureParameteriEXT +#define glTextureParameterivEXT _al_glTextureParameterivEXT +#define glTextureImage1DEXT _al_glTextureImage1DEXT +#define glTextureImage2DEXT _al_glTextureImage2DEXT +#define glTextureSubImage1DEXT _al_glTextureSubImage1DEXT +#define glTextureSubImage2DEXT _al_glTextureSubImage2DEXT +#define glCopyTextureImage1DEXT _al_glCopyTextureImage1DEXT +#define glCopyTextureImage2DEXT _al_glCopyTextureImage2DEXT +#define glCopyTextureSubImage1DEXT _al_glCopyTextureSubImage1DEXT +#define glCopyTextureSubImage2DEXT _al_glCopyTextureSubImage2DEXT +#define glGetTextureImageEXT _al_glGetTextureImageEXT +#define glGetTextureParameterfvEXT _al_glGetTextureParameterfvEXT +#define glGetTextureParameterivEXT _al_glGetTextureParameterivEXT +#define glGetTextureLevelParameterfvEXT _al_glGetTextureLevelParameterfvEXT +#define glGetTextureLevelParameterivEXT _al_glGetTextureLevelParameterivEXT +#define glTextureImage3DEXT _al_glTextureImage3DEXT +#define glTextureSubImage3DEXT _al_glTextureSubImage3DEXT +#define glCopyTextureSubImage3DEXT _al_glCopyTextureSubImage3DEXT +#define glMultiTexParameterfEXT _al_glMultiTexParameterfEXT +#define glMultiTexParameterfvEXT _al_glMultiTexParameterfvEXT +#define glMultiTexParameteriEXT _al_glMultiTexParameteriEXT +#define glMultiTexParameterivEXT _al_glMultiTexParameterivEXT +#define glMultiTexImage1DEXT _al_glMultiTexImage1DEXT +#define glMultiTexImage2DEXT _al_glMultiTexImage2DEXT +#define glMultiTexSubImage1DEXT _al_glMultiTexSubImage1DEXT +#define glMultiTexSubImage2DEXT _al_glMultiTexSubImage2DEXT +#define glCopyMultiTexImage1DEXT _al_glCopyMultiTexImage1DEXT +#define glCopyMultiTexImage2DEXT _al_glCopyMultiTexImage2DEXT +#define glCopyMultiTexSubImage1DEXT _al_glCopyMultiTexSubImage1DEXT +#define glCopyMultiTexSubImage2DEXT _al_glCopyMultiTexSubImage2DEXT +#define glGetMultiTexImageEXT _al_glGetMultiTexImageEXT +#define glGetMultiTexParameterfvEXT _al_glGetMultiTexParameterfvEXT +#define glGetMultiTexParameterivEXT _al_glGetMultiTexParameterivEXT +#define glGetMultiTexLevelParameterfvEXT _al_glGetMultiTexLevelParameterfvEXT +#define glGetMultiTexLevelParameterivEXT _al_glGetMultiTexLevelParameterivEXT +#define glMultiTexImage3DEXT _al_glMultiTexImage3DEXT +#define glMultiTexSubImage3DEXT _al_glMultiTexSubImage3DEXT +#define glCopyMultiTexSubImage3DEXT _al_glCopyMultiTexSubImage3DEXT +#define glBindMultiTextureEXT _al_glBindMultiTextureEXT +#define glEnableClientStateIndexedEXT _al_glEnableClientStateIndexedEXT +#define glDisableClientStateIndexedEXT _al_glDisableClientStateIndexedEXT +#define glMultiTexCoordPointerEXT _al_glMultiTexCoordPointerEXT +#define glMultiTexEnvfEXT _al_glMultiTexEnvfEXT +#define glMultiTexEnvfvEXT _al_glMultiTexEnvfvEXT +#define glMultiTexEnviEXT _al_glMultiTexEnviEXT +#define glMultiTexEnvivEXT _al_glMultiTexEnvivEXT +#define glMultiTexGendEXT _al_glMultiTexGendEXT +#define glMultiTexGendvEXT _al_glMultiTexGendvEXT +#define glMultiTexGenfEXT _al_glMultiTexGenfEXT +#define glMultiTexGenfvEXT _al_glMultiTexGenfvEXT +#define glMultiTexGeniEXT _al_glMultiTexGeniEXT +#define glMultiTexGenivEXT _al_glMultiTexGenivEXT +#define glGetMultiTexEnvfvEXT _al_glGetMultiTexEnvfvEXT +#define glGetMultiTexEnvivEXT _al_glGetMultiTexEnvivEXT +#define glGetMultiTexGendvEXT _al_glGetMultiTexGendvEXT +#define glGetMultiTexGenfvEXT _al_glGetMultiTexGenfvEXT +#define glGetMultiTexGenivEXT _al_glGetMultiTexGenivEXT +#define glGetFloatIndexedvEXT _al_glGetFloatIndexedvEXT +#define glGetDoubleIndexedvEXT _al_glGetDoubleIndexedvEXT +#define glGetPointerIndexedvEXT _al_glGetPointerIndexedvEXT +#define glCompressedTextureImage3DEXT _al_glCompressedTextureImage3DEXT +#define glCompressedTextureImage2DEXT _al_glCompressedTextureImage2DEXT +#define glCompressedTextureImage1DEXT _al_glCompressedTextureImage1DEXT +#define glCompressedTextureSubImage3DEXT _al_glCompressedTextureSubImage3DEXT +#define glCompressedTextureSubImage2DEXT _al_glCompressedTextureSubImage2DEXT +#define glCompressedTextureSubImage1DEXT _al_glCompressedTextureSubImage1DEXT +#define glGetCompressedTextureImageEXT _al_glGetCompressedTextureImageEXT +#define glCompressedMultiTexImage3DEXT _al_glCompressedMultiTexImage3DEXT +#define glCompressedMultiTexImage2DEXT _al_glCompressedMultiTexImage2DEXT +#define glCompressedMultiTexImage1DEXT _al_glCompressedMultiTexImage1DEXT +#define glCompressedMultiTexSubImage3DEXT _al_glCompressedMultiTexSubImage3DEXT +#define glCompressedMultiTexSubImage2DEXT _al_glCompressedMultiTexSubImage2DEXT +#define glCompressedMultiTexSubImage1DEXT _al_glCompressedMultiTexSubImage1DEXT +#define glGetCompressedMultiTexImageEXT _al_glGetCompressedMultiTexImageEXT +#define glNamedProgramStringEXT _al_glNamedProgramStringEXT +#define glNamedProgramLocalParameter4dEXT _al_glNamedProgramLocalParameter4dEXT +#define glNamedProgramLocalParameter4dvEXT _al_glNamedProgramLocalParameter4dvEXT +#define glNamedProgramLocalParameter4fEXT _al_glNamedProgramLocalParameter4fEXT +#define glNamedProgramLocalParameter4fvEXT _al_glNamedProgramLocalParameter4fvEXT +#define glGetNamedProgramLocalParameterdvEXT _al_glGetNamedProgramLocalParameterdvEXT +#define glGetNamedProgramLocalParameterfvEXT _al_glGetNamedProgramLocalParameterfvEXT +#define glGetNamedProgramivEXT _al_glGetNamedProgramivEXT +#define glGetNamedProgramStringEXT _al_glGetNamedProgramStringEXT +#define glNamedProgramLocalParameters4fvEXT _al_glNamedProgramLocalParameters4fvEXT +#define glNamedProgramLocalParameterI4iEXT _al_glNamedProgramLocalParameterI4iEXT +#define glNamedProgramLocalParameterI4ivEXT _al_glNamedProgramLocalParameterI4ivEXT +#define glNamedProgramLocalParametersI4ivEXT _al_glNamedProgramLocalParametersI4ivEXT +#define glNamedProgramLocalParameterI4uiEXT _al_glNamedProgramLocalParameterI4uiEXT +#define glNamedProgramLocalParameterI4uivEXT _al_glNamedProgramLocalParameterI4uivEXT +#define glNamedProgramLocalParametersI4uivEXT _al_glNamedProgramLocalParametersI4uivEXT +#define glGetNamedProgramLocalParameterIivEXT _al_glGetNamedProgramLocalParameterIivEXT +#define glGetNamedProgramLocalParameterIuivEXT _al_glGetNamedProgramLocalParameterIuivEXT +#define glTextureParameterIivEXT _al_glTextureParameterIivEXT +#define glTextureParameterIuivEXT _al_glTextureParameterIuivEXT +#define glGetTextureParameterIivEXT _al_glGetTextureParameterIivEXT +#define glGetTextureParameterIuivEXT _al_glGetTextureParameterIuivEXT +#define glMultiTexParameterIivEXT _al_glMultiTexParameterIivEXT +#define glMultiTexParameterIuivEXT _al_glMultiTexParameterIuivEXT +#define glGetMultiTexParameterIivEXT _al_glGetMultiTexParameterIivEXT +#define glGetMultiTexParameterIuivEXT _al_glGetMultiTexParameterIuivEXT +#define glProgramUniform1fEXT _al_glProgramUniform1fEXT +#define glProgramUniform2fEXT _al_glProgramUniform2fEXT +#define glProgramUniform3fEXT _al_glProgramUniform3fEXT +#define glProgramUniform4fEXT _al_glProgramUniform4fEXT +#define glProgramUniform1iEXT _al_glProgramUniform1iEXT +#define glProgramUniform2iEXT _al_glProgramUniform2iEXT +#define glProgramUniform3iEXT _al_glProgramUniform3iEXT +#define glProgramUniform4iEXT _al_glProgramUniform4iEXT +#define glProgramUniform1fvEXT _al_glProgramUniform1fvEXT +#define glProgramUniform2fvEXT _al_glProgramUniform2fvEXT +#define glProgramUniform3fvEXT _al_glProgramUniform3fvEXT +#define glProgramUniform4fvEXT _al_glProgramUniform4fvEXT +#define glProgramUniform1ivEXT _al_glProgramUniform1ivEXT +#define glProgramUniform2ivEXT _al_glProgramUniform2ivEXT +#define glProgramUniform3ivEXT _al_glProgramUniform3ivEXT +#define glProgramUniform4ivEXT _al_glProgramUniform4ivEXT +#define glProgramUniformMatrix2fvEXT _al_glProgramUniformMatrix2fvEXT +#define glProgramUniformMatrix3fvEXT _al_glProgramUniformMatrix3fvEXT +#define glProgramUniformMatrix4fvEXT _al_glProgramUniformMatrix4fvEXT +#define glProgramUniformMatrix2x3fvEXT _al_glProgramUniformMatrix2x3fvEXT +#define glProgramUniformMatrix3x2fvEXT _al_glProgramUniformMatrix3x2fvEXT +#define glProgramUniformMatrix2x4fvEXT _al_glProgramUniformMatrix2x4fvEXT +#define glProgramUniformMatrix4x2fvEXT _al_glProgramUniformMatrix4x2fvEXT +#define glProgramUniformMatrix3x4fvEXT _al_glProgramUniformMatrix3x4fvEXT +#define glProgramUniformMatrix4x3fvEXT _al_glProgramUniformMatrix4x3fvEXT +#define glProgramUniform1uiEXT _al_glProgramUniform1uiEXT +#define glProgramUniform2uiEXT _al_glProgramUniform2uiEXT +#define glProgramUniform3uiEXT _al_glProgramUniform3uiEXT +#define glProgramUniform4uiEXT _al_glProgramUniform4uiEXT +#define glProgramUniform1uivEXT _al_glProgramUniform1uivEXT +#define glProgramUniform2uivEXT _al_glProgramUniform2uivEXT +#define glProgramUniform3uivEXT _al_glProgramUniform3uivEXT +#define glProgramUniform4uivEXT _al_glProgramUniform4uivEXT +#define glNamedBufferDataEXT _al_glNamedBufferDataEXT +#define glNamedBufferSubDataEXT _al_glNamedBufferSubDataEXT +#define glMapNamedBufferEXT _al_glMapNamedBufferEXT +#define glUnmapNamedBufferEXT _al_glUnmapNamedBufferEXT +#define glGetNamedBufferParameterivEXT _al_glGetNamedBufferParameterivEXT +#define glGetNamedBufferPointervEXT _al_glGetNamedBufferPointervEXT +#define glGetNamedBufferSubDataEXT _al_glGetNamedBufferSubDataEXT +#define glTextureBufferEXT _al_glTextureBufferEXT +#define glMultiTexBufferEXT _al_glMultiTexBufferEXT +#define glNamedRenderbufferStorageEXT _al_glNamedRenderbufferStorageEXT +#define glGetNamedRenderbufferParameterivEXT _al_glGetNamedRenderbufferParameterivEXT +#define glCheckNamedFramebufferStatusEXT _al_glCheckNamedFramebufferStatusEXT +#define glNamedFramebufferTexture1DEXT _al_glNamedFramebufferTexture1DEXT +#define glNamedFramebufferTexture2DEXT _al_glNamedFramebufferTexture2DEXT +#define glNamedFramebufferTexture3DEXT _al_glNamedFramebufferTexture3DEXT +#define glNamedFramebufferRenderbufferEXT _al_glNamedFramebufferRenderbufferEXT +#define glGetNamedFramebufferAttachmentParameterivEXT _al_glGetNamedFramebufferAttachmentParameterivEXT +#define glGenerateTextureMipmapEXT _al_glGenerateTextureMipmapEXT +#define glGenerateMultiTexMipmapEXT _al_glGenerateMultiTexMipmapEXT +#define glFramebufferDrawBufferEXT _al_glFramebufferDrawBufferEXT +#define glFramebufferDrawBuffersEXT _al_glFramebufferDrawBuffersEXT +#define glFramebufferReadBufferEXT _al_glFramebufferReadBufferEXT +#define glGetFramebufferParameterivEXT _al_glGetFramebufferParameterivEXT +#define glNamedRenderbufferStorageMultisampleEXT _al_glNamedRenderbufferStorageMultisampleEXT +#define glNamedRenderbufferStorageMultisampleCoverageEXT _al_glNamedRenderbufferStorageMultisampleCoverageEXT +#define glNamedFramebufferTextureEXT _al_glNamedFramebufferTextureEXT +#define glNamedFramebufferTextureLayerEXT _al_glNamedFramebufferTextureLayerEXT +#define glNamedFramebufferTextureFaceEXT _al_glNamedFramebufferTextureFaceEXT +#define glTextureRenderbufferEXT _al_glTextureRenderbufferEXT +#define glMultiTexRenderbufferEXT _al_glMultiTexRenderbufferEXT +#endif + +#if defined _ALLEGRO_GL_NV_explicit_multisample +#define glGetMultisamplefvNV _al_glGetMultisamplefvNV +#define glSampleMaskIndexedNV _al_glSampleMaskIndexedNV +#define glTexRenderbufferNV _al_glTexRenderbufferNV +#endif + +#if defined _ALLEGRO_GL_NV_transform_feedback2 +#define glBindTransformFeedbackNV _al_glBindTransformFeedbackNV +#define glDeleteTransformFeedbacksNV _al_glDeleteTransformFeedbacksNV +#define glGenTransformFeedbacksNV _al_glGenTransformFeedbacksNV +#define glIsTransformFeedbackNV _al_glIsTransformFeedbackNV +#define glPauseTransformFeedbackNV _al_glPauseTransformFeedbackNV +#define glResumeTransformFeedbackNV _al_glResumeTransformFeedbackNV +#define glDrawTransformFeedbackNV _al_glDrawTransformFeedbackNV +#endif + +#if defined _ALLEGRO_GL_AMD_performance_monitor +#define glGetPerfMonitorGroupsAMD _al_glGetPerfMonitorGroupsAMD +#define glGetPerfMonitorCountersAMD _al_glGetPerfMonitorCountersAMD +#define glGetPerfMonitorGroupStringAMD _al_glGetPerfMonitorGroupStringAMD +#define glGetPerfMonitorCounterStringAMD _al_glGetPerfMonitorCounterStringAMD +#define glGetPerfMonitorCounterInfoAMD _al_glGetPerfMonitorCounterInfoAMD +#define glGenPerfMonitorsAMD _al_glGenPerfMonitorsAMD +#define glDeletePerfMonitorsAMD _al_glDeletePerfMonitorsAMD +#define glSelectPerfMonitorCountersAMD _al_glSelectPerfMonitorCountersAMD +#define glBeginPerfMonitorAMD _al_glBeginPerfMonitorAMD +#define glEndPerfMonitorAMD _al_glEndPerfMonitorAMD +#define glGetPerfMonitorCounterDataAMD _al_glGetPerfMonitorCounterDataAMD +#endif + +#if defined _ALLEGRO_GL_AMD_vertex_shader_tesselator +#define glTessellationFactorAMD _al_glTessellationFactorAMD +#define glTessellationModeAMD _al_glTessellationModeAMD +#endif + +#if defined _ALLEGRO_GL_EXT_provoking_vertex +#define glProvokingVertexEXT _al_glProvokingVertexEXT +#endif + +#if defined _ALLEGRO_GL_AMD_draw_buffers_blend +#define glBlendFuncIndexedAMD _al_glBlendFuncIndexedAMD +#define glBlendFuncSeparateIndexedAMD _al_glBlendFuncSeparateIndexedAMD +#define glBlendEquationIndexedAMD _al_glBlendEquationIndexedAMD +#define glBlendEquationSeparateIndexedAMD _al_glBlendEquationSeparateIndexedAMD +#endif + +#if defined _ALLEGRO_GL_APPLE_texture_range +#define glTextureRangeAPPLE _al_glTextureRangeAPPLE +#define glGetTexParameterPointervAPPLE _al_glGetTexParameterPointervAPPLE +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_program_evaluators +#define glEnableVertexAttribAPPLE _al_glEnableVertexAttribAPPLE +#define glDisableVertexAttribAPPLE _al_glDisableVertexAttribAPPLE +#define glIsVertexAttribEnabledAPPLE _al_glIsVertexAttribEnabledAPPLE +#define glMapVertexAttrib1dAPPLE _al_glMapVertexAttrib1dAPPLE +#define glMapVertexAttrib1fAPPLE _al_glMapVertexAttrib1fAPPLE +#define glMapVertexAttrib2dAPPLE _al_glMapVertexAttrib2dAPPLE +#define glMapVertexAttrib2fAPPLE _al_glMapVertexAttrib2fAPPLE +#endif + +#if defined _ALLEGRO_GL_APPLE_object_purgeable +#define glObjectPurgeableAPPLE _al_glObjectPurgeableAPPLE +#define glObjectUnpurgeableAPPLE _al_glObjectUnpurgeableAPPLE +#define glGetObjectParameterivAPPLE _al_glGetObjectParameterivAPPLE +#endif + +#if defined _ALLEGRO_GL_NV_video_capture +#define glBeginVideoCaptureNV _al_glBeginVideoCaptureNV +#define glBindVideoCaptureStreamBufferNV _al_glBindVideoCaptureStreamBufferNV +#define glBindVideoCaptureStreamTextureNV _al_glBindVideoCaptureStreamTextureNV +#define glEndVideoCaptureNV _al_glEndVideoCaptureNV +#define glGetVideoCaptureivNV _al_glGetVideoCaptureivNV +#define glGetVideoCaptureStreamivNV _al_glGetVideoCaptureStreamivNV +#define glGetVideoCaptureStreamfvNV _al_glGetVideoCaptureStreamfvNV +#define glGetVideoCaptureStreamdvNV _al_glGetVideoCaptureStreamdvNV +#define glVideoCaptureNV _al_glVideoCaptureNV +#define glVideoCaptureStreamParameterivNV _al_glVideoCaptureStreamParameterivNV +#define glVideoCaptureStreamParameterfvNV _al_glVideoCaptureStreamParameterfvNV +#define glVideoCaptureStreamParameterdvNV _al_glVideoCaptureStreamParameterdvNV +#endif + +#if defined _ALLEGRO_GL_EXT_separate_shader_objects +#define glUseShaderProgramEXT _al_glUseShaderProgramEXT +#define glActiveProgramEXT _al_glActiveProgramEXT +#define glCreateShaderProgramEXT _al_glCreateShaderProgramEXT +#endif + +#if defined _ALLEGRO_GL_NV_shader_buffer_load +#define glMakeBufferResidentNV _al_glMakeBufferResidentNV +#define glMakeBufferNonResidentNV _al_glMakeBufferNonResidentNV +#define glIsBufferResidentNV _al_glIsBufferResidentNV +#define glMakeNamedBufferResidentNV _al_glMakeNamedBufferResidentNV +#define glMakeNamedBufferNonResidentNV _al_glMakeNamedBufferNonResidentNV +#define glIsNamedBufferResidentNV _al_glIsNamedBufferResidentNV +#define glGetBufferParameterui64vNV _al_glGetBufferParameterui64vNV +#define glGetNamedBufferParameterui64vNV _al_glGetNamedBufferParameterui64vNV +#define glGetIntegerui64vNV _al_glGetIntegerui64vNV +#define glUniformui64NV _al_glUniformui64NV +#define glUniformui64vNV _al_glUniformui64vNV +#define glGetUniformui64vNV _al_glGetUniformui64vNV +#define glProgramUniformui64NV _al_glProgramUniformui64NV +#define glProgramUniformui64vNV _al_glProgramUniformui64vNV +#endif + +#if defined _ALLEGRO_GL_NV_vertex_buffer_unified_memory +#define glBufferAddressRangeNV _al_glBufferAddressRangeNV +#define glVertexFormatNV _al_glVertexFormatNV +#define glNormalFormatNV _al_glNormalFormatNV +#define glColorFormatNV _al_glColorFormatNV +#define glIndexFormatNV _al_glIndexFormatNV +#define glTexCoordFormatNV _al_glTexCoordFormatNV +#define glEdgeFlagFormatNV _al_glEdgeFlagFormatNV +#define glSecondaryColorFormatNV _al_glSecondaryColorFormatNV +#define glFogCoordFormatNV _al_glFogCoordFormatNV +#define glVertexAttribFormatNV _al_glVertexAttribFormatNV +#define glVertexAttribIFormatNV _al_glVertexAttribIFormatNV +#define glGetIntegerui64i_vNV _al_glGetIntegerui64i_vNV +#endif + +#if defined _ALLEGRO_GL_NV_texture_barrier +#define glTextureBarrierNV _al_glTextureBarrierNV +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_api.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_api.h new file mode 100644 index 0000000..1390371 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_api.h @@ -0,0 +1,2563 @@ +/* */ + +#ifdef _ALLEGRO_GL_VERSION_1_2 +AGL_API(void, BlendColor, (GLclampf, GLclampf, GLclampf, GLclampf)) +AGL_API(void, BlendEquation, (GLenum)) +AGL_API(void, DrawRangeElements, (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)) +AGL_API(void, ColorTable, (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ColorTableParameterfv, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, ColorTableParameteriv, (GLenum, GLenum, const GLint *)) +AGL_API(void, CopyColorTable, (GLenum, GLenum, GLint, GLint, GLsizei)) +AGL_API(void, GetColorTable, (GLenum, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetColorTableParameterfv, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetColorTableParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(void, ColorSubTable, (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyColorSubTable, (GLenum, GLsizei, GLint, GLint, GLsizei)) +AGL_API(void, TexImage3D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TexSubImage3D, (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyTexSubImage3D, (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_ARB_imaging +AGL_API(void, ConvolutionFilter1D, (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ConvolutionFilter2D, (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ConvolutionParameterf, (GLenum, GLenum, GLfloat)) +AGL_API(void, ConvolutionParameterfv, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, ConvolutionParameteri, (GLenum, GLenum, GLint)) +AGL_API(void, ConvolutionParameteriv, (GLenum, GLenum, const GLint *)) +AGL_API(void, CopyConvolutionFilter1D, (GLenum, GLenum, GLint, GLint, GLsizei)) +AGL_API(void, CopyConvolutionFilter2D, (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, GetConvolutionFilter, (GLenum, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetConvolutionParameterfv, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetConvolutionParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(void, GetSeparableFilter, (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)) +AGL_API(void, SeparableFilter2D, (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)) +AGL_API(void, GetHistogram, (GLenum, GLboolean, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetHistogramParameterfv, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetHistogramParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(void, GetMinmax, (GLenum, GLboolean, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetMinmaxParameterfv, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMinmaxParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(void, Histogram, (GLenum, GLsizei, GLenum, GLboolean)) +AGL_API(void, Minmax, (GLenum, GLenum, GLboolean)) +AGL_API(void, ResetHistogram, (GLenum)) +AGL_API(void, ResetMinmax, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_VERSION_1_3 +AGL_API(void, ActiveTexture, (GLenum)) +AGL_API(void, ClientActiveTexture, (GLenum)) +AGL_API(void, MultiTexCoord1d, (GLenum, GLdouble)) +AGL_API(void, MultiTexCoord1dv, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord1f, (GLenum, GLfloat)) +AGL_API(void, MultiTexCoord1fv, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord1i, (GLenum, GLint)) +AGL_API(void, MultiTexCoord1iv, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord1s, (GLenum, GLshort)) +AGL_API(void, MultiTexCoord1sv, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord2d, (GLenum, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord2dv, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord2f, (GLenum, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord2fv, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord2i, (GLenum, GLint, GLint)) +AGL_API(void, MultiTexCoord2iv, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord2s, (GLenum, GLshort, GLshort)) +AGL_API(void, MultiTexCoord2sv, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord3d, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord3dv, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord3f, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord3fv, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord3i, (GLenum, GLint, GLint, GLint)) +AGL_API(void, MultiTexCoord3iv, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord3s, (GLenum, GLshort, GLshort, GLshort)) +AGL_API(void, MultiTexCoord3sv, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord4d, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord4dv, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord4f, (GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord4fv, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord4i, (GLenum, GLint, GLint, GLint, GLint)) +AGL_API(void, MultiTexCoord4iv, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord4s, (GLenum, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, MultiTexCoord4sv, (GLenum, const GLshort *)) +AGL_API(void, LoadTransposeMatrixf, (const GLfloat *)) +AGL_API(void, LoadTransposeMatrixd, (const GLdouble *)) +AGL_API(void, MultTransposeMatrixf, (const GLfloat *)) +AGL_API(void, MultTransposeMatrixd, (const GLdouble *)) +AGL_API(void, SampleCoverage, (GLclampf, GLboolean)) +AGL_API(void, CompressedTexImage3D, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexImage2D, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexImage1D, (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage3D, (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage2D, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage1D, (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetCompressedTexImage, (GLenum, GLint, GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_VERSION_1_4 +AGL_API(void, BlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, FogCoordf, (GLfloat)) +AGL_API(void, FogCoordfv, (const GLfloat *)) +AGL_API(void, FogCoordd, (GLdouble)) +AGL_API(void, FogCoorddv, (const GLdouble *)) +AGL_API(void, FogCoordPointer, (GLenum, GLsizei, const GLvoid *)) +AGL_API(void, MultiDrawArrays, (GLenum, GLint *, GLsizei *, GLsizei)) +AGL_API(void, MultiDrawElements, (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei)) +AGL_API(void, PointParameterf, (GLenum, GLfloat)) +AGL_API(void, PointParameterfv, (GLenum, const GLfloat *)) +AGL_API(void, PointParameteri, (GLenum, GLint)) +AGL_API(void, PointParameteriv, (GLenum, const GLint *)) +AGL_API(void, SecondaryColor3b, (GLbyte, GLbyte, GLbyte)) +AGL_API(void, SecondaryColor3bv, (const GLbyte *)) +AGL_API(void, SecondaryColor3d, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, SecondaryColor3dv, (const GLdouble *)) +AGL_API(void, SecondaryColor3f, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, SecondaryColor3fv, (const GLfloat *)) +AGL_API(void, SecondaryColor3i, (GLint, GLint, GLint)) +AGL_API(void, SecondaryColor3iv, (const GLint *)) +AGL_API(void, SecondaryColor3s, (GLshort, GLshort, GLshort)) +AGL_API(void, SecondaryColor3sv, (const GLshort *)) +AGL_API(void, SecondaryColor3ub, (GLubyte, GLubyte, GLubyte)) +AGL_API(void, SecondaryColor3ubv, (const GLubyte *)) +AGL_API(void, SecondaryColor3ui, (GLuint, GLuint, GLuint)) +AGL_API(void, SecondaryColor3uiv, (const GLuint *)) +AGL_API(void, SecondaryColor3us, (GLushort, GLushort, GLushort)) +AGL_API(void, SecondaryColor3usv, (const GLushort *)) +AGL_API(void, SecondaryColorPointer, (GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, WindowPos2d, (GLdouble, GLdouble)) +AGL_API(void, WindowPos2dv, (const GLdouble *)) +AGL_API(void, WindowPos2f, (GLfloat, GLfloat)) +AGL_API(void, WindowPos2fv, (const GLfloat *)) +AGL_API(void, WindowPos2i, (GLint, GLint)) +AGL_API(void, WindowPos2iv, (const GLint *)) +AGL_API(void, WindowPos2s, (GLshort, GLshort)) +AGL_API(void, WindowPos2sv, (const GLshort *)) +AGL_API(void, WindowPos3d, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, WindowPos3dv, (const GLdouble *)) +AGL_API(void, WindowPos3f, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, WindowPos3fv, (const GLfloat *)) +AGL_API(void, WindowPos3i, (GLint, GLint, GLint)) +AGL_API(void, WindowPos3iv, (const GLint *)) +AGL_API(void, WindowPos3s, (GLshort, GLshort, GLshort)) +AGL_API(void, WindowPos3sv, (const GLshort *)) +#endif + + +#if defined _ALLEGRO_GL_VERSION_1_5 +AGL_API(void, BindBuffer, (GLenum, GLuint)) +AGL_API(void, DeleteBuffers, (GLsizei, const GLuint *)) +AGL_API(void, GenBuffers, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsBuffer, (GLuint)) +AGL_API(void, BufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum)) +AGL_API(void, BufferSubData, (GLenum, GLintptr, GLsizeiptr, const GLvoid *)) +AGL_API(void, GetBufferSubData, (GLenum, GLintptr, GLsizeiptr, GLvoid *)) +AGL_API(GLvoid*, MapBuffer, (GLenum, GLenum)) +AGL_API(GLboolean, UnmapBuffer, (GLenum)) +AGL_API(void, GetBufferParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(void, GetBufferPointerv, (GLenum, GLenum, GLvoid* *)) +AGL_API(void, GenQueries, (GLsizei, GLuint *)) +AGL_API(void, DeleteQueries, (GLsizei, const GLuint *)) +AGL_API(GLboolean, IsQuery, (GLuint)) +AGL_API(void, BeginQuery, (GLenum, GLuint)) +AGL_API(void, EndQuery, (GLenum)) +AGL_API(void, GetQueryiv, (GLenum, GLenum, GLint *)) +AGL_API(void, GetQueryObjectiv, (GLuint, GLenum, GLint *)) +AGL_API(void, GetQueryObjectuiv, (GLuint, GLenum, GLuint *)) +#endif + + +#if defined _ALLEGRO_GL_VERSION_2_0 +AGL_API(void, BlendEquationSeparate, (GLenum, GLenum)) +AGL_API(GLuint, CreateProgram, (void)) +AGL_API(GLuint, CreateShader, (GLenum)) +AGL_API(void, DeleteProgram, (GLuint)) +AGL_API(void, DeleteShader, (GLuint)) +AGL_API(void, AttachShader, (GLuint, GLuint)) +AGL_API(void, DetachShader, (GLuint, GLuint)) +AGL_API(void, ShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *)) +AGL_API(void, CompileShader, (GLuint)) +AGL_API(GLboolean, IsProgram, (GLuint)) +AGL_API(GLboolean, IsShader, (GLuint)) +AGL_API(void, LinkProgram, (GLuint)) +AGL_API(void, UseProgram, (GLuint)) +AGL_API(void, ValidateProgram, (GLuint)) +AGL_API(void, Uniform1f, (GLint, GLfloat)) +AGL_API(void, Uniform2f, (GLint, GLfloat, GLfloat)) +AGL_API(void, Uniform3f, (GLint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Uniform4f, (GLint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Uniform1i, (GLint, GLint)) +AGL_API(void, Uniform2i, (GLint, GLint, GLint)) +AGL_API(void, Uniform3i, (GLint, GLint, GLint, GLint)) +AGL_API(void, Uniform4i, (GLint, GLint, GLint, GLint, GLint)) +AGL_API(void, Uniform1fv, (GLint, GLsizei, const GLfloat *)) +AGL_API(void, Uniform2fv, (GLint, GLsizei, const GLfloat *)) +AGL_API(void, Uniform3fv, (GLint, GLsizei, const GLfloat *)) +AGL_API(void, Uniform4fv, (GLint, GLsizei, const GLfloat *)) +AGL_API(void, Uniform1iv, (GLint, GLsizei, const GLint *)) +AGL_API(void, Uniform2iv, (GLint, GLsizei, const GLint *)) +AGL_API(void, Uniform3iv, (GLint, GLsizei, const GLint *)) +AGL_API(void, Uniform4iv, (GLint, GLsizei, const GLint *)) +AGL_API(void, UniformMatrix2fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix3fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, GetShaderfv, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetShaderiv, (GLuint, GLenum, GLint *)) +AGL_API(void, GetProgramfv, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetProgramiv, (GLuint, GLenum, GLint *)) +AGL_API(void, GetShaderInfoLog, (GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, GetProgramInfoLog, (GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, GetAttachedShaders, (GLuint, GLsizei, GLsizei *, GLuint *)) +AGL_API(GLint, GetUniformLocation, (GLuint, const GLchar *)) +AGL_API(void, GetActiveUniform, (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *)) +AGL_API(void, GetUniformfv, (GLuint, GLint, GLfloat *)) +AGL_API(void, GetUniformiv, (GLuint, GLint, GLint *)) +AGL_API(void, GetShaderSource, (GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, VertexAttrib1f, (GLuint, GLfloat)) +AGL_API(void, VertexAttrib1s, (GLuint, GLshort)) +AGL_API(void, VertexAttrib1d, (GLuint, GLdouble)) +AGL_API(void, VertexAttrib2f, (GLuint, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib2s, (GLuint, GLshort, GLshort)) +AGL_API(void, VertexAttrib2d, (GLuint, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib3f, (GLuint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib3s, (GLuint, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib3d, (GLuint, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib4f, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib4s, (GLuint, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib4d, (GLuint, GLdouble,GLdouble,GLdouble,GLdouble)) +AGL_API(void, VertexAttrib4Nub, (GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) +AGL_API(void, VertexAttrib1fv, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib1sv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib1dv, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib2fv, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib2sv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib2dv, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib3fv, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib3sv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib3dv, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4fv, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib4sv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4dv, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4iv, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4bv, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4ubv, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4usv, (GLuint, const GLushort *)) +AGL_API(void, VertexAttrib4uiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttrib4Nbv, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4Nsv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4Niv, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4Nubv, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4Nusv, (GLuint, const GLushort *)) +AGL_API(void, VertexAttrib4Nuiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribPointer,(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) +AGL_API(void, EnableVertexAttribArray, (GLuint)) +AGL_API(void, DisableVertexAttribArray, (GLuint)) + +AGL_API(void, BindAttribLocation, (GLuint, GLuint, const GLchar *)) +AGL_API(void, GetActiveAttrib, (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *)) +AGL_API(GLint, GetAttribLocation, (GLuint, const GLchar *)) +AGL_API(void, GetVertexAttribdv, (GLuint, GLenum, GLdouble *)) +AGL_API(void, GetVertexAttribfv, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVertexAttribiv, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribPointerv, (GLuint, GLenum, GLvoid **)) + +AGL_API(void, DrawBuffers, (GLsizei n, const GLenum *)) + +AGL_API(void, StencilOpSeparate, (GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, StencilFuncSeparate, (GLenum, GLenum, GLint, GLuint)) + +#endif + + +#if defined _ALLEGRO_GL_VERSION_2_1 +AGL_API(void, UniformMatrix2x3fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix3x2fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix2x4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix4x2fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix3x4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, UniformMatrix4x3fv, (GLint, GLsizei, GLboolean, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_VERSION_3_0 +/* OpenGL 3.0 also reuses entry points from these extensions: */ +/* ARB_framebuffer_object */ +/* ARB_map_buffer_range */ +/* ARB_vertex_array_object */ +AGL_API(void, ColorMaski, (GLuint, GLboolean, GLboolean, GLboolean, GLboolean)) +AGL_API(void, GetBooleani_v, (GLenum, GLuint, GLboolean *)) +AGL_API(void, GetIntegeri_v, (GLenum, GLuint, GLint *)) +AGL_API(void, Enablei, (GLenum, GLuint)) +AGL_API(void, Disablei, (GLenum, GLuint)) +AGL_API(GLboolean, IsEnabledi, (GLenum, GLuint)) +AGL_API(void, BeginTransformFeedback, (GLenum)) +AGL_API(void, EndTransformFeedback, (void)) +AGL_API(void, BindBufferRange, (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) +AGL_API(void, BindBufferBase, (GLenum, GLuint, GLuint)) +AGL_API(void, TransformFeedbackVaryings, (GLuint, GLsizei, const GLint *, GLenum)) +AGL_API(void, GetTransformFeedbackVarying, (GLuint, GLuint, GLint *)) +AGL_API(void, ClampColor, (GLenum, GLenum)) +AGL_API(void, BeginConditionalRender, (GLuint, GLenum)) +AGL_API(void, EndConditionalRender, (void)) +AGL_API(void, VertexAttribI1i, (GLuint, GLint)) +AGL_API(void, VertexAttribI2i, (GLuint, GLint, GLint)) +AGL_API(void, VertexAttribI3i, (GLuint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI4i, (GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI1ui, (GLuint, GLuint)) +AGL_API(void, VertexAttribI2ui, (GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI3ui, (GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI4ui, (GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI1iv, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI2iv, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI3iv, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI4iv, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI1uiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI2uiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI3uiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4uiv, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4bv, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttribI4sv, (GLuint, const GLshort *)) +AGL_API(void, VertexAttribI4ubv, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttribI4usv, (GLuint, const GLushort *)) +AGL_API(void, VertexAttribIPointer, (GLuint, GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetVertexAttribIiv, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribIuiv, (GLuint, GLenum, GLuint *)) +AGL_API(void, GetUniformuiv, (GLuint, GLint, GLuint *)) +AGL_API(void, BindFragDataLocation, (GLuint, GLuint, const GLchar *)) +AGL_API(GLint, GetFragDataLocation, (GLuint, const GLchar *)) +AGL_API(void, Uniform1ui, (GLint, GLuint)) +AGL_API(void, Uniform2ui, (GLint, GLuint, GLuint)) +AGL_API(void, Uniform3ui, (GLint, GLuint, GLuint, GLuint)) +AGL_API(void, Uniform4ui, (GLint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, Uniform1uiv, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform2uiv, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform3uiv, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform4uiv, (GLint, GLsizei, const GLuint *)) +AGL_API(void, TexParameterIiv, (GLenum, GLenum, const GLint *)) +AGL_API(void, TexParameterIuiv, (GLenum, GLenum, const GLuint *)) +AGL_API(void, GetTexParameterIiv, (GLenum, GLenum, GLint *)) +AGL_API(void, GetTexParameterIuiv, (GLenum, GLenum, GLuint *)) +AGL_API(void, ClearBufferiv, (GLenum, GLint, const GLint *)) +AGL_API(void, ClearBufferuiv, (GLenum, GLint, const GLuint *)) +AGL_API(void, ClearBufferfv, (GLenum, GLint, const GLfloat *)) +AGL_API(void, ClearBufferfi, (GLenum, GLint, GLfloat, GLint)) +AGL_API(const GLubyte *, GetStringi, (GLenum, GLuint)) +#endif + + +#if defined _ALLEGRO_GL_VERSION_3_1 +/* OpenGL 3.1 also reuses entry points from these extensions: */ +/* ARB_copy_buffer */ +/* ARB_uniform_buffer_object */ +AGL_API(void, DrawArraysInstanced, (GLenum, GLint, GLsizei, GLsizei)) +AGL_API(void, DrawElementsInstanced, (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) +AGL_API(void, TexBuffer, (GLenum, GLenum, GLuint)) +AGL_API(void, PrimitiveRestartIndex, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_VERSION_3_2 +/* OpenGL 3.2 also reuses entry points from these extensions: */ +/* ARB_draw_elements_base_vertex */ +/* ARB_provoking_vertex */ +/* ARB_sync */ +/* ARB_texture_multisample */ +AGL_API(void, GetInteger64i_v, (GLenum target, GLuint index, GLint64 *data)) +AGL_API(void, GetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) +AGL_API(void, ProgramParameteri, (GLuint program, GLenum pname, GLint value)) +AGL_API(void, FramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level)) +#endif + +#if defined _ALLEGRO_GL_VERSION_3_3 +/* OpenGL 3.3 also reuses entry points from these extensions: */ +/* ARB_blend_func_extended */ +/* ARB_sampler_objects */ +/* ARB_explicit_attrib_location, but it has none */ +/* ARB_occlusion_query2 (no entry points) */ +/* ARB_shader_bit_encoding (no entry points) */ +/* ARB_texture_rgb10_a2ui (no entry points) */ +/* ARB_texture_swizzle (no entry points) */ +/* ARB_timer_query */ +/* ARB_vertex_type_2_10_10_10_rev */ +#endif + + +/* */ +/* */ + +#ifdef _ALLEGRO_GL_ARB_multitexture +AGL_API(void, ActiveTextureARB, (GLenum)) +AGL_API(void, ClientActiveTextureARB, (GLenum)) +AGL_API(void, MultiTexCoord1dARB, (GLenum, GLdouble)) +AGL_API(void, MultiTexCoord1dvARB, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord1fARB, (GLenum, GLfloat)) +AGL_API(void, MultiTexCoord1fvARB, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord1iARB, (GLenum, GLint)) +AGL_API(void, MultiTexCoord1ivARB, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord1sARB, (GLenum, GLshort)) +AGL_API(void, MultiTexCoord1svARB, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord2dARB, (GLenum, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord2dvARB, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord2fARB, (GLenum, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord2fvARB, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord2iARB, (GLenum, GLint, GLint)) +AGL_API(void, MultiTexCoord2ivARB, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord2sARB, (GLenum, GLshort, GLshort)) +AGL_API(void, MultiTexCoord2svARB, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord3dARB, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord3dvARB, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord3fARB, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord3fvARB, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord3iARB, (GLenum, GLint, GLint, GLint)) +AGL_API(void, MultiTexCoord3ivARB, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord3sARB, (GLenum, GLshort, GLshort, GLshort)) +AGL_API(void, MultiTexCoord3svARB, (GLenum, const GLshort *)) +AGL_API(void, MultiTexCoord4dARB, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MultiTexCoord4dvARB, (GLenum, const GLdouble *)) +AGL_API(void, MultiTexCoord4fARB, (GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MultiTexCoord4fvARB, (GLenum, const GLfloat *)) +AGL_API(void, MultiTexCoord4iARB, (GLenum, GLint, GLint, GLint, GLint)) +AGL_API(void, MultiTexCoord4ivARB, (GLenum, const GLint *)) +AGL_API(void, MultiTexCoord4sARB, (GLenum, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, MultiTexCoord4svARB, (GLenum, const GLshort *)) +#endif + +#if defined _ALLEGRO_GL_ARB_transpose_matrix +AGL_API(void, LoadTransposeMatrixfARB, (const GLfloat *)) +AGL_API(void, LoadTransposeMatrixdARB, (const GLdouble *)) +AGL_API(void, MultTransposeMatrixfARB, (const GLfloat *)) +AGL_API(void, MultTransposeMatrixdARB, (const GLdouble *)) +#endif + +#if defined _ALLEGRO_GL_ARB_multisample +AGL_API(void, SampleCoverageARB, (GLclampf, GLboolean)) +#endif + +#if defined _ALLEGRO_GL_ARB_texture_compression +AGL_API(void, CompressedTexImage3DARB, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexImage2DARB, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexImage1DARB, (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage3DARB, (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage2DARB, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTexSubImage1DARB, (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetCompressedTexImageARB, (GLenum, GLint, GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_ARB_point_parameters +AGL_API(void, PointParameterfARB, (GLenum, GLfloat)) +AGL_API(void, PointParameterfvARB, (GLenum, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_blend +AGL_API(void, WeightbvARB, (GLint, const GLbyte *)) +AGL_API(void, WeightsvARB, (GLint, const GLshort *)) +AGL_API(void, WeightivARB, (GLint, const GLint *)) +AGL_API(void, WeightfvARB, (GLint, const GLfloat *)) +AGL_API(void, WeightdvARB, (GLint, const GLdouble *)) +AGL_API(void, WeightubvARB, (GLint, const GLubyte *)) +AGL_API(void, WeightusvARB, (GLint, const GLushort *)) +AGL_API(void, WeightuivARB, (GLint, const GLuint *)) +AGL_API(void, WeightPointerARB, (GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, VertexBlendARB, (GLint)) +#endif + +#if defined _ALLEGRO_GL_ARB_matrix_palette +AGL_API(void, CurrentPaletteMatrixARB, (GLint)) +AGL_API(void, MatrixIndexubvARB, (GLint, const GLubyte *)) +AGL_API(void, MatrixIndexusvARB, (GLint, const GLushort *)) +AGL_API(void, MatrixIndexuivARB, (GLint, const GLuint *)) +AGL_API(void, MatrixIndexPointerARB, (GLint, GLenum, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_ARB_window_pos +AGL_API(void, WindowPos2dARB, (GLdouble, GLdouble)) +AGL_API(void, WindowPos2dvARB, (const GLdouble *)) +AGL_API(void, WindowPos2fARB, (GLfloat, GLfloat)) +AGL_API(void, WindowPos2fvARB, (const GLfloat *)) +AGL_API(void, WindowPos2iARB, (GLint, GLint)) +AGL_API(void, WindowPos2ivARB, (const GLint *)) +AGL_API(void, WindowPos2sARB, (GLshort, GLshort)) +AGL_API(void, WindowPos2svARB, (const GLshort *)) +AGL_API(void, WindowPos3dARB, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, WindowPos3dvARB, (const GLdouble *)) +AGL_API(void, WindowPos3fARB, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, WindowPos3fvARB, (const GLfloat *)) +AGL_API(void, WindowPos3iARB, (GLint, GLint, GLint)) +AGL_API(void, WindowPos3ivARB, (const GLint *)) +AGL_API(void, WindowPos3sARB, (GLshort, GLshort, GLshort)) +AGL_API(void, WindowPos3svARB, (const GLshort *)) +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_program +AGL_API(void, VertexAttrib1dARB, (GLuint, GLdouble)) +AGL_API(void, VertexAttrib1dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib1fARB, (GLuint, GLfloat)) +AGL_API(void, VertexAttrib1fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib1sARB, (GLuint, GLshort)) +AGL_API(void, VertexAttrib1svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib2dARB, (GLuint, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib2dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib2fARB, (GLuint, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib2fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib2sARB, (GLuint, GLshort, GLshort)) +AGL_API(void, VertexAttrib2svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib3dARB, (GLuint, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib3dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib3fARB, (GLuint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib3fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib3sARB, (GLuint, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib3svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4NbvARB, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4NivARB, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4NsvARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4NubARB, (GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) +AGL_API(void, VertexAttrib4NubvARB, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4NuivARB, (GLuint, const GLuint *)) +AGL_API(void, VertexAttrib4NusvARB, (GLuint, const GLushort *)) +AGL_API(void, VertexAttrib4bvARB, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4dARB, (GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib4dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4fARB, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib4fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib4ivARB, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4sARB, (GLuint, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib4svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4ubvARB, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4uivARB, (GLuint, const GLuint *)) +AGL_API(void, VertexAttrib4usvARB, (GLuint, const GLushort *)) +AGL_API(void, VertexAttribPointerARB, (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) +AGL_API(void, EnableVertexAttribArrayARB, (GLuint)) +AGL_API(void, DisableVertexAttribArrayARB, (GLuint)) +AGL_API(void, ProgramStringARB, (GLenum, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, BindProgramARB, (GLenum, GLuint)) +AGL_API(void, DeleteProgramsARB, (GLsizei, const GLuint *)) +AGL_API(void, GenProgramsARB, (GLsizei, GLuint *)) +AGL_API(void, ProgramEnvParameter4dARB, (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, ProgramEnvParameter4dvARB, (GLenum, GLuint, const GLdouble *)) +AGL_API(void, ProgramEnvParameter4fARB, (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramEnvParameter4fvARB, (GLenum, GLuint, const GLfloat *)) +AGL_API(void, ProgramLocalParameter4dARB, (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, ProgramLocalParameter4dvARB, (GLenum, GLuint, const GLdouble *)) +AGL_API(void, ProgramLocalParameter4fARB, (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramLocalParameter4fvARB, (GLenum, GLuint, const GLfloat *)) +AGL_API(void, GetProgramEnvParameterdvARB, (GLenum, GLuint, GLdouble *)) +AGL_API(void, GetProgramEnvParameterfvARB, (GLenum, GLuint, GLfloat *)) +AGL_API(void, GetProgramLocalParameterdvARB, (GLenum, GLuint, GLdouble *)) +AGL_API(void, GetProgramLocalParameterfvARB, (GLenum, GLuint, GLfloat *)) +AGL_API(void, GetProgramivARB, (GLenum, GLenum, GLint *)) +AGL_API(void, GetProgramStringARB, (GLenum, GLenum, GLvoid *)) +AGL_API(void, GetVertexAttribdvARB, (GLuint, GLenum, GLdouble *)) +AGL_API(void, GetVertexAttribfvARB, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVertexAttribivARB, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribPointervARB, (GLuint, GLenum, GLvoid* *)) +AGL_API(GLboolean, IsProgramARB, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_buffer_object +AGL_API(void, BindBufferARB, (GLenum, GLuint)) +AGL_API(void, DeleteBuffersARB, (GLsizei, const GLuint *)) +AGL_API(void, GenBuffersARB, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsBufferARB, (GLuint)) +AGL_API(void, BufferDataARB, (GLenum, GLsizeiptrARB, const GLvoid *, GLenum)) +AGL_API(void, BufferSubDataARB, (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)) +AGL_API(void, GetBufferSubDataARB, (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)) +AGL_API(GLvoid*, MapBufferARB, (GLenum, GLenum)) +AGL_API(GLboolean, UnmapBufferARB, (GLenum)) +AGL_API(void, GetBufferParameterivARB, (GLenum, GLenum, GLint *)) +AGL_API(void, GetBufferPointervARB, (GLenum, GLenum, GLvoid* *)) +#endif + +#if defined _ALLEGRO_GL_ARB_occlusion_query +AGL_API(void, GenQueriesARB, (GLsizei, GLuint *)) +AGL_API(void, DeleteQueriesARB, (GLsizei, const GLuint *)) +AGL_API(GLboolean, IsQueryARB, (GLuint)) +AGL_API(void, BeginQueryARB, (GLenum, GLuint)) +AGL_API(void, EndQueryARB, (GLenum)) +AGL_API(void, GetQueryivARB, (GLenum, GLenum, GLint *)) +AGL_API(void, GetQueryObjectivARB, (GLuint, GLenum, GLint *)) +AGL_API(void, GetQueryObjectuivARB, (GLuint, GLenum, GLuint *)) +#endif + +#if defined _ALLEGRO_GL_ARB_shader_objects +AGL_API(void, DeleteObjectARB, (GLhandleARB)) +AGL_API(GLhandleARB, GetHandleARB, (GLenum)) +AGL_API(void, DetachObjectARB, (GLhandleARB, GLhandleARB)) +AGL_API(GLhandleARB, CreateShaderObjectARB, (GLenum)) +AGL_API(void, ShaderSourceARB, (GLhandleARB, GLsizei, const GLcharARB **, const GLint *)) +AGL_API(void, CompileShaderARB, (GLhandleARB)) +AGL_API(GLhandleARB, CreateProgramObjectARB, (void)) +AGL_API(void, AttachObjectARB, (GLhandleARB, GLhandleARB)) +AGL_API(void, LinkProgramARB, (GLhandleARB)) +AGL_API(void, UseProgramObjectARB, (GLhandleARB)) +AGL_API(void, ValidateProgramARB, (GLhandleARB)) +AGL_API(void, Uniform1fARB, (GLint, GLfloat)) +AGL_API(void, Uniform2fARB, (GLint, GLfloat, GLfloat)) +AGL_API(void, Uniform3fARB, (GLint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Uniform4fARB, (GLint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Uniform1iARB, (GLint, GLint)) +AGL_API(void, Uniform2iARB, (GLint, GLint, GLint)) +AGL_API(void, Uniform3iARB, (GLint, GLint, GLint, GLint)) +AGL_API(void, Uniform4iARB, (GLint, GLint, GLint, GLint, GLint)) +AGL_API(void, Uniform1fvARB, (GLint, GLsizei, GLfloat *)) +AGL_API(void, Uniform2fvARB, (GLint, GLsizei, GLfloat *)) +AGL_API(void, Uniform3fvARB, (GLint, GLsizei, GLfloat *)) +AGL_API(void, Uniform4fvARB, (GLint, GLsizei, GLfloat *)) +AGL_API(void, Uniform1ivARB, (GLint, GLsizei, GLint *)) +AGL_API(void, Uniform2ivARB, (GLint, GLsizei, GLint *)) +AGL_API(void, Uniform3ivARB, (GLint, GLsizei, GLint *)) +AGL_API(void, Uniform4ivARB, (GLint, GLsizei, GLint *)) +AGL_API(void, UniformMatrix2fvARB, (GLint, GLsizei, GLboolean, GLfloat *)) +AGL_API(void, UniformMatrix3fvARB, (GLint, GLsizei, GLboolean, GLfloat *)) +AGL_API(void, UniformMatrix4fvARB, (GLint, GLsizei, GLboolean, GLfloat *)) +AGL_API(void, GetObjectParameterfvARB, (GLhandleARB, GLenum, GLfloat *)) +AGL_API(void, GetObjectParameterivARB, (GLhandleARB, GLenum, GLint *)) +AGL_API(void, GetInfoLogARB, (GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) +AGL_API(void, GetAttachedObjectsARB, (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)) +AGL_API(GLint, GetUniformLocationARB, (GLhandleARB, const GLcharARB *)) +AGL_API(void, GetActiveUniformARB, (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) +AGL_API(void, GetUniformfvARB, (GLhandleARB, GLint, GLfloat *)) +AGL_API(void, GetUniformivARB, (GLhandleARB, GLint, GLint *)) +AGL_API(void, GetShaderSourceARB, (GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) +#endif + +#ifdef _ALLEGRO_GL_ARB_vertex_shader +#ifndef GL_ARB_vertex_program +AGL_API(void, VertexAttrib1fARB, (GLuint, GLfloat)) +AGL_API(void, VertexAttrib1sARB, (GLuint, GLshort)) +AGL_API(void, VertexAttrib1dARB, (GLuint, GLdouble)) +AGL_API(void, VertexAttrib2fARB, (GLuint, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib2sARB, (GLuint, GLshort, GLshort)) +AGL_API(void, VertexAttrib2dARB, (GLuint, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib3fARB, (GLuint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib3sARB, (GLuint, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib3dARB, (GLuint, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib4fARB, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib4sARB, (GLuint, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib4dARB, (GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib4NubARB, (GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) +AGL_API(void, VertexAttrib1fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib1svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib1dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib2fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib2svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib2dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib3fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib3svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib3dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4fvARB, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib4svARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4dvARB, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4ivARB, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4bvARB, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4ubvARB, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4usvARB, (GLuint, const GLushort *)) +AGL_API(void, VertexAttrib4uivARB, (GLuint, const GLuint *)) +AGL_API(void, VertexAttrib4NbvARB, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttrib4NsvARB, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4NivARB, (GLuint, const GLint *)) +AGL_API(void, VertexAttrib4NubvARB, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttrib4NusvARB, (GLuint, const GLushort *)) +AGL_API(void, VertexAttrib4NuivARB, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribPointerARB, (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) +AGL_API(void, EnableVertexAttribArrayARB, (GLuint)) +AGL_API(void, DisableVertexAttribArrayARB, (GLuint)) +#endif +AGL_API(void, BindAttribLocationARB, (GLhandleARB, GLuint, const GLcharARB *)) +AGL_API(void, GetActiveAttribARB, (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) +AGL_API(GLint, GetAttribLocationARB, (GLhandleARB, const GLcharARB *)) +#ifndef GL_ARB_vertex_program +AGL_API(void, GetVertexAttribdvARB, (GLuint, GLenum, GLdouble *)) +AGL_API(void, GetVertexAttribfvARB, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVertexAttribivARB, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribPointervARB, (GLuint, GLenum, GLvoid **)) +#endif +#endif + +#if defined _ALLEGRO_GL_ARB_draw_buffers +AGL_API(void, DrawBuffersARB, (GLsizei n, const GLenum *bufs)) +#endif + +#if defined _ALLEGRO_GL_ARB_color_buffer_float +AGL_API(void, ClampColorARB, (GLenum, GLenum clamp)) +#endif + +#if defined _ALLEGRO_GL_ARB_draw_instanced +AGL_API(void, DrawArraysInstancedARB, (GLenum, GLint, GLsizei, GLsizei)) +AGL_API(void, DrawElementsInstancedARB, (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_ARB_framebuffer_object +AGL_API(GLboolean, IsRenderbuffer, (GLuint)) +AGL_API(void, BindRenderbuffer, (GLenum, GLuint)) +AGL_API(void, DeleteRenderbuffers, (GLsizei, const GLuint *)) +AGL_API(void, GenRenderbuffers, (GLsizei, GLuint *)) +AGL_API(void, RenderbufferStorage, (GLenum, GLenum, GLsizei, GLsizei)) +AGL_API(void, GetRenderbufferParameteriv, (GLenum, GLenum, GLint *)) +AGL_API(GLboolean, IsFramebuffer, (GLuint)) +AGL_API(void, BindFramebuffer, (GLenum, GLuint)) +AGL_API(void, DeleteFramebuffers, (GLsizei, const GLuint *)) +AGL_API(void, GenFramebuffers, (GLsizei, GLuint *)) +AGL_API(GLenum, CheckFramebufferStatus, (GLenum)) +AGL_API(void, FramebufferTexture1D, (GLenum, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, FramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, FramebufferTexture3D, (GLenum, GLenum, GLenum, GLuint, GLint, GLint)) +AGL_API(void, FramebufferRenderbuffer, (GLenum, GLenum, GLenum, GLuint)) +AGL_API(void, GetFramebufferAttachmentParameteriv, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GenerateMipmap, (GLenum)) +AGL_API(void, BlitFramebuffer, (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) +AGL_API(void, RenderbufferStorageMultisample, (GLenum, GLsizei, GLenum, GLsizei, GLsizei)) +AGL_API(void, FramebufferTextureLayer, (GLenum, GLenum, GLuint, GLint, GLint)) +#endif + +#if defined _ALLEGRO_GL_ARB_geometry_shader4 +AGL_API(void, ProgramParameteriARB, (GLuint, GLenum, GLint)) +AGL_API(void, FramebufferTextureARB, (GLenum, GLenum, GLuint, GLint)) +AGL_API(void, FramebufferTextureLayerARB, (GLenum, GLenum, GLuint, GLint, GLint)) +AGL_API(void, FramebufferTextureFaceARB, (GLenum, GLenum, GLuint, GLint, GLenum)) +#endif + +#if defined _ALLEGRO_GL_ARB_instanced_arrays +AGL_API(void, VertexAttribDivisor, (GLuint, GLuint)) +#endif + +#if defined _ALLEGRO_GL_ARB_map_buffer_range +AGL_API(void, MapBufferRange, (GLenum, GLintptr, GLsizeiptr, GLbitfield)) +AGL_API(void, FlushMappedBufferRange, (GLenum, GLintptr, GLsizeiptr)) +#endif + +#if defined _ALLEGRO_GL_ARB_texture_buffer_object +AGL_API(void, TexBufferARB, (GLenum, GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_array_object +AGL_API(void, BindVertexArray, (GLuint)) +AGL_API(void, DeleteVertexArrays, (GLsizei, const GLuint *)) +AGL_API(void, GenVertexArrays, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsVertexArray, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_ARB_uniform_buffer_object +AGL_API(void, GetUniformIndices, (GLuint, GLsizei, const GLchar* *, GLuint *)) +AGL_API(void, GetActiveUniformsiv, (GLuint, GLsizei, const GLuint *, GLenum, GLint *)) +AGL_API(void, GetActiveUniformName, (GLuint, GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(GLuint, GetUniformBlockIndex, (GLuint, const GLchar *)) +AGL_API(void, GetActiveUniformBlockiv, (GLuint, GLuint, GLenum, GLint *)) +AGL_API(void, GetActiveUniformBlockName, (GLuint, GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, UniformBlockBinding, (GLuint, GLuint, GLuint)) +#endif + +#if defined _ALLEGRO_GL_ARB_copy_buffer +AGL_API(void, CopyBufferSubData, (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)) +#endif + + +#if defined _ALLEGRO_GL_ARB_draw_elements_base_vertex +AGL_API(void, DrawElementsBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) +AGL_API(void, DrawRangeElementsBaseVertex, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) +AGL_API(void, DrawElementsInstancedBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex)) +AGL_API(void, MultiDrawElementsBaseVertex, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex)) +#endif + +#if defined _ALLEGRO_GL_ARB_provoking_vertex +AGL_API(void, ProvokingVertex, (GLenum mode)) +#endif + +#if defined _ALLEGRO_GL_ARB_sync +AGL_API(GLsync, FenceSync, (GLenum condition, GLbitfield flags)) +AGL_API(GLboolean, IsSync, (GLsync sync)) +AGL_API(void, DeleteSync, (GLsync sync)) +AGL_API(GLenum, ClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) +AGL_API(void, WaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) +AGL_API(void, GetInteger64v, (GLenum pname, GLint64 *params)) +AGL_API(void, GetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) +#endif + +#if defined _ALLEGRO_GL_ARB_texture_multisample +AGL_API(void, TexImage2DMultisample, (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) +AGL_API(void, TexImage3DMultisample, (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) +AGL_API(void, GetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) +AGL_API(void, SampleMaski, (GLuint index, GLbitfield mask)) +#endif + +#if defined _ALLEGRO_GL_ARB_draw_buffers_blend +AGL_API(void, BlendEquationi, (GLuint buf, GLenum mode)) +AGL_API(void, BlendEquationSeparatei, (GLuint buf, GLenum modeRGB, GLenum modeAlpha)) +AGL_API(void, BlendFunci, (GLuint buf, GLenum src, GLenum dst)) +AGL_API(void, BlendFuncSeparatei, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) +#endif + +#if defined _ALLEGRO_GL_ARB_sample_shading +AGL_API(void, MinSampleShading, (GLclampf value)) +#endif + +#if defined _ALLEGRO_GL_ARB_shading_language_include +AGL_API(void, NamedStringARB, (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string)) +AGL_API(void, DeleteNamedStringARB, (GLint namelen, const GLchar *name)) +AGL_API(void, CompileShaderIncludeARB, (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length)) +AGL_API(GLboolean, IsNamedStringARB, (GLint namelen, const GLchar *name)) +AGL_API(void, GetNamedStringARB, (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string)) +AGL_API(void, GetNamedStringivARB, (GLint namelen, const GLchar *name, GLenum pname, GLint *params)) +#endif + +#if defined _ALLEGRO_GL_ARB_blend_func_extended +AGL_API(void, BindFragDataLocationIndexed, (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)) +AGL_API(GLint, GetFragDataIndex, (GLuint program, const GLchar *name)) +#endif + +#if defined _ALLEGRO_GL_ARB_sampler_objects +AGL_API(void, GenSamplers, (GLsizei count, GLuint *samplers)) +AGL_API(void, DeleteSamplers, (GLsizei count, const GLuint *samplers)) +AGL_API(GLboolean, IsSampler, (GLuint sampler)) +AGL_API(void, BindSampler, (GLenum unit, GLuint sampler)) +AGL_API(void, SamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) +AGL_API(void, SamplerParameteriv, (GLuint sampler, GLenum pname, const GLint *param)) +AGL_API(void, SamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) +AGL_API(void, SamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat *param)) +AGL_API(void, SamplerParameterIiv, (GLuint sampler, GLenum pname, const GLint *param)) +AGL_API(void, SamplerParameterIuiv, (GLuint sampler, GLenum pname, const GLuint *param)) +AGL_API(void, GetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint *params)) +AGL_API(void, GetSamplerParameterIiv, (GLuint sampler, GLenum pname, GLint *params)) +AGL_API(void, GetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat *params)) +AGL_API(void, GetSamplerParameterIfv, (GLuint sampler, GLenum pname, GLfloat *params)) +#endif + +#if defined _ALLEGRO_GL_ARB_timer_query +AGL_API(void, QueryCounter, (GLuint id, GLenum target)) +AGL_API(void, GetQueryObjecti64v, (GLuint id, GLenum pname, GLint64 *params)) +AGL_API(void, GetQueryObjectui64v, (GLuint id, GLenum pname, GLuint64 *params)) +#endif + +#if defined _ALLEGRO_GL_ARB_vertex_type_2_10_10_10_rev +AGL_API(void, VertexP2ui, (GLenum type, GLuint value)) +AGL_API(void, VertexP2uiv, (GLenum type, const GLuint *value)) +AGL_API(void, VertexP3ui, (GLenum type, GLuint value)) +AGL_API(void, VertexP3uiv, (GLenum type, const GLuint *value)) +AGL_API(void, VertexP4ui, (GLenum type, GLuint value)) +AGL_API(void, VertexP4uiv, (GLenum type, const GLuint *value)) +AGL_API(void, TexCoordP1ui, (GLenum type, GLuint coords)) +AGL_API(void, TexCoordP1uiv, (GLenum type, const GLuint *coords)) +AGL_API(void, TexCoordP2ui, (GLenum type, GLuint coords)) +AGL_API(void, TexCoordP2uiv, (GLenum type, const GLuint *coords)) +AGL_API(void, TexCoordP3ui, (GLenum type, GLuint coords)) +AGL_API(void, TexCoordP3uiv, (GLenum type, const GLuint *coords)) +AGL_API(void, TexCoordP4ui, (GLenum type, GLuint coords)) +AGL_API(void, TexCoordP4uiv, (GLenum type, const GLuint *coords)) +AGL_API(void, MultiTexCoordP1ui, (GLenum texture, GLenum type, GLuint coords)) +AGL_API(void, MultiTexCoordP1uiv, (GLenum texture, GLenum type, const GLuint *coords)) +AGL_API(void, MultiTexCoordP2ui, (GLenum texture, GLenum type, GLuint coords)) +AGL_API(void, MultiTexCoordP2uiv, (GLenum texture, GLenum type, const GLuint *coords)) +AGL_API(void, MultiTexCoordP3ui, (GLenum texture, GLenum type, GLuint coords)) +AGL_API(void, MultiTexCoordP3uiv, (GLenum texture, GLenum type, const GLuint *coords)) +AGL_API(void, MultiTexCoordP4ui, (GLenum texture, GLenum type, GLuint coords)) +AGL_API(void, MultiTexCoordP4uiv, (GLenum texture, GLenum type, const GLuint *coords)) +AGL_API(void, NormalP3ui, (GLenum type, GLuint coords)) +AGL_API(void, NormalP3uiv, (GLenum type, const GLuint *coords)) +AGL_API(void, ColorP3ui, (GLenum type, GLuint color)) +AGL_API(void, ColorP3uiv, (GLenum type, const GLuint *color)) +AGL_API(void, ColorP4ui, (GLenum type, GLuint color)) +AGL_API(void, ColorP4uiv, (GLenum type, const GLuint *color)) +AGL_API(void, SecondaryColorP3ui, (GLenum type, GLuint color)) +AGL_API(void, SecondaryColorP3uiv, (GLenum type, const GLuint *color)) +AGL_API(void, VertexAttribP1ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) +AGL_API(void, VertexAttribP1uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) +AGL_API(void, VertexAttribP2ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) +AGL_API(void, VertexAttribP2uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) +AGL_API(void, VertexAttribP3ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) +AGL_API(void, VertexAttribP3uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) +AGL_API(void, VertexAttribP4ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) +AGL_API(void, VertexAttribP4uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) +#endif + +#if defined _ALLEGRO_GL_ARB_draw_indirect +AGL_API(void, DrawArraysIndirect, (GLenum mode, const GLvoid *indirect)) +AGL_API(void, DrawElementsIndirect, (GLenum mode, GLenum type, const GLvoid *indirect)) +#endif + +#if defined _ALLEGRO_GL_ARB_gpu_shader_fp64 +AGL_API(void, Uniform1d, (GLint location, GLdouble x)) +AGL_API(void, Uniform2d, (GLint location, GLdouble x, GLdouble y)) +AGL_API(void, Uniform3d, (GLint location, GLdouble x, GLdouble y, GLdouble z)) +AGL_API(void, Uniform4d, (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) +AGL_API(void, Uniform1dv, (GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, Uniform2dv, (GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, Uniform3dv, (GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, Uniform4dv, (GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, UniformMatrix2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix2x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix2x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix3x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix3x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix4x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, UniformMatrix4x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, GetUniformdv, (GLuint program, GLint location, GLdouble *params)) +AGL_API(void, ProgramUniform1dEXT, (GLuint program, GLint location, GLdouble x)) +AGL_API(void, ProgramUniform2dEXT, (GLuint program, GLint location, GLdouble x, GLdouble y)) +AGL_API(void, ProgramUniform3dEXT, (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)) +AGL_API(void, ProgramUniform4dEXT, (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) +AGL_API(void, ProgramUniform1dvEXT, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, ProgramUniform2dvEXT, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, ProgramUniform3dvEXT, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, ProgramUniform4dvEXT, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix2dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix3dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix4dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix2x3dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix2x4dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix3x2dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix3x4dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix4x2dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +AGL_API(void, ProgramUniformMatrix4x3dvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) +#endif + +#if defined _ALLEGRO_GL_ARB_shader_subroutine +AGL_API(GLint, GetSubroutineUniformLocation, (GLuint program, GLenum shadertype, const GLchar *name)) +AGL_API(GLuint, GetSubroutineIndex, (GLuint program, GLenum shadertype, const GLchar *name)) +AGL_API(void, GetActiveSubroutineUniformiv, (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)) +AGL_API(void, GetActiveSubroutineUniformName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) +AGL_API(void, GetActiveSubroutineName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) +AGL_API(void, UniformSubroutinesuiv, (GLenum shadertype, GLsizei count, const GLuint *indices)) +AGL_API(void, GetUniformSubroutineuiv, (GLenum shadertype, GLint location, GLuint *params)) +AGL_API(void, GetProgramStageiv, (GLuint program, GLenum shadertype, GLenum pname, GLint *values)) +#endif + +#if defined _ALLEGRO_GL_ARB_tessellation_shader +AGL_API(void, PatchParameteri, (GLenum pname, GLint value)) +AGL_API(void, PatchParameterfv, (GLenum pname, const GLfloat *values)) +#endif + +#if defined _ALLEGRO_GL_ARB_transform_feedback2 +AGL_API(void, BindTransformFeedback, (GLenum target, GLuint id)) +AGL_API(void, DeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) +AGL_API(void, GenTransformFeedbacks, (GLsizei n, GLuint *ids)) +AGL_API(GLboolean, IsTransformFeedback, (GLuint id)) +AGL_API(void, PauseTransformFeedback, (void)) +AGL_API(void, ResumeTransformFeedback, (void)) +AGL_API(void, DrawTransformFeedback, (GLenum mode, GLuint id)) +#endif + +#if defined _ALLEGRO_GL_ARB_transform_feedback3 +AGL_API(void, DrawTransformFeedbackStream, (GLenum mode, GLuint id, GLuint stream)) +AGL_API(void, BeginQueryIndexed, (GLenum target, GLuint index, GLuint id)) +AGL_API(void, EndQueryIndexed, (GLenum target, GLuint index)) +AGL_API(void, GetQueryIndexediv, (GLenum target, GLuint index, GLenum pname, GLint *params)) +#endif + + +/* */ + + +#if defined _ALLEGRO_GL_EXT_blend_color +AGL_API(void, BlendColorEXT, (GLclampf, GLclampf, GLclampf, GLclampf)) +#endif + +#if defined _ALLEGRO_GL_EXT_polygon_offset +AGL_API(void, PolygonOffsetEXT, (GLfloat, GLfloat)) +#endif + +#if defined _ALLEGRO_GL_EXT_texture3D +AGL_API(void, TexImage3DEXT, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TexSubImage3DEXT, (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_texture_filter4 +AGL_API(void, GetTexFilterFuncSGIS, (GLenum, GLenum, GLfloat *)) +AGL_API(void, TexFilterFuncSGIS, (GLenum, GLenum, GLsizei, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_EXT_subtexture +AGL_API(void, TexSubImage1DEXT, (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TexSubImage2DEXT, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_copy_texture +AGL_API(void, CopyTexImage1DEXT, (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)) +AGL_API(void, CopyTexImage2DEXT, (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) +AGL_API(void, CopyTexSubImage1DEXT, (GLenum, GLint, GLint, GLint, GLint, GLsizei)) +AGL_API(void, CopyTexSubImage2DEXT, (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, CopyTexSubImage3DEXT, (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_EXT_histogram +AGL_API(void, GetHistogramEXT, (GLenum, GLboolean, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetHistogramParameterfvEXT, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetHistogramParameterivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, GetMinmaxEXT, (GLenum, GLboolean, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetMinmaxParameterfvEXT, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMinmaxParameterivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, HistogramEXT, (GLenum, GLsizei, GLenum, GLboolean)) +AGL_API(void, MinmaxEXT, (GLenum, GLenum, GLboolean)) +AGL_API(void, ResetHistogramEXT, (GLenum)) +AGL_API(void, ResetMinmaxEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_convolution +AGL_API(void, ConvolutionFilter1DEXT, (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ConvolutionFilter2DEXT, (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ConvolutionParameterfEXT, (GLenum, GLenum, GLfloat)) +AGL_API(void, ConvolutionParameterfvEXT, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, ConvolutionParameteriEXT, (GLenum, GLenum, GLint)) +AGL_API(void, ConvolutionParameterivEXT, (GLenum, GLenum, const GLint *)) +AGL_API(void, CopyConvolutionFilter1DEXT, (GLenum, GLenum, GLint, GLint, GLsizei)) +AGL_API(void, CopyConvolutionFilter2DEXT, (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, GetConvolutionFilterEXT, (GLenum, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetConvolutionParameterfvEXT, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetConvolutionParameterivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, GetSeparableFilterEXT, (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)) +AGL_API(void, SeparableFilter2DEXT, (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_SGI_color_table +AGL_API(void, ColorTableSGI, (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, ColorTableParameterfvSGI, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, ColorTableParameterivSGI, (GLenum, GLenum, const GLint *)) +AGL_API(void, CopyColorTableSGI, (GLenum, GLenum, GLint, GLint, GLsizei)) +AGL_API(void, GetColorTableSGI, (GLenum, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetColorTableParameterfvSGI, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetColorTableParameterivSGI, (GLenum, GLenum, GLint *)) +#endif + +#if defined _ALLEGRO_GL_SGIX_pixel_texture +AGL_API(void, PixelTexGenSGIX, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_SGIS_pixel_texture +AGL_API(void, PixelTexGenParameteriSGIS, (GLenum, GLint)) +AGL_API(void, PixelTexGenParameterivSGIS, (GLenum, const GLint *)) +AGL_API(void, PixelTexGenParameterfSGIS, (GLenum, GLfloat)) +AGL_API(void, PixelTexGenParameterfvSGIS, (GLenum, const GLfloat *)) +AGL_API(void, GetPixelTexGenParameterivSGIS, (GLenum, GLint *)) +AGL_API(void, GetPixelTexGenParameterfvSGIS, (GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_texture4D +AGL_API(void, TexImage4DSGIS, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TexSubImage4DSGIS, (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_texture_object +AGL_API(GLboolean, AreTexturesResidentEXT, (GLsizei, const GLuint *, GLboolean *)) +AGL_API(void, BindTextureEXT, (GLenum, GLuint)) +AGL_API(void, DeleteTexturesEXT, (GLsizei, const GLuint *)) +AGL_API(void, GenTexturesEXT, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsTextureEXT, (GLuint)) +AGL_API(void, PrioritizeTexturesEXT, (GLsizei, const GLuint *, const GLclampf *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_detail_texture +AGL_API(void, DetailTexFuncSGIS, (GLenum, GLsizei, const GLfloat *)) +AGL_API(void, GetDetailTexFuncSGIS, (GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_sharpen_texture +AGL_API(void, SharpenTexFuncSGIS, (GLenum, GLsizei, const GLfloat *)) +AGL_API(void, GetSharpenTexFuncSGIS, (GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_multisample +AGL_API(void, SampleMaskSGIS, (GLclampf, GLboolean)) +AGL_API(void, SamplePatternSGIS, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_array +AGL_API(void, ArrayElementEXT, (GLint)) +AGL_API(void, ColorPointerEXT, (GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) +AGL_API(void, DrawArraysEXT, (GLenum, GLint, GLsizei)) +AGL_API(void, EdgeFlagPointerEXT, (GLsizei, GLsizei, const GLboolean *)) +AGL_API(void, GetPointervEXT, (GLenum, GLvoid* *)) +AGL_API(void, IndexPointerEXT, (GLenum, GLsizei, GLsizei, const GLvoid *)) +AGL_API(void, NormalPointerEXT, (GLenum, GLsizei, GLsizei, const GLvoid *)) +AGL_API(void, TexCoordPointerEXT, (GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) +AGL_API(void, VertexPointerEXT, (GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_blend_minmax +AGL_API(void, BlendEquationEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_SGIX_sprite +AGL_API(void, SpriteParameterfSGIX, (GLenum, GLfloat)) +AGL_API(void, SpriteParameterfvSGIX, (GLenum, const GLfloat *)) +AGL_API(void, SpriteParameteriSGIX, (GLenum, GLint)) +AGL_API(void, SpriteParameterivSGIX, (GLenum, const GLint *)) +#endif + +#if defined _ALLEGRO_GL_EXT_point_parameters +AGL_API(void, PointParameterfEXT, (GLenum, GLfloat)) +AGL_API(void, PointParameterfvEXT, (GLenum, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIS_point_parameters +AGL_API(void, PointParameterfSGIS, (GLenum, GLfloat)) +AGL_API(void, PointParameterfvSGIS, (GLenum, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIX_instruments +AGL_API(GLint, GetInstrumentsSGIX, (void)) +AGL_API(void, InstrumentsBufferSGIX, (GLsizei, GLint *)) +AGL_API(GLint, PollInstrumentsSGIX, (GLint *)) +AGL_API(void, ReadInstrumentsSGIX, (GLint)) +AGL_API(void, StartInstrumentsSGIX, (void)) +AGL_API(void, StopInstrumentsSGIX, (GLint)) +#endif + +#if defined _ALLEGRO_GL_SGIX_framezoom +AGL_API(void, FrameZoomSGIX, (GLint)) +#endif + +#if defined _ALLEGRO_GL_SGIX_tag_sample_buffer +AGL_API(void, TagSampleBufferSGIX, (void)) +#endif + +#if defined _ALLEGRO_GL_SGIX_polynomial_ffd +AGL_API(void, DeformationMap3dSGIX, (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)) +AGL_API(void, DeformationMap3fSGIX, (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)) +AGL_API(void, DeformSGIX, (GLbitfield)) +AGL_API(void, LoadIdentityDeformationMapSGIX, (GLbitfield)) +#endif + +#if defined _ALLEGRO_GL_SGIX_reference_plane +AGL_API(void, ReferencePlaneSGIX, (const GLdouble *)) +#endif + +#if defined _ALLEGRO_GL_SGIX_flush_raster +AGL_API(void, FlushRasterSGIX, (void)) +#endif + +#if defined _ALLEGRO_GL_SGIS_fog_function +AGL_API(void, FogFuncSGIS, (GLsizei, const GLfloat *)) +AGL_API(void, GetFogFuncSGIS, (GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_HP_image_transform +AGL_API(void, ImageTransformParameteriHP, (GLenum, GLenum, GLint)) +AGL_API(void, ImageTransformParameterfHP, (GLenum, GLenum, GLfloat)) +AGL_API(void, ImageTransformParameterivHP, (GLenum, GLenum, const GLint *)) +AGL_API(void, ImageTransformParameterfvHP, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, GetImageTransformParameterivHP, (GLenum, GLenum, GLint *)) +AGL_API(void, GetImageTransformParameterfvHP, (GLenum, GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_EXT_color_subtable +#ifndef GL_EXT_paletted_texture +AGL_API(void, ColorSubTableEXT, (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +#endif +AGL_API(void, CopyColorSubTableEXT, (GLenum, GLsizei, GLint, GLint, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_PGI_misc_hints +AGL_API(void, HintPGI, (GLenum, GLint)) +#endif + +#if defined _ALLEGRO_GL_EXT_paletted_texture +AGL_API(void, ColorTableEXT, (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, GetColorTableEXT, (GLenum, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetColorTableParameterivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, GetColorTableParameterfvEXT, (GLenum, GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIX_list_priority +AGL_API(void, GetListParameterfvSGIX, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetListParameterivSGIX, (GLuint, GLenum, GLint *)) +AGL_API(void, ListParameterfSGIX, (GLuint, GLenum, GLfloat)) +AGL_API(void, ListParameterfvSGIX, (GLuint, GLenum, const GLfloat *)) +AGL_API(void, ListParameteriSGIX, (GLuint, GLenum, GLint)) +AGL_API(void, ListParameterivSGIX, (GLuint, GLenum, const GLint *)) +#endif + +#if defined _ALLEGRO_GL_EXT_index_material +AGL_API(void, IndexMaterialEXT, (GLenum, GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_index_func +AGL_API(void, IndexFuncEXT, (GLenum, GLclampf)) +#endif + +#if defined _ALLEGRO_GL_EXT_compiled_vertex_array +AGL_API(void, LockArraysEXT, (GLint, GLsizei)) +AGL_API(void, UnlockArraysEXT, (void)) +#endif + +#if defined _ALLEGRO_GL_EXT_cull_vertex +AGL_API(void, CullParameterdvEXT, (GLenum, GLdouble *)) +AGL_API(void, CullParameterfvEXT, (GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_SGIX_fragment_lighting +AGL_API(void, FragmentColorMaterialSGIX, (GLenum, GLenum)) +AGL_API(void, FragmentLightfSGIX, (GLenum, GLenum, GLfloat)) +AGL_API(void, FragmentLightfvSGIX, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, FragmentLightiSGIX, (GLenum, GLenum, GLint)) +AGL_API(void, FragmentLightivSGIX, (GLenum, GLenum, const GLint *)) +AGL_API(void, FragmentLightModelfSGIX, (GLenum, GLfloat)) +AGL_API(void, FragmentLightModelfvSGIX, (GLenum, const GLfloat *)) +AGL_API(void, FragmentLightModeliSGIX, (GLenum, GLint)) +AGL_API(void, FragmentLightModelivSGIX, (GLenum, const GLint *)) +AGL_API(void, FragmentMaterialfSGIX, (GLenum, GLenum, GLfloat)) +AGL_API(void, FragmentMaterialfvSGIX, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, FragmentMaterialiSGIX, (GLenum, GLenum, GLint)) +AGL_API(void, FragmentMaterialivSGIX, (GLenum, GLenum, const GLint *)) +AGL_API(void, GetFragmentLightfvSGIX, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetFragmentLightivSGIX, (GLenum, GLenum, GLint *)) +AGL_API(void, GetFragmentMaterialfvSGIX, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetFragmentMaterialivSGIX, (GLenum, GLenum, GLint *)) +AGL_API(void, LightEnviSGIX, (GLenum, GLint)) +#endif + +#if defined _ALLEGRO_GL_EXT_draw_range_elements +AGL_API(void, DrawRangeElementsEXT, (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_light_texture +AGL_API(void, ApplyTextureEXT, (GLenum)) +AGL_API(void, TextureLightEXT, (GLenum)) +AGL_API(void, TextureMaterialEXT, (GLenum, GLenum)) +#endif + +#if defined _ALLEGRO_GL_SGIX_async +AGL_API(void, AsyncMarkerSGIX, (GLuint)) +AGL_API(GLint, FinishAsyncSGIX, (GLuint *)) +AGL_API(GLint, PollAsyncSGIX, (GLuint *)) +AGL_API(GLuint, GenAsyncMarkersSGIX, (GLsizei)) +AGL_API(void, DeleteAsyncMarkersSGIX, (GLuint, GLsizei)) +AGL_API(GLboolean, IsAsyncMarkerSGIX, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_INTEL_parallel_arrays +AGL_API(void, VertexPointervINTEL, (GLint, GLenum, const GLvoid* *)) +AGL_API(void, NormalPointervINTEL, (GLenum, const GLvoid* *)) +AGL_API(void, ColorPointervINTEL, (GLint, GLenum, const GLvoid* *)) +AGL_API(void, TexCoordPointervINTEL, (GLint, GLenum, const GLvoid* *)) +#endif + +#if defined _ALLEGRO_GL_EXT_pixel_transform +AGL_API(void, PixelTransformParameteriEXT, (GLenum, GLenum, GLint)) +AGL_API(void, PixelTransformParameterfEXT, (GLenum, GLenum, GLfloat)) +AGL_API(void, PixelTransformParameterivEXT, (GLenum, GLenum, const GLint *)) +AGL_API(void, PixelTransformParameterfvEXT, (GLenum, GLenum, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_EXT_secondary_color +AGL_API(void, SecondaryColor3bEXT, (GLbyte, GLbyte, GLbyte)) +AGL_API(void, SecondaryColor3bvEXT, (const GLbyte *)) +AGL_API(void, SecondaryColor3dEXT, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, SecondaryColor3dvEXT, (const GLdouble *)) +AGL_API(void, SecondaryColor3fEXT, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, SecondaryColor3fvEXT, (const GLfloat *)) +AGL_API(void, SecondaryColor3iEXT, (GLint, GLint, GLint)) +AGL_API(void, SecondaryColor3ivEXT, (const GLint *)) +AGL_API(void, SecondaryColor3sEXT, (GLshort, GLshort, GLshort)) +AGL_API(void, SecondaryColor3svEXT, (const GLshort *)) +AGL_API(void, SecondaryColor3ubEXT, (GLubyte, GLubyte, GLubyte)) +AGL_API(void, SecondaryColor3ubvEXT, (const GLubyte *)) +AGL_API(void, SecondaryColor3uiEXT, (GLuint, GLuint, GLuint)) +AGL_API(void, SecondaryColor3uivEXT, (const GLuint *)) +AGL_API(void, SecondaryColor3usEXT, (GLushort, GLushort, GLushort)) +AGL_API(void, SecondaryColor3usvEXT, (const GLushort *)) +AGL_API(void, SecondaryColorPointerEXT, (GLint, GLenum, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_texture_perturb_normal +AGL_API(void, TextureNormalEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_multi_draw_arrays +AGL_API(void, MultiDrawArraysEXT, (GLenum, GLint *, GLsizei *, GLsizei)) +AGL_API(void, MultiDrawElementsEXT, (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_EXT_fog_coord +AGL_API(void, FogCoordfEXT, (GLfloat)) +AGL_API(void, FogCoordfvEXT, (const GLfloat *)) +AGL_API(void, FogCoorddEXT, (GLdouble)) +AGL_API(void, FogCoorddvEXT, (const GLdouble *)) +AGL_API(void, FogCoordPointerEXT, (GLenum, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_coordinate_frame +AGL_API(void, Tangent3bEXT, (GLbyte, GLbyte, GLbyte)) +AGL_API(void, Tangent3bvEXT, (const GLbyte *)) +AGL_API(void, Tangent3dEXT, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, Tangent3dvEXT, (const GLdouble *)) +AGL_API(void, Tangent3fEXT, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, Tangent3fvEXT, (const GLfloat *)) +AGL_API(void, Tangent3iEXT, (GLint, GLint, GLint)) +AGL_API(void, Tangent3ivEXT, (const GLint *)) +AGL_API(void, Tangent3sEXT, (GLshort, GLshort, GLshort)) +AGL_API(void, Tangent3svEXT, (const GLshort *)) +AGL_API(void, Binormal3bEXT, (GLbyte, GLbyte, GLbyte)) +AGL_API(void, Binormal3bvEXT, (const GLbyte *)) +AGL_API(void, Binormal3dEXT, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, Binormal3dvEXT, (const GLdouble *)) +AGL_API(void, Binormal3fEXT, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, Binormal3fvEXT, (const GLfloat *)) +AGL_API(void, Binormal3iEXT, (GLint, GLint, GLint)) +AGL_API(void, Binormal3ivEXT, (const GLint *)) +AGL_API(void, Binormal3sEXT, (GLshort, GLshort, GLshort)) +AGL_API(void, Binormal3svEXT, (const GLshort *)) +AGL_API(void, TangentPointerEXT, (GLenum, GLsizei, const GLvoid *)) +AGL_API(void, BinormalPointerEXT, (GLenum, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_SUNX_constant_data +AGL_API(void, FinishTextureSUNX, (void)) +#endif + +#if defined _ALLEGRO_GL_SUN_global_alpha +AGL_API(void, GlobalAlphaFactorbSUN, (GLbyte)) +AGL_API(void, GlobalAlphaFactorsSUN, (GLshort)) +AGL_API(void, GlobalAlphaFactoriSUN, (GLint)) +AGL_API(void, GlobalAlphaFactorfSUN, (GLfloat)) +AGL_API(void, GlobalAlphaFactordSUN, (GLdouble)) +AGL_API(void, GlobalAlphaFactorubSUN, (GLubyte)) +AGL_API(void, GlobalAlphaFactorusSUN, (GLushort)) +AGL_API(void, GlobalAlphaFactoruiSUN, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_SUN_triangle_list +AGL_API(void, ReplacementCodeuiSUN, (GLuint)) +AGL_API(void, ReplacementCodeusSUN, (GLushort)) +AGL_API(void, ReplacementCodeubSUN, (GLubyte)) +AGL_API(void, ReplacementCodeuivSUN, (const GLuint *)) +AGL_API(void, ReplacementCodeusvSUN, (const GLushort *)) +AGL_API(void, ReplacementCodeubvSUN, (const GLubyte *)) +AGL_API(void, ReplacementCodePointerSUN, (GLenum, GLsizei, const GLvoid* *)) +#endif + +#if defined _ALLEGRO_GL_SUN_vertex +AGL_API(void, Color4ubVertex2fSUN, (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat)) +AGL_API(void, Color4ubVertex2fvSUN, (const GLubyte *, const GLfloat *)) +AGL_API(void, Color4ubVertex3fSUN, (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Color4ubVertex3fvSUN, (const GLubyte *, const GLfloat *)) +AGL_API(void, Color3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Color3fVertex3fvSUN, (const GLfloat *, const GLfloat *)) +AGL_API(void, Normal3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Normal3fVertex3fvSUN, (const GLfloat *, const GLfloat *)) +AGL_API(void, Color4fNormal3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, Color4fNormal3fVertex3fvSUN, (const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord2fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord2fVertex3fvSUN, (const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord4fVertex4fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord4fVertex4fvSUN, (const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord2fColor4ubVertex3fSUN, (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord2fColor4ubVertex3fvSUN, (const GLfloat *, const GLubyte *, const GLfloat *)) +AGL_API(void, TexCoord2fColor3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord2fColor3fVertex3fvSUN, (const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord2fNormal3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord2fNormal3fVertex3fvSUN, (const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord2fColor4fNormal3fVertex3fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord2fColor4fNormal3fVertex3fvSUN, (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, TexCoord4fColor4fNormal3fVertex4fSUN, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, TexCoord4fColor4fNormal3fVertex4fvSUN, (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiVertex3fvSUN, (const GLuint *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiColor4ubVertex3fSUN, (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiColor4ubVertex3fvSUN, (const GLuint *, const GLubyte *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiColor3fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiColor3fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiNormal3fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiNormal3fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiColor4fNormal3fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiColor4fNormal3fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiTexCoord2fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiTexCoord2fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *)) +AGL_API(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN, (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_EXT_blend_func_separate +AGL_API(void, BlendFuncSeparateEXT, (GLenum, GLenum, GLenum, GLenum)) +#endif + +#if defined _ALLEGRO_GL_INGR_blend_func_separate +AGL_API(void, BlendFuncSeparateINGR, (GLenum, GLenum, GLenum, GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_weighting +AGL_API(void, VertexWeightfEXT, (GLfloat)) +AGL_API(void, VertexWeightfvEXT, (const GLfloat *)) +AGL_API(void, VertexWeightPointerEXT, (GLsizei, GLenum, GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_NV_vertex_array_range +AGL_API(void, FlushVertexArrayRangeNV, (void)) +AGL_API(void, VertexArrayRangeNV, (GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_NV_register_combiners +AGL_API(void, CombinerParameterfvNV, (GLenum, const GLfloat *)) +AGL_API(void, CombinerParameterfNV, (GLenum, GLfloat)) +AGL_API(void, CombinerParameterivNV, (GLenum, const GLint *)) +AGL_API(void, CombinerParameteriNV, (GLenum, GLint)) +AGL_API(void, CombinerInputNV, (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, CombinerOutputNV, (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)) +AGL_API(void, FinalCombinerInputNV, (GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, GetCombinerInputParameterfvNV, (GLenum, GLenum, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetCombinerInputParameterivNV, (GLenum, GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetCombinerOutputParameterfvNV, (GLenum, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetCombinerOutputParameterivNV, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetFinalCombinerInputParameterfvNV, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetFinalCombinerInputParameterivNV, (GLenum, GLenum, GLint *)) +#endif + +#if defined _ALLEGRO_GL_MESA_resize_buffers +AGL_API(void, ResizeBuffersMESA, (void)) +#endif + +#if defined _ALLEGRO_GL_MESA_window_pos +AGL_API(void, WindowPos2dMESA, (GLdouble, GLdouble)) +AGL_API(void, WindowPos2dvMESA, (const GLdouble *)) +AGL_API(void, WindowPos2fMESA, (GLfloat, GLfloat)) +AGL_API(void, WindowPos2fvMESA, (const GLfloat *)) +AGL_API(void, WindowPos2iMESA, (GLint, GLint)) +AGL_API(void, WindowPos2ivMESA, (const GLint *)) +AGL_API(void, WindowPos2sMESA, (GLshort, GLshort)) +AGL_API(void, WindowPos2svMESA, (const GLshort *)) +AGL_API(void, WindowPos3dMESA, (GLdouble, GLdouble, GLdouble)) +AGL_API(void, WindowPos3dvMESA, (const GLdouble *)) +AGL_API(void, WindowPos3fMESA, (GLfloat, GLfloat, GLfloat)) +AGL_API(void, WindowPos3fvMESA, (const GLfloat *)) +AGL_API(void, WindowPos3iMESA, (GLint, GLint, GLint)) +AGL_API(void, WindowPos3ivMESA, (const GLint *)) +AGL_API(void, WindowPos3sMESA, (GLshort, GLshort, GLshort)) +AGL_API(void, WindowPos3svMESA, (const GLshort *)) +AGL_API(void, WindowPos4dMESA, (GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, WindowPos4dvMESA, (const GLdouble *)) +AGL_API(void, WindowPos4fMESA, (GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, WindowPos4fvMESA, (const GLfloat *)) +AGL_API(void, WindowPos4iMESA, (GLint, GLint, GLint, GLint)) +AGL_API(void, WindowPos4ivMESA, (const GLint *)) +AGL_API(void, WindowPos4sMESA, (GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, WindowPos4svMESA, (const GLshort *)) +#endif + +#if defined _ALLEGRO_GL_IBM_multimode_draw_arrays +AGL_API(void, MultiModeDrawArraysIBM, (GLenum, const GLint *, const GLsizei *, GLsizei, GLint)) +AGL_API(void, MultiModeDrawElementsIBM, (const GLenum *, const GLsizei *, GLenum, const GLvoid* *, GLsizei, GLint)) +#endif + +#ifdef AGK_IBM_vertex_array_lists +AGL_API(void, ColorPointerListIBM, (GLint, GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, SecondaryColorPointerListIBM, (GLint, GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, EdgeFlagPointerListIBM, (GLint, const GLboolean* *, GLint)) +AGL_API(void, FogCoordPointerListIBM, (GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, IndexPointerListIBM, (GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, NormalPointerListIBM, (GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, TexCoordPointerListIBM, (GLint, GLenum, GLint, const GLvoid* *, GLint)) +AGL_API(void, VertexPointerListIBM, (GLint, GLenum, GLint, const GLvoid* *, GLint)) +#endif + +#if defined _ALLEGRO_GL_3DFX_tbuffer +AGL_API(void, TbufferMask3DFX, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_EXT_multisample +AGL_API(void, SampleMaskEXT, (GLclampf, GLboolean)) +AGL_API(void, SamplePatternEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_SGIS_texture_color_mask +AGL_API(void, TextureColorMaskSGIS, (GLboolean, GLboolean, GLboolean, GLboolean)) +#endif + +#if defined _ALLEGRO_GL_SGIX_igloo_interface +AGL_API(void, IglooInterfaceSGIX, (GLenum, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_NV_fence +AGL_API(void, DeleteFencesNV, (GLsizei, const GLuint *)) +AGL_API(void, GenFencesNV, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsFenceNV, (GLuint)) +AGL_API(GLboolean, TestFenceNV, (GLuint)) +AGL_API(void, GetFenceivNV, (GLuint, GLenum, GLint *)) +AGL_API(void, FinishFenceNV, (GLuint)) +AGL_API(void, SetFenceNV, (GLuint, GLenum)) +#endif + +#if defined _ALLEGRO_GL_NV_evaluators +AGL_API(void, MapControlPointsNV, (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *)) +AGL_API(void, MapParameterivNV, (GLenum, GLenum, const GLint *)) +AGL_API(void, MapParameterfvNV, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, GetMapControlPointsNV, (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *)) +AGL_API(void, GetMapParameterivNV, (GLenum, GLenum, GLint *)) +AGL_API(void, GetMapParameterfvNV, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMapAttribParameterivNV, (GLenum, GLuint, GLenum, GLint *)) +AGL_API(void, GetMapAttribParameterfvNV, (GLenum, GLuint, GLenum, GLfloat *)) +AGL_API(void, EvalMapsNV, (GLenum, GLenum)) +#endif + +#if defined _ALLEGRO_GL_NV_register_combiners2 +AGL_API(void, CombinerStageParameterfvNV, (GLenum, GLenum, const GLfloat *)) +AGL_API(void, GetCombinerStageParameterfvNV, (GLenum, GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_NV_vertex_program +AGL_API(GLboolean, AreProgramsResidentNV, (GLsizei, const GLuint *, GLboolean *)) +AGL_API(void, BindProgramNV, (GLenum, GLuint)) +AGL_API(void, DeleteProgramsNV, (GLsizei, const GLuint *)) +AGL_API(void, ExecuteProgramNV, (GLenum, GLuint, const GLfloat *)) +AGL_API(void, GenProgramsNV, (GLsizei, GLuint *)) +AGL_API(void, GetProgramParameterdvNV, (GLenum, GLuint, GLenum, GLdouble *)) +AGL_API(void, GetProgramParameterfvNV, (GLenum, GLuint, GLenum, GLfloat *)) +AGL_API(void, GetProgramivNV, (GLuint, GLenum, GLint *)) +AGL_API(void, GetProgramStringNV, (GLuint, GLenum, GLubyte *)) +AGL_API(void, GetTrackMatrixivNV, (GLenum, GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribdvNV, (GLuint, GLenum, GLdouble *)) +AGL_API(void, GetVertexAttribfvNV, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVertexAttribivNV, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribPointervNV, (GLuint, GLenum, GLvoid* *)) +AGL_API(GLboolean, IsProgramNV, (GLuint)) +AGL_API(void, LoadProgramNV, (GLenum, GLuint, GLsizei, const GLubyte *)) +AGL_API(void, ProgramParameter4dNV, (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, ProgramParameter4dvNV, (GLenum, GLuint, const GLdouble *)) +AGL_API(void, ProgramParameter4fNV, (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramParameter4fvNV, (GLenum, GLuint, const GLfloat *)) +AGL_API(void, ProgramParameters4dvNV, (GLenum, GLuint, GLuint, const GLdouble *)) +AGL_API(void, ProgramParameters4fvNV, (GLenum, GLuint, GLuint, const GLfloat *)) +AGL_API(void, RequestResidentProgramsNV, (GLsizei, const GLuint *)) +AGL_API(void, TrackMatrixNV, (GLenum, GLuint, GLenum, GLenum)) +AGL_API(void, VertexAttribPointerNV, (GLuint, GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, VertexAttrib1dNV, (GLuint, GLdouble)) +AGL_API(void, VertexAttrib1dvNV, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib1fNV, (GLuint, GLfloat)) +AGL_API(void, VertexAttrib1fvNV, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib1sNV, (GLuint, GLshort)) +AGL_API(void, VertexAttrib1svNV, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib2dNV, (GLuint, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib2dvNV, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib2fNV, (GLuint, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib2fvNV, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib2sNV, (GLuint, GLshort, GLshort)) +AGL_API(void, VertexAttrib2svNV, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib3dNV, (GLuint, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib3dvNV, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib3fNV, (GLuint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib3fvNV, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib3sNV, (GLuint, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib3svNV, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4dNV, (GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexAttrib4dvNV, (GLuint, const GLdouble *)) +AGL_API(void, VertexAttrib4fNV, (GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexAttrib4fvNV, (GLuint, const GLfloat *)) +AGL_API(void, VertexAttrib4sNV, (GLuint, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, VertexAttrib4svNV, (GLuint, const GLshort *)) +AGL_API(void, VertexAttrib4ubNV, (GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) +AGL_API(void, VertexAttrib4ubvNV, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttribs1dvNV, (GLuint, GLsizei, const GLdouble *)) +AGL_API(void, VertexAttribs1fvNV, (GLuint, GLsizei, const GLfloat *)) +AGL_API(void, VertexAttribs1svNV, (GLuint, GLsizei, const GLshort *)) +AGL_API(void, VertexAttribs2dvNV, (GLuint, GLsizei, const GLdouble *)) +AGL_API(void, VertexAttribs2fvNV, (GLuint, GLsizei, const GLfloat *)) +AGL_API(void, VertexAttribs2svNV, (GLuint, GLsizei, const GLshort *)) +AGL_API(void, VertexAttribs3dvNV, (GLuint, GLsizei, const GLdouble *)) +AGL_API(void, VertexAttribs3fvNV, (GLuint, GLsizei, const GLfloat *)) +AGL_API(void, VertexAttribs3svNV, (GLuint, GLsizei, const GLshort *)) +AGL_API(void, VertexAttribs4dvNV, (GLuint, GLsizei, const GLdouble *)) +AGL_API(void, VertexAttribs4fvNV, (GLuint, GLsizei, const GLfloat *)) +AGL_API(void, VertexAttribs4svNV, (GLuint, GLsizei, const GLshort *)) +AGL_API(void, VertexAttribs4ubvNV, (GLuint, GLsizei, const GLubyte *)) +#endif + +#if defined _ALLEGRO_GL_ATI_envmap_bumpmap +AGL_API(void, TexBumpParameterivATI, (GLenum, const GLint *)) +AGL_API(void, TexBumpParameterfvATI, (GLenum, const GLfloat *)) +AGL_API(void, GetTexBumpParameterivATI, (GLenum, GLint *)) +AGL_API(void, GetTexBumpParameterfvATI, (GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_ATI_fragment_shader +AGL_API(GLuint, GenFragmentShadersATI, (GLuint)) +AGL_API(void, BindFragmentShaderATI, (GLuint)) +AGL_API(void, DeleteFragmentShaderATI, (GLuint)) +AGL_API(void, BeginFragmentShaderATI, (void)) +AGL_API(void, EndFragmentShaderATI, (void)) +AGL_API(void, PassTexCoordATI, (GLuint, GLuint, GLenum)) +AGL_API(void, SampleMapATI, (GLuint, GLuint, GLenum)) +AGL_API(void, ColorFragmentOp1ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, ColorFragmentOp2ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, ColorFragmentOp3ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, AlphaFragmentOp1ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, AlphaFragmentOp2ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, AlphaFragmentOp3ATI, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, SetFragmentShaderConstantATI, (GLuint, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_ATI_pn_triangles +AGL_API(void, PNTrianglesiATI, (GLenum, GLint)) +AGL_API(void, PNTrianglesfATI, (GLenum, GLfloat)) +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_array_object +AGL_API(GLuint, NewObjectBufferATI, (GLsizei, const GLvoid *, GLenum)) +AGL_API(GLboolean, IsObjectBufferATI, (GLuint)) +AGL_API(void, UpdateObjectBufferATI, (GLuint, GLuint, GLsizei, const GLvoid *, GLenum)) +AGL_API(void, GetObjectBufferfvATI, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetObjectBufferivATI, (GLuint, GLenum, GLint *)) +AGL_API(void, FreeObjectBufferATI, (GLuint)) +AGL_API(void, ArrayObjectATI, (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint)) +AGL_API(void, GetArrayObjectfvATI, (GLenum, GLenum, GLfloat *)) +AGL_API(void, GetArrayObjectivATI, (GLenum, GLenum, GLint *)) +AGL_API(void, VariantArrayObjectATI, (GLuint, GLenum, GLsizei, GLuint, GLuint)) +AGL_API(void, GetVariantArrayObjectfvATI, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVariantArrayObjectivATI, (GLuint, GLenum, GLint *)) +#endif + +#if defined _ALLEGRO_GL_EXT_vertex_shader +AGL_API(void, BeginVertexShaderEXT, (void)) +AGL_API(void, EndVertexShaderEXT, (void)) +AGL_API(void, BindVertexShaderEXT, (GLuint)) +AGL_API(GLuint, GenVertexShadersEXT, (GLuint)) +AGL_API(void, DeleteVertexShaderEXT, (GLuint)) +AGL_API(void, ShaderOp1EXT, (GLenum, GLuint, GLuint)) +AGL_API(void, ShaderOp2EXT, (GLenum, GLuint, GLuint, GLuint)) +AGL_API(void, ShaderOp3EXT, (GLenum, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, SwizzleEXT, (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, WriteMaskEXT, (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, InsertComponentEXT, (GLuint, GLuint, GLuint)) +AGL_API(void, ExtractComponentEXT, (GLuint, GLuint, GLuint)) +AGL_API(GLuint, GenSymbolsEXT, (GLenum, GLenum, GLenum, GLuint)) +AGL_API(void, SetInvariantEXT, (GLuint, GLenum, const GLvoid *)) +AGL_API(void, SetLocalConstantEXT, (GLuint, GLenum, const GLvoid *)) +AGL_API(void, VariantbvEXT, (GLuint, const GLbyte *)) +AGL_API(void, VariantsvEXT, (GLuint, const GLshort *)) +AGL_API(void, VariantivEXT, (GLuint, const GLint *)) +AGL_API(void, VariantfvEXT, (GLuint, const GLfloat *)) +AGL_API(void, VariantdvEXT, (GLuint, const GLdouble *)) +AGL_API(void, VariantubvEXT, (GLuint, const GLubyte *)) +AGL_API(void, VariantusvEXT, (GLuint, const GLushort *)) +AGL_API(void, VariantuivEXT, (GLuint, const GLuint *)) +AGL_API(void, VariantPointerEXT, (GLuint, GLenum, GLuint, const GLvoid *)) +AGL_API(void, EnableVariantClientStateEXT, (GLuint)) +AGL_API(void, DisableVariantClientStateEXT, (GLuint)) +AGL_API(GLuint, BindLightParameterEXT, (GLenum, GLenum)) +AGL_API(GLuint, BindMaterialParameterEXT, (GLenum, GLenum)) +AGL_API(GLuint, BindTexGenParameterEXT, (GLenum, GLenum, GLenum)) +AGL_API(GLuint, BindTextureUnitParameterEXT, (GLenum, GLenum)) +AGL_API(GLuint, BindParameterEXT, (GLenum)) +AGL_API(GLboolean, IsVariantEnabledEXT, (GLuint, GLenum)) +AGL_API(void, GetVariantBooleanvEXT, (GLuint, GLenum, GLboolean *)) +AGL_API(void, GetVariantIntegervEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVariantFloatvEXT, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVariantPointervEXT, (GLuint, GLenum, GLvoid* *)) +AGL_API(void, GetInvariantBooleanvEXT, (GLuint, GLenum, GLboolean *)) +AGL_API(void, GetInvariantIntegervEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetInvariantFloatvEXT, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetLocalConstantBooleanvEXT, (GLuint, GLenum, GLboolean *)) +AGL_API(void, GetLocalConstantIntegervEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetLocalConstantFloatvEXT, (GLuint, GLenum, GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_streams +AGL_API(void, VertexStream1sATI, (GLenum, GLshort)) +AGL_API(void, VertexStream1svATI, (GLenum, const GLshort *)) +AGL_API(void, VertexStream1iATI, (GLenum, GLint)) +AGL_API(void, VertexStream1ivATI, (GLenum, const GLint *)) +AGL_API(void, VertexStream1fATI, (GLenum, GLfloat)) +AGL_API(void, VertexStream1fvATI, (GLenum, const GLfloat *)) +AGL_API(void, VertexStream1dATI, (GLenum, GLdouble)) +AGL_API(void, VertexStream1dvATI, (GLenum, const GLdouble *)) +AGL_API(void, VertexStream2sATI, (GLenum, GLshort, GLshort)) +AGL_API(void, VertexStream2svATI, (GLenum, const GLshort *)) +AGL_API(void, VertexStream2iATI, (GLenum, GLint, GLint)) +AGL_API(void, VertexStream2ivATI, (GLenum, const GLint *)) +AGL_API(void, VertexStream2fATI, (GLenum, GLfloat, GLfloat)) +AGL_API(void, VertexStream2fvATI, (GLenum, const GLfloat *)) +AGL_API(void, VertexStream2dATI, (GLenum, GLdouble, GLdouble)) +AGL_API(void, VertexStream2dvATI, (GLenum, const GLdouble *)) +AGL_API(void, VertexStream3sATI, (GLenum, GLshort, GLshort, GLshort)) +AGL_API(void, VertexStream3svATI, (GLenum, const GLshort *)) +AGL_API(void, VertexStream3iATI, (GLenum, GLint, GLint, GLint)) +AGL_API(void, VertexStream3ivATI, (GLenum, const GLint *)) +AGL_API(void, VertexStream3fATI, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexStream3fvATI, (GLenum, const GLfloat *)) +AGL_API(void, VertexStream3dATI, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexStream3dvATI, (GLenum, const GLdouble *)) +AGL_API(void, VertexStream4sATI, (GLenum, GLshort, GLshort, GLshort, GLshort)) +AGL_API(void, VertexStream4svATI, (GLenum, const GLshort *)) +AGL_API(void, VertexStream4iATI, (GLenum, GLint, GLint, GLint, GLint)) +AGL_API(void, VertexStream4ivATI, (GLenum, const GLint *)) +AGL_API(void, VertexStream4fATI, (GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, VertexStream4fvATI, (GLenum, const GLfloat *)) +AGL_API(void, VertexStream4dATI, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, VertexStream4dvATI, (GLenum, const GLdouble *)) +AGL_API(void, NormalStream3bATI, (GLenum, GLbyte, GLbyte, GLbyte)) +AGL_API(void, NormalStream3bvATI, (GLenum, const GLbyte *)) +AGL_API(void, NormalStream3sATI, (GLenum, GLshort, GLshort, GLshort)) +AGL_API(void, NormalStream3svATI, (GLenum, const GLshort *)) +AGL_API(void, NormalStream3iATI, (GLenum, GLint, GLint, GLint)) +AGL_API(void, NormalStream3ivATI, (GLenum, const GLint *)) +AGL_API(void, NormalStream3fATI, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, NormalStream3fvATI, (GLenum, const GLfloat *)) +AGL_API(void, NormalStream3dATI, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, NormalStream3dvATI, (GLenum, const GLdouble *)) +AGL_API(void, ClientActiveVertexStreamATI, (GLenum)) +AGL_API(void, VertexBlendEnviATI, (GLenum, GLint)) +AGL_API(void, VertexBlendEnvfATI, (GLenum, GLfloat)) +#endif + +#if defined _ALLEGRO_GL_ATI_element_array +AGL_API(void, ElementPointerATI, (GLenum, const GLvoid *)) +AGL_API(void, DrawElementArrayATI, (GLenum, GLsizei)) +AGL_API(void, DrawRangeElementArrayATI, (GLenum, GLuint, GLuint, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_SUN_mesh_array +AGL_API(void, DrawMeshArraysSUN, (GLenum, GLint, GLsizei, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_NV_occlusion_query +AGL_API(void, GenOcclusionQueriesNV, (GLsizei, GLuint *)) +AGL_API(void, DeleteOcclusionQueriesNV, (GLsizei, const GLuint *)) +AGL_API(GLboolean, IsOcclusionQueryNV, (GLuint)) +AGL_API(void, BeginOcclusionQueryNV, (GLuint)) +AGL_API(void, EndOcclusionQueryNV, (void)) +AGL_API(void, GetOcclusionQueryivNV, (GLuint, GLenum, GLint *)) +AGL_API(void, GetOcclusionQueryuivNV, (GLuint, GLenum, GLuint *)) +#endif + +#if defined _ALLEGRO_GL_NV_point_sprite +AGL_API(void, PointParameteriNV, (GLenum, GLint)) +AGL_API(void, PointParameterivNV, (GLenum, const GLint *)) +#endif + +#if defined _ALLEGRO_GL_EXT_stencil_two_side +AGL_API(void, ActiveStencilFaceEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_APPLE_element_array +AGL_API(void, ElementPointerAPPLE, (GLenum, const GLvoid *)) +AGL_API(void, DrawElementArrayAPPLE, (GLenum, GLint, GLsizei)) +AGL_API(void, DrawRangeElementArrayAPPLE, (GLenum, GLuint, GLuint, GLint, GLsizei)) +AGL_API(void, MultiDrawElementArrayAPPLE, (GLenum, const GLint *, const GLsizei *, GLsizei)) +AGL_API(void, MultiDrawRangeElementArrayAPPLE, (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_APPLE_fence +AGL_API(void, GenFencesAPPLE, (GLsizei, GLuint *)) +AGL_API(void, DeleteFencesAPPLE, (GLsizei, const GLuint *)) +AGL_API(void, SetFenceAPPLE, (GLuint)) +AGL_API(GLboolean, IsFenceAPPLE, (GLuint)) +AGL_API(GLboolean, TestFenceAPPLE, (GLuint)) +AGL_API(void, FinishFenceAPPLE, (GLuint)) +AGL_API(GLboolean, TestObjectAPPLE, (GLenum, GLuint)) +AGL_API(void, FinishObjectAPPLE, (GLenum, GLint)) +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_array_object +AGL_API(void, BindVertexArrayAPPLE, (GLuint)) +AGL_API(void, DeleteVertexArraysAPPLE, (GLsizei, const GLuint *)) +AGL_API(void, GenVertexArraysAPPLE, (GLsizei, const GLuint *)) +AGL_API(GLboolean, IsVertexArrayAPPLE, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_array_range +AGL_API(void, VertexArrayRangeAPPLE, (GLsizei, GLvoid *)) +AGL_API(void, FlushVertexArrayRangeAPPLE, (GLsizei, GLvoid *)) +AGL_API(void, VertexArrayParameteriAPPLE, (GLenum, GLint)) +#endif + +#if defined _ALLEGRO_GL_ATI_draw_buffers +AGL_API(void, DrawBuffersATI, (GLsizei, const GLenum *)) +#endif + +#if defined _ALLEGRO_GL_NV_fragment_program +AGL_API(void, ProgramNamedParameter4fNV, (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramNamedParameter4dNV, (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, ProgramNamedParameter4fvNV, (GLuint, GLsizei, const GLubyte *, const GLfloat *)) +AGL_API(void, ProgramNamedParameter4dvNV, (GLuint, GLsizei, const GLubyte *, const GLdouble *)) +AGL_API(void, GetProgramNamedParameterfvNV, (GLuint, GLsizei, const GLubyte *, GLfloat *)) +AGL_API(void, GetProgramNamedParameterdvNV, (GLuint, GLsizei, const GLubyte *, GLdouble *)) +#endif + +#if defined _ALLEGRO_GL_NV_half_float +AGL_API(void, Vertex2hNV, (GLhalfNV, GLhalfNV)) +AGL_API(void, Vertex2hvNV, (const GLhalfNV *)) +AGL_API(void, Vertex3hNV, (GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, Vertex3hvNV, (const GLhalfNV *)) +AGL_API(void, Vertex4hNV, (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, Vertex4hvNV, (const GLhalfNV *)) +AGL_API(void, Normal3hNV, (GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, Normal3hvNV, (const GLhalfNV *)) +AGL_API(void, Color3hNV, (GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, Color3hvNV, (const GLhalfNV *)) +AGL_API(void, Color4hNV, (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, Color4hvNV, (const GLhalfNV *)) +AGL_API(void, TexCoord1hNV, (GLhalfNV)) +AGL_API(void, TexCoord1hvNV, (const GLhalfNV *)) +AGL_API(void, TexCoord2hNV, (GLhalfNV, GLhalfNV)) +AGL_API(void, TexCoord2hvNV, (const GLhalfNV *)) +AGL_API(void, TexCoord3hNV, (GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, TexCoord3hvNV, (const GLhalfNV *)) +AGL_API(void, TexCoord4hNV, (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, TexCoord4hvNV, (const GLhalfNV *)) +AGL_API(void, MultiTexCoord1hNV, (GLenum, GLhalfNV)) +AGL_API(void, MultiTexCoord1hvNV, (GLenum, const GLhalfNV *)) +AGL_API(void, MultiTexCoord2hNV, (GLenum, GLhalfNV, GLhalfNV)) +AGL_API(void, MultiTexCoord2hvNV, (GLenum, const GLhalfNV *)) +AGL_API(void, MultiTexCoord3hNV, (GLenum, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, MultiTexCoord3hvNV, (GLenum, const GLhalfNV *)) +AGL_API(void, MultiTexCoord4hNV, (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, MultiTexCoord4hvNV, (GLenum, const GLhalfNV *)) +AGL_API(void, FogCoordhNV, (GLhalfNV)) +AGL_API(void, FogCoordhvNV, (const GLhalfNV *)) +AGL_API(void, SecondaryColor3hNV, (GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, SecondaryColor3hvNV, (const GLhalfNV *)) +AGL_API(void, VertexWeighthNV, (GLhalfNV)) +AGL_API(void, VertexWeighthvNV, (const GLhalfNV *)) +AGL_API(void, VertexAttrib1hNV, (GLuint, GLhalfNV)) +AGL_API(void, VertexAttrib1hvNV, (GLuint, const GLhalfNV *)) +AGL_API(void, VertexAttrib2hNV, (GLuint, GLhalfNV, GLhalfNV)) +AGL_API(void, VertexAttrib2hvNV, (GLuint, const GLhalfNV *)) +AGL_API(void, VertexAttrib3hNV, (GLuint, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, VertexAttrib3hvNV, (GLuint, const GLhalfNV *)) +AGL_API(void, VertexAttrib4hNV, (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV)) +AGL_API(void, VertexAttrib4hvNV, (GLuint, const GLhalfNV *)) +AGL_API(void, VertexAttribs1hvNV, (GLuint, GLsizei, const GLhalfNV *)) +AGL_API(void, VertexAttribs2hvNV, (GLuint, GLsizei, const GLhalfNV *)) +AGL_API(void, VertexAttribs3hvNV, (GLuint, GLsizei, const GLhalfNV *)) +AGL_API(void, VertexAttribs4hvNV, (GLuint, GLsizei, const GLhalfNV *)) +#endif + +#if defined _ALLEGRO_GL_NV_pixel_data_range +AGL_API(void, PixelDataRangeNV, (GLenum, GLsizei, GLvoid *)) +AGL_API(void, FlushPixelDataRangeNV, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_NV_primitive_restart +AGL_API(void, PrimitiveRestartNV, (void)) +AGL_API(void, PrimitiveRestartIndexNV, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_ATI_map_object_buffer +AGL_API(GLvoid*, MapObjectBufferATI, (GLuint)) +AGL_API(void, UnmapObjectBufferATI, (GLuint)) +#endif + +#if defined _ALLEGRO_GL_ATI_separate_stencil +AGL_API(void, StencilOpSeparateATI, (GLenum, GLenum, GLenum, GLenum)) +AGL_API(void, StencilFuncSeparateATI, (GLenum, GLenum, GLint, GLuint)) +#endif + +#if defined _ALLEGRO_GL_ATI_vertex_attrib_array_object +AGL_API(void, VertexAttribArrayObjectATI, (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint)) +AGL_API(void, GetVertexAttribArrayObjectfvATI, (GLuint, GLenum, GLfloat *)) +AGL_API(void, GetVertexAttribArrayObjectivATI, (GLuint, GLenum, GLint *)) +#endif + +#if defined _ALLEGRO_GL_OES_byte_coordinates +AGL_API(void, Vertex2bOES, ( GLbyte, GLbyte )) +AGL_API(void, Vertex3bOES, ( GLbyte, GLbyte, GLbyte )) +AGL_API(void, Vertex4bOES, ( GLbyte, GLbyte, GLbyte, GLbyte )) +AGL_API(void, Vertex2bvOES, ( const GLbyte * )) +AGL_API(void, Vertex3bvOES, ( const GLbyte * )) +AGL_API(void, Vertex4bvOES, ( const GLbyte * )) +AGL_API(void, TexCoord1bOES, ( GLbyte )) +AGL_API(void, TexCoord2bOES, ( GLbyte, GLbyte )) +AGL_API(void, TexCoord3bOES, ( GLbyte, GLbyte, GLbyte )) +AGL_API(void, TexCoord4bOES, ( GLbyte, GLbyte, GLbyte, GLbyte )) +AGL_API(void, TexCoord1bvOES, ( const GLbyte * )) +AGL_API(void, TexCoord2bvOES, ( const GLbyte * )) +AGL_API(void, TexCoord3bvOES, ( const GLbyte * )) +AGL_API(void, TexCoord4bvOES, ( const GLbyte * )) +AGL_API(void, MultiTexCoord1bOES, ( GLenum, GLbyte )) +AGL_API(void, MultiTexCoord2bOES, ( GLenum, GLbyte, GLbyte )) +AGL_API(void, MultiTexCoord3bOES, ( GLenum, GLbyte, GLbyte, GLbyte )) +AGL_API(void, MultiTexCoord4bOES, ( GLenum, GLbyte, GLbyte, GLbyte, GLbyte )) +AGL_API(void, MultiTexCoord1bvOES, ( GLenum texture, const GLbyte * )) +AGL_API(void, MultiTexCoord2bvOES, ( GLenum texture, const GLbyte * )) +AGL_API(void, MultiTexCoord3bvOES, ( GLenum texture, const GLbyte * )) +AGL_API(void, MultiTexCoord4bvOES, ( GLenum texture, const GLbyte * )) +#endif + +#if defined _ALLEGRO_GL_OES_fixed_point +AGL_API(void, Vertex2xOES, (GLfixed, GLfixed)) +AGL_API(void, Vertex3xOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, Vertex4xOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, Vertex2xvOES, (const GLfixed *)) +AGL_API(void, Vertex3xvOES, (const GLfixed *)) +AGL_API(void, Vertex4xvOES, (const GLfixed *)) +AGL_API(void, Normal3xOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, Normal3xvOES, (const GLfixed *)) +AGL_API(void, TexCoord1xOES, (GLfixed)) +AGL_API(void, TexCoord2xOES, (GLfixed, GLfixed)) +AGL_API(void, TexCoord3xOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, TexCoord4xOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, TexCoord1xvOES, (const GLfixed *)) +AGL_API(void, TexCoord2xvOES, (const GLfixed *)) +AGL_API(void, TexCoord3xvOES, (const GLfixed *)) +AGL_API(void, TexCoord4xvOES, (const GLfixed *)) +AGL_API(void, MultiTexCoord1xOES, (GLenum, GLfixed)) +AGL_API(void, MultiTexCoord2xOES, (GLenum, GLfixed, GLfixed)) +AGL_API(void, MultiTexCoord3xOES, (GLenum, GLfixed, GLfixed, GLfixed)) +AGL_API(void, MultiTexCoord4xOES, (GLenum, GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, MultiTexCoord1xvOES, (GLenum, const GLfixed *)) +AGL_API(void, MultiTexCoord2xvOES, (GLenum, const GLfixed *)) +AGL_API(void, MultiTexCoord3xvOES, (GLenum, const GLfixed *)) +AGL_API(void, MultiTexCoord4xvOES, (GLenum, const GLfixed *)) +AGL_API(void, Color3xOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, Color4xOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, Color3xvOES, (const GLfixed *)) +AGL_API(void, Color4xvOES, (const GLfixed *)) +AGL_API(void, IndexxOES, (GLfixed)) +AGL_API(void, IndexxvOES, (const GLfixed *)) +AGL_API(void, RectxOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, RectxvOES, (const GLfixed [2], const GLfixed [2])) +AGL_API(void, DepthRangexOES, (GLclampx, GLclampx)) +AGL_API(void, LoadMatrixxOES, (const GLfixed [16])) +AGL_API(void, MultMatrixxOES, (const GLfixed [16])) +AGL_API(void, LoadTransposeMatrixxOES, (const GLfixed [16])) +AGL_API(void, MultTransposeMatrixxOES, (const GLfixed [16])) +AGL_API(void, RotatexOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, ScalexOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, TranslatexOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, FrustumxOES, (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, OrthoxOES, (GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, TexGenxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, TexGenxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetTexGenxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, ClipPlanexOES, (GLenum, const GLfixed *)) +AGL_API(void, GetClipPlanexOES, (GLenum, GLfixed *)) +AGL_API(void, RasterPos2xOES, (GLfixed, GLfixed)) +AGL_API(void, RasterPos3xOES, (GLfixed, GLfixed, GLfixed)) +AGL_API(void, RasterPos4xOES, (GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, RasterPos2xvOES, (const GLfixed *)) +AGL_API(void, RasterPos3xvOES, (const GLfixed *)) +AGL_API(void, RasterPos4xvOES, (const GLfixed *)) +AGL_API(void, MaterialxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, MaterialxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetMaterialxOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, LightxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, LightxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetLightxOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, LightModelxOES, (GLenum, GLfixed)) +AGL_API(void, LightModelxvOES, (GLenum, const GLfixed *)) +AGL_API(void, PointSizexOES, (GLfixed size)) +AGL_API(void, LineWidthxOES, (GLfixed width)) +AGL_API(void, PolygonOffsetxOES, (GLfixed factor, GLfixed units)) +AGL_API(void, PixelStorex, (GLenum pname, GLfixed param)) +AGL_API(void, PixelTransferxOES, (GLenum pname, GLfixed param)) +AGL_API(void, PixelMapx, (GLenum, GLint, const GLfixed *)) +AGL_API(void, GetPixelMapxv, (GLenum, GLint, GLfixed *)) +AGL_API(void, ConvolutionParameterxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, ConvolutionParameterxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetConvolutionParameterxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, GetHistogramParameterxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, PixelZoomxOES, (GLfixed, GLfixed)) +AGL_API(void, BitmapxOES, (GLsizei, GLsizei, GLfixed, GLfixed, GLfixed, GLfixed, const GLubyte *)) +AGL_API(void, TexParameterxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, TexParameterxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetTexParameterxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, GetTexLevelParameterxvOES, (GLenum, GLint, GLenum, GLfixed *)) +AGL_API(void, PrioritizeTexturesxOES, (GLsizei, GLuint *, GLclampx *)) +AGL_API(void, TexEnvxOES, (GLenum, GLenum, GLfixed)) +AGL_API(void, TexEnvxvOES, (GLenum, GLenum, const GLfixed *)) +AGL_API(void, GetTexEnvxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, FogxOES, (GLenum, GLfixed)) +AGL_API(void, FogxvOES, (GLenum, const GLfixed *)) +AGL_API(void, SampleCoverageOES, (GLclampx, GLboolean)) +AGL_API(void, AlphaFuncxOES, (GLenum, GLclampx)) +AGL_API(void, BlendColorxOES, (GLclampx, GLclampx, GLclampx, GLclampx)) +AGL_API(void, ClearColorxOES, (GLclampx, GLclampx, GLclampx, GLclampx)) +AGL_API(void, ClearDepthxOES, (GLclampx)) +AGL_API(void, ClearAccumxOES, (GLclampx, GLclampx, GLclampx, GLclampx)) +AGL_API(void, AccumxOES, (GLenum, GLfixed)) +AGL_API(void, Map1xOES, (GLenum, GLfixed, GLfixed, GLint, GLint, const GLfixed *)) +AGL_API(void, Map2xOES, (GLenum, GLfixed, GLfixed, GLint, GLint, GLfixed, GLfixed, GLint, GLint, const GLfixed *)) +AGL_API(void, MapGrid1xOES, (GLint, GLfixed, GLfixed)) +AGL_API(void, MapGrid2xOES, (GLint, GLfixed, GLfixed, GLfixed, GLfixed)) +AGL_API(void, GetMapxvOES, (GLenum, GLenum, GLfixed *)) +AGL_API(void, EvalCoord1xOES, (GLfixed)) +AGL_API(void, EvalCoord2xOES, (GLfixed, GLfixed)) +AGL_API(void, EvalCoord1xvOES, (const GLfixed *)) +AGL_API(void, EvalCoord2xvOES, (const GLfixed *)) +AGL_API(void, FeedbackBufferxOES, (GLsizei, GLenum, GLfixed *)) +AGL_API(void, PassThroughxOES, (GLfixed)) +AGL_API(void, GetFixedvOES, (GLenum, GLfixed *)) +#endif + +#if defined _ALLEGRO_GL_OES_single_precision +AGL_API(void, DepthRangefOES, (GLclampf, GLclampf)) +AGL_API(void, FrustumfOES, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, OrthofOES, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ClipPlanefOES, (GLenum, const GLfloat*)) +AGL_API(void, GetClipPlanefOES, (GLenum, GLfloat*)) +AGL_API(void, ClearDepthfOES, (GLclampd)) +#endif + +#if defined _ALLEGRO_GL_OES_query_matrix +AGL_API(GLbitfield, QueryMatrixxOES, (GLfixed [16], GLint [16] )) +#endif + +#if defined _ALLEGRO_GL_EXT_depth_bounds_test +AGL_API(void, DepthBoundsEXT, (GLclampd, GLclampd)) +#endif + + +#if defined _ALLEGRO_GL_EXT_blend_equation_separate +AGL_API(void, BlendEquationSeparateEXT, (GLenum, GLenum)) +#endif + + +#if defined _ALLEGRO_GL_EXT_framebuffer_object +AGL_API(GLboolean, IsRenderbufferEXT, (GLuint)) +AGL_API(void, BindRenderbufferEXT, (GLenum, GLuint)) +AGL_API(void, DeleteRenderbuffersEXT, (GLsizei, const GLuint *)) +AGL_API(void, GenRenderbuffersEXT, (GLsizei, GLuint *)) +AGL_API(void, RenderbufferStorageEXT, (GLenum, GLenum, GLsizei, GLsizei)) +AGL_API(void, GetRenderbufferParameterivEXT, (GLenum, GLenum, GLint*)) +AGL_API(GLboolean, IsFramebufferEXT, (GLuint)) +AGL_API(void, BindFramebufferEXT, (GLenum, GLuint)) +AGL_API(void, DeleteFramebuffersEXT, (GLsizei, const GLuint *)) +AGL_API(void, GenFramebuffersEXT, (GLsizei, GLuint *)) +AGL_API(GLenum, CheckFramebufferStatusEXT, (GLenum)) +AGL_API(void, FramebufferTexture1DEXT, (GLenum, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, FramebufferTexture2DEXT, (GLenum, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, FramebufferTexture3DEXT, (GLenum, GLenum, GLenum, GLuint, GLint, GLint)) +AGL_API(void, FramebufferRenderbufferEXT, (GLenum, GLenum, GLenum, GLuint)) +AGL_API(void, GetFramebufferAttachmentParameterivEXT, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GenerateMipmapEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_GREMEDY_string_marker +AGL_API(void, StringMarkerGREMEDY, (GLsizei, const GLvoid *)) +#endif + +#if defined _ALLEGRO_GL_EXT_stencil_clear_tag +AGL_API(void, StencilClearTagEXT, (GLsizei, GLuint)) +#endif + +#if defined _ALLEGRO_GL_EXT_framebuffer_blit +AGL_API(void, BlitFramebufferEXT, (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_framebuffer_multisample +AGL_API(void, RenderbufferStorageMultisampleEXT, (GLenum, GLsizei, GLenum, GLsizei, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_EXT_timer_query +AGL_API(void, GetQueryObjecti64vEXT, (GLuint, GLenum, GLint64EXT *)) +AGL_API(void, GetQueryObjectui64vEXT, (GLuint, GLenum, GLuint64EXT *)) +#endif + +#if defined _ALLEGRO_GL_EXT_gpu_program_parameters +AGL_API(void, ProgramEnvParameters4fvEXT, (GLenum, GLuint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramLocalParameters4fvEXT, (GLenum, GLuint, GLsizei, const GLfloat *)) +#endif + +#if defined _ALLEGRO_GL_APPLE_flush_buffer_range +AGL_API(void, BufferParameteriAPPLE, (GLenum, GLenum, GLint)) +AGL_API(void, FlushMappedBufferRangeAPPLE, (GLenum, GLintptr, GLsizeiptr)) +#endif + +#if defined _ALLEGRO_GL_EXT_bindable_uniform +AGL_API(void, UniformBufferEXT, (GLuint, GLint, GLuint)) +AGL_API(GLint, GetUniformBufferSizeEXT, (GLuint, GLint)) +AGL_API(GLintptr, GetUniformOffsetEXT, (GLuint program, GLint)) +#endif + +#if defined _ALLEGRO_GL_EXT_draw_buffers2 +AGL_API(void, ColorMaskIndexedEXT, (GLuint, GLboolean, GLboolean, GLboolean, GLboolean)) +AGL_API(void, GetBooleanIndexedvEXT, (GLenum, GLuint, GLboolean *)) +AGL_API(void, GetIntegerIndexedvEXT, (GLenum, GLuint, GLint *)) +AGL_API(void, EnableIndexedEXT, (GLenum, GLuint)) +AGL_API(void, DisableIndexedEXT, (GLenum, GLuint)) +AGL_API(GLboolean, IsEnabledIndexedEXT, (GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_EXT_draw_instanced +AGL_API(void, DrawArraysInstancedEXT, (GLenum, GLint, GLsizei, GLsizei)) +AGL_API(void, DrawElementsInstancedEXT, (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_EXT_geometry_shader4 +AGL_API(void, ProgramParameteriEXT, (GLuint, GLenum, GLint)) +AGL_API(void, FramebufferTextureEXT, (GLenum, GLenum, GLuint, GLint)) +#if !defined _ALLEGRO_GL_EXT_texture_array +AGL_API(void, FramebufferTextureLayerEXT, (GLenum, GLenum, GLuint, GLint, GLint)) +#endif +AGL_API(void, FramebufferTextureFaceEXT, (GLenum, GLenum, GLuint, GLint, GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_gpu_shader4 +AGL_API(void, VertexAttribI1iEXT, (GLuint, GLint)) +AGL_API(void, VertexAttribI2iEXT, (GLuint, GLint, GLint)) +AGL_API(void, VertexAttribI3iEXT, (GLuint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI4iEXT, (GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI1uiEXT, (GLuint, GLuint)) +AGL_API(void, VertexAttribI2uiEXT, (GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI3uiEXT, (GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI4uiEXT, (GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI1ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI2ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI3ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI4ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI1uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI2uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI3uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4bvEXT, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttribI4svEXT, (GLuint, const GLshort *)) +AGL_API(void, VertexAttribI4ubvEXT, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttribI4usvEXT, (GLuint, const GLushort *)) +AGL_API(void, VertexAttribIPointerEXT, (GLuint, GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetVertexAttribIivEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribIuivEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, Uniform1uiEXT, (GLint, GLuint)) +AGL_API(void, Uniform2uiEXT, (GLint, GLuint, GLuint)) +AGL_API(void, Uniform3uiEXT, (GLint, GLuint, GLuint, GLuint)) +AGL_API(void, Uniform4uiEXT, (GLint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, Uniform1uivEXT, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform2uivEXT, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform3uivEXT, (GLint, GLsizei, const GLuint *)) +AGL_API(void, Uniform4uivEXT, (GLint, GLsizei, const GLuint *)) +AGL_API(void, GetUniformuivEXT, (GLuint, GLint location, GLint *)) +AGL_API(void, BindFragDataLocationEXT, (GLuint, GLuint, const GLchar *)) +AGL_API(GLint, GetFragDataLocationEXT, (GLuint, const GLchar *)) +#endif + +#if defined _ALLEGRO_GL_EXT_texture_array +AGL_API(void, FramebufferTextureLayerEXT, (GLenum, GLenum, GLuint, GLint, GLint)) +#endif + +#if defined _ALLEGRO_GL_EXT_texture_buffer_object +AGL_API(void, TexBufferEXT, (GLenum, GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_texture_integer +AGL_API(void, ClearColorIiEXT, (GLint, GLint, GLint, GLint)) +AGL_API(void, ClearColorIuiEXT, (GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, TexParameterIivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, TexParameterIuivEXT, (GLenum, GLenum, GLuint *)) +AGL_API(void, GetTexParameterIivEXT, (GLenum, GLenum, GLint *)) +AGL_API(void, GetTexParameterIiuvEXT, (GLenum, GLenum, GLuint *)) +#endif + +#if defined _ALLEGRO_GL_NV_depth_buffer_float +AGL_API(void, DepthRangedNV, (GLdouble, GLdouble)) +AGL_API(void, ClearDepthdNV, (GLdouble)) +AGL_API(void, DepthBoundsdNV, (GLdouble, GLdouble)) +#endif + +#if defined _ALLEGRO_GL_NV_framebuffer_multisample_coverage +AGL_API(void, RenderbufferStorageMultsampleCoverageNV, (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei)) +#endif + +#if defined _ALLEGRO_GL_NV_geometry_program4 +AGL_API(void, ProgramVertexLimitNV, (GLenum, GLint)) +#if !defined _ALLEGRO_GL_EXT_geometry_shader4 +AGL_API(void, FramebufferTextureEXT, (GLenum, GLenum, GLuint, GLint)) +#if !defined _ALLEGRO_GL_EXT_texture_array +AGL_API(void, FramebufferTextureLayerEXT, (GLenum, GLenum, GLuint, GLint, GLint)) +#endif +#endif +#endif + +#if defined _ALLEGRO_GL_NV_gpu_program4 +AGL_API(void, ProgramLocalParameterI4iNV, (GLenum, GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, ProgramLocalParameterI4ivNV, (GLenum, GLuint, const GLint *)) +AGL_API(void, ProgramLocalParametersI4ivNV, (GLenum, GLuint, GLsizei, const GLint *)) +AGL_API(void, ProgramLocalParameterI4uiNV, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, ProgramLocalParameterI4uivNV, (GLenum, GLuint, const GLuint *)) +AGL_API(void, ProgramLocalParametersI4uivNV, (GLenum, GLuint, GLsizei, const GLuint *)) +AGL_API(void, ProgramEnvParameterI4iNV, (GLenum, GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, ProgramEnvParameterI4ivNV, (GLenum, GLuint, const GLint *)) +AGL_API(void, ProgramEnvParametersI4ivNV, (GLenum, GLuint, GLsizei, const GLint *)) +AGL_API(void, ProgramEnvParameterI4uiNV, (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, ProgramEnvParameterI4uivNV, (GLenum, GLuint, const GLuint *)) +AGL_API(void, ProgramEnvParametersI4uivNV, (GLenum, GLuint, GLsizei, const GLuint *)) +AGL_API(void, GetProgramLocalParameterIivNV, (GLenum, GLuint, GLint *)) +AGL_API(void, GetProgramLocalParameterIuivNV,(GLenum, GLuint, GLuint *)) +AGL_API(void, GetProgramEnvParameterIivNV, (GLenum, GLuint, GLint *)) +AGL_API(void, GetProgramEnvParameterIuivNV, (GLenum, GLuint, GLuint *)) +#endif + +#if defined _ALLEGRO_GL_NV_parameter_buffer_object +#if !defined _ALLEGRO_GL_NV_transform_feedback +AGL_API(void, BindBufferRangeNV, (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) +AGL_API(void, BindBufferOffsetNV,(GLenum, GLuint, GLuint, GLintptr)) +AGL_API(void, BindBufferBaseNV, (GLenum, GLuint, GLuint)) +#endif +AGL_API(void, ProgramBufferParametersfvNV, (GLenum, GLuint, GLuint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramBufferParametersIivNV, (GLenum, GLuint, GLuint, GLsizei, const GLint *)) +AGL_API(void, ProgramBufferParametersIuivNV,(GLenum, GLuint, GLuint, GLuint, const GLuint *)) +#if !defined _ALLEGRO_GL_EXT_draw_buffers2 +AGL_API(void, GetIntegerIndexedvEXT, (GLenum, GLuint, GLboolean *)) +#endif +#endif + +#if defined _ALLEGRO_GL_NV_transform_feedback +AGL_API(void, BindBufferRangeNV, (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) +AGL_API(void, BindBufferOffsetNV,(GLenum, GLuint, GLuint, GLintptr)) +AGL_API(void, BindBufferBaseNV, (GLenum, GLuint, GLuint)) +AGL_API(void, TransformFeedbackAttribsNV, (GLsizei, const GLint *, GLenum)) +AGL_API(void, TransformFeedbackVaryingsNV,(GLuint, GLsizei, const GLint *, GLenum)) +AGL_API(void, BeginTransformFeedbackNV, (GLenum)) +AGL_API(void, EndTransformFeedbackNV, (void)) +AGL_API(GLint, GetVaryingLocationNV, (GLuint, const GLchar *)) +AGL_API(void, GetActiveVaryingNV, (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)) +AGL_API(void, ActiveVaryingNV, (GLuint, const GLchar *)) +AGL_API(void, GetTransformFeedbackVaryingNV, (GLuint, GLuint, GLint *)) +#if !defined _ALLEGRO_GL_EXT_draw_buffers2 +AGL_API(void, GetBooleanIndexedvEXT, (GLenum, GLuint, GLboolean *)) +/*AGL_API(void, GetIntegerIndexedvEXT, (GLenum, GLuint, GLint *))*/ +#endif +#endif + +#if defined _ALLEGRO_GL_NV_vertex_program4 +#ifndef _ALLEGRO_GL_EXT_gpu_shader4 +AGL_API(void, VertexAttribI1iEXT, (GLuint, GLint)) +AGL_API(void, VertexAttribI2iEXT, (GLuint, GLint, GLint)) +AGL_API(void, VertexAttribI3iEXT, (GLuint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI4iEXT, (GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, VertexAttribI1uiEXT, (GLuint, GLuint)) +AGL_API(void, VertexAttribI2uiEXT, (GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI3uiEXT, (GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI4uiEXT, (GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, VertexAttribI1ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI2ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI3ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI4ivEXT, (GLuint, const GLint *)) +AGL_API(void, VertexAttribI1uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI2uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI3uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4uivEXT, (GLuint, const GLuint *)) +AGL_API(void, VertexAttribI4bvEXT, (GLuint, const GLbyte *)) +AGL_API(void, VertexAttribI4svEXT, (GLuint, const GLshort *)) +AGL_API(void, VertexAttribI4ubvEXT, (GLuint, const GLubyte *)) +AGL_API(void, VertexAttribI4usvEXT, (GLuint, const GLushort *)) +AGL_API(void, VertexAttribIPointerEXT, (GLuint, GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetVertexAttribIivEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetVertexAttribIuivEXT, (GLuint, GLenum, GLint *)) +#endif +#endif + +#if defined _ALLEGRO_GL_GREMEDY_frame_terminator +AGL_API(void, FrameTerminatorGREMEDY, (void)) +#endif + +#if defined _ALLEGRO_GL_NV_conditional_render +AGL_API(void, BeginConditionalRenderNV, (GLuint, GLenum)) +AGL_API(void, EndConditionalRenderNV, (void)) +#endif + +#if defined _ALLEGRO_GL_EXT_transform_feedback +AGL_API(void, BeginTransformFeedbackEXT, (GLenum)) +AGL_API(void, EndTransformFeedbackEXT, (void)) +AGL_API(void, BindBufferRangeEXT, (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) +AGL_API(void, BindBufferOffsetEXT, (GLenum, GLuint, GLuint, GLintptr)) +AGL_API(void, BindBufferBaseEXT, (GLenum, GLuint, GLuint)) +AGL_API(void, TransformFeedbackVaryingsEXT, (GLuint, GLsizei, const GLint *, GLenum)) +AGL_API(void, GetTransformFeedbackVaryingEXT, (GLuint, GLuint, GLint *)) +#endif + +#if defined _ALLEGRO_GL_EXT_direct_state_access +AGL_API(void, ClientAttribDefaultEXT, (GLbitfield)) +AGL_API(void, PushClientAttribDefaultEXT, (GLbitfield)) +AGL_API(void, MatrixLoadfEXT, (GLenum, const GLfloat *)) +AGL_API(void, MatrixLoaddEXT, (GLenum, const GLdouble *)) +AGL_API(void, MatrixMultfEXT, (GLenum, const GLfloat *)) +AGL_API(void, MatrixMultdEXT, (GLenum, const GLdouble *)) +AGL_API(void, MatrixLoadIdentityEXT, (GLenum)) +AGL_API(void, MatrixRotatefEXT, (GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MatrixRotatedEXT, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MatrixScalefEXT, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MatrixScaledEXT, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MatrixTranslatefEXT, (GLenum, GLfloat, GLfloat, GLfloat)) +AGL_API(void, MatrixTranslatedEXT, (GLenum, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MatrixFrustumEXT, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MatrixOrthoEXT, (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, MatrixPopEXT, (GLenum)) +AGL_API(void, MatrixPushEXT, (GLenum)) +AGL_API(void, MatrixLoadTransposefEXT, (GLenum, const GLfloat *)) +AGL_API(void, MatrixLoadTransposedEXT, (GLenum, const GLdouble *)) +AGL_API(void, MatrixMultTransposefEXT, (GLenum, const GLfloat *)) +AGL_API(void, MatrixMultTransposedEXT, (GLenum, const GLdouble *)) +AGL_API(void, TextureParameterfEXT, (GLuint, GLenum, GLenum, GLfloat)) +AGL_API(void, TextureParameterfvEXT, (GLuint, GLenum, GLenum, const GLfloat *)) +AGL_API(void, TextureParameteriEXT, (GLuint, GLenum, GLenum, GLint)) +AGL_API(void, TextureParameterivEXT, (GLuint, GLenum, GLenum, const GLint *)) +AGL_API(void, TextureImage1DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TextureImage2DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TextureSubImage1DEXT, (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TextureSubImage2DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyTextureImage1DEXT, (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)) +AGL_API(void, CopyTextureImage2DEXT, (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) +AGL_API(void, CopyTextureSubImage1DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei)) +AGL_API(void, CopyTextureSubImage2DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, GetTextureImageEXT, (GLuint, GLenum, GLint, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetTextureParameterfvEXT, (GLuint, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetTextureParameterivEXT, (GLuint, GLenum, GLenum, GLint *)) +AGL_API(void, GetTextureLevelParameterfvEXT, (GLuint, GLenum, GLint, GLenum, GLfloat *)) +AGL_API(void, GetTextureLevelParameterivEXT, (GLuint, GLenum, GLint, GLenum, GLint *)) +AGL_API(void, TextureImage3DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, TextureSubImage3DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyTextureSubImage3DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, MultiTexParameterfEXT, (GLenum, GLenum, GLenum, GLfloat)) +AGL_API(void, MultiTexParameterfvEXT, (GLenum, GLenum, GLenum, const GLfloat *)) +AGL_API(void, MultiTexParameteriEXT, (GLenum, GLenum, GLenum, GLint)) +AGL_API(void, MultiTexParameterivEXT, (GLenum, GLenum, GLenum, const GLint *)) +AGL_API(void, MultiTexImage1DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, MultiTexImage2DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, MultiTexSubImage1DEXT, (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, MultiTexSubImage2DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyMultiTexImage1DEXT, (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)) +AGL_API(void, CopyMultiTexImage2DEXT, (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) +AGL_API(void, CopyMultiTexSubImage1DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei)) +AGL_API(void, CopyMultiTexSubImage2DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, GetMultiTexImageEXT, (GLenum, GLenum, GLint, GLenum, GLenum, GLvoid *)) +AGL_API(void, GetMultiTexParameterfvEXT, (GLenum, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMultiTexParameterivEXT, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetMultiTexLevelParameterfvEXT, (GLenum, GLenum, GLint, GLenum, GLfloat *)) +AGL_API(void, GetMultiTexLevelParameterivEXT, (GLenum, GLenum, GLint, GLenum, GLint *)) +AGL_API(void, MultiTexImage3DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) +AGL_API(void, MultiTexSubImage3DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) +AGL_API(void, CopyMultiTexSubImage3DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) +AGL_API(void, BindMultiTextureEXT, (GLenum, GLenum, GLuint)) +AGL_API(void, EnableClientStateIndexedEXT, (GLenum, GLuint)) +AGL_API(void, DisableClientStateIndexedEXT, (GLenum, GLuint)) +AGL_API(void, MultiTexCoordPointerEXT, (GLenum, GLint, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, MultiTexEnvfEXT, (GLenum, GLenum, GLenum, GLfloat)) +AGL_API(void, MultiTexEnvfvEXT, (GLenum, GLenum, GLenum, const GLfloat *)) +AGL_API(void, MultiTexEnviEXT, (GLenum, GLenum, GLenum, GLint)) +AGL_API(void, MultiTexEnvivEXT, (GLenum, GLenum, GLenum, const GLint *)) +AGL_API(void, MultiTexGendEXT, (GLenum, GLenum, GLenum, GLdouble)) +AGL_API(void, MultiTexGendvEXT, (GLenum, GLenum, GLenum, const GLdouble *)) +AGL_API(void, MultiTexGenfEXT, (GLenum, GLenum, GLenum, GLfloat)) +AGL_API(void, MultiTexGenfvEXT, (GLenum, GLenum, GLenum, const GLfloat *)) +AGL_API(void, MultiTexGeniEXT, (GLenum, GLenum, GLenum, GLint)) +AGL_API(void, MultiTexGenivEXT, (GLenum, GLenum, GLenum, const GLint *)) +AGL_API(void, GetMultiTexEnvfvEXT, (GLenum, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMultiTexEnvivEXT, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetMultiTexGendvEXT, (GLenum, GLenum, GLenum, GLdouble *)) +AGL_API(void, GetMultiTexGenfvEXT, (GLenum, GLenum, GLenum, GLfloat *)) +AGL_API(void, GetMultiTexGenivEXT, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetFloatIndexedvEXT, (GLenum, GLuint, GLfloat *)) +AGL_API(void, GetDoubleIndexedvEXT, (GLenum, GLuint, GLdouble *)) +AGL_API(void, GetPointerIndexedvEXT, (GLenum, GLuint, GLvoid* *)) +AGL_API(void, CompressedTextureImage3DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTextureImage2DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTextureImage1DEXT, (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTextureSubImage3DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTextureSubImage2DEXT, (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedTextureSubImage1DEXT, (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetCompressedTextureImageEXT, (GLuint, GLenum, GLint, GLvoid *)) +AGL_API(void, CompressedMultiTexImage3DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedMultiTexImage2DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedMultiTexImage1DEXT, (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) +AGL_API(void, CompressedMultiTexSubImage3DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedMultiTexSubImage2DEXT, (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, CompressedMultiTexSubImage1DEXT, (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, GetCompressedMultiTexImageEXT, (GLenum, GLenum, GLint, GLvoid *)) +AGL_API(void, NamedProgramStringEXT, (GLuint, GLenum, GLenum, GLsizei, const GLvoid *)) +AGL_API(void, NamedProgramLocalParameter4dEXT, (GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) +AGL_API(void, NamedProgramLocalParameter4dvEXT, (GLuint, GLenum, GLuint, const GLdouble *)) +AGL_API(void, NamedProgramLocalParameter4fEXT, (GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, NamedProgramLocalParameter4fvEXT, (GLuint, GLenum, GLuint, const GLfloat *)) +AGL_API(void, GetNamedProgramLocalParameterdvEXT, (GLuint, GLenum, GLuint, GLdouble *)) +AGL_API(void, GetNamedProgramLocalParameterfvEXT, (GLuint, GLenum, GLuint, GLfloat *)) +AGL_API(void, GetNamedProgramivEXT, (GLuint, GLenum, GLenum, GLint *)) +AGL_API(void, GetNamedProgramStringEXT, (GLuint, GLenum, GLenum, GLvoid *)) +AGL_API(void, NamedProgramLocalParameters4fvEXT, (GLuint, GLenum, GLuint, GLsizei, const GLfloat *)) +AGL_API(void, NamedProgramLocalParameterI4iEXT, (GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, NamedProgramLocalParameterI4ivEXT, (GLuint, GLenum, GLuint, const GLint *)) +AGL_API(void, NamedProgramLocalParametersI4ivEXT, (GLuint, GLenum, GLuint, GLsizei, const GLint *)) +AGL_API(void, NamedProgramLocalParameterI4uiEXT, (GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, NamedProgramLocalParameterI4uivEXT, (GLuint, GLenum, GLuint, const GLuint *)) +AGL_API(void, NamedProgramLocalParametersI4uivEXT, (GLuint, GLenum, GLuint, GLsizei, const GLuint *)) +AGL_API(void, GetNamedProgramLocalParameterIivEXT, (GLuint, GLenum, GLuint, GLint *)) +AGL_API(void, GetNamedProgramLocalParameterIuivEXT, (GLuint, GLenum, GLuint, GLuint *)) +AGL_API(void, TextureParameterIivEXT, (GLuint, GLenum, GLenum, const GLint *)) +AGL_API(void, TextureParameterIuivEXT, (GLuint, GLenum, GLenum, const GLuint *)) +AGL_API(void, GetTextureParameterIivEXT, (GLuint, GLenum, GLenum, GLint *)) +AGL_API(void, GetTextureParameterIuivEXT, (GLuint, GLenum, GLenum, GLuint *)) +AGL_API(void, MultiTexParameterIivEXT, (GLenum, GLenum, GLenum, const GLint *)) +AGL_API(void, MultiTexParameterIuivEXT, (GLenum, GLenum, GLenum, const GLuint *)) +AGL_API(void, GetMultiTexParameterIivEXT, (GLenum, GLenum, GLenum, GLint *)) +AGL_API(void, GetMultiTexParameterIuivEXT, (GLenum, GLenum, GLenum, GLuint *)) +AGL_API(void, ProgramUniform1fEXT, (GLuint, GLint, GLfloat)) +AGL_API(void, ProgramUniform2fEXT, (GLuint, GLint, GLfloat, GLfloat)) +AGL_API(void, ProgramUniform3fEXT, (GLuint, GLint, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramUniform4fEXT, (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat)) +AGL_API(void, ProgramUniform1iEXT, (GLuint, GLint, GLint)) +AGL_API(void, ProgramUniform2iEXT, (GLuint, GLint, GLint, GLint)) +AGL_API(void, ProgramUniform3iEXT, (GLuint, GLint, GLint, GLint, GLint)) +AGL_API(void, ProgramUniform4iEXT, (GLuint, GLint, GLint, GLint, GLint, GLint)) +AGL_API(void, ProgramUniform1fvEXT, (GLuint, GLint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramUniform2fvEXT, (GLuint, GLint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramUniform3fvEXT, (GLuint, GLint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramUniform4fvEXT, (GLuint, GLint, GLsizei, const GLfloat *)) +AGL_API(void, ProgramUniform1ivEXT, (GLuint, GLint, GLsizei, const GLint *)) +AGL_API(void, ProgramUniform2ivEXT, (GLuint, GLint, GLsizei, const GLint *)) +AGL_API(void, ProgramUniform3ivEXT, (GLuint, GLint, GLsizei, const GLint *)) +AGL_API(void, ProgramUniform4ivEXT, (GLuint, GLint, GLsizei, const GLint *)) +AGL_API(void, ProgramUniformMatrix2fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix3fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix4fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix2x3fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix3x2fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix2x4fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix4x2fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix3x4fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniformMatrix4x3fvEXT, (GLuint, GLint, GLsizei, GLboolean, const GLfloat *)) +AGL_API(void, ProgramUniform1uiEXT, (GLuint, GLint, GLuint)) +AGL_API(void, ProgramUniform2uiEXT, (GLuint, GLint, GLuint, GLuint)) +AGL_API(void, ProgramUniform3uiEXT, (GLuint, GLint, GLuint, GLuint, GLuint)) +AGL_API(void, ProgramUniform4uiEXT, (GLuint, GLint, GLuint, GLuint, GLuint, GLuint)) +AGL_API(void, ProgramUniform1uivEXT, (GLuint, GLint, GLsizei, const GLuint *)) +AGL_API(void, ProgramUniform2uivEXT, (GLuint, GLint, GLsizei, const GLuint *)) +AGL_API(void, ProgramUniform3uivEXT, (GLuint, GLint, GLsizei, const GLuint *)) +AGL_API(void, ProgramUniform4uivEXT, (GLuint, GLint, GLsizei, const GLuint *)) +AGL_API(void, NamedBufferDataEXT, (GLuint, GLsizeiptr, const GLvoid *, GLenum)) +AGL_API(void, NamedBufferSubDataEXT, (GLuint, GLintptr, GLsizeiptr, const GLvoid *)) +AGL_API(GLvoid*, MapNamedBufferEXT, (GLuint, GLenum)) +AGL_API(GLboolean, UnmapNamedBufferEXT, (GLuint)) +AGL_API(void, GetNamedBufferParameterivEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, GetNamedBufferPointervEXT, (GLuint, GLenum, GLvoid* *)) +AGL_API(void, GetNamedBufferSubDataEXT, (GLuint, GLintptr, GLsizeiptr, GLvoid *)) +AGL_API(void, TextureBufferEXT, (GLuint, GLenum, GLenum, GLuint)) +AGL_API(void, MultiTexBufferEXT, (GLenum, GLenum, GLenum, GLuint)) +AGL_API(void, NamedRenderbufferStorageEXT, (GLuint, GLenum, GLsizei, GLsizei)) +AGL_API(void, GetNamedRenderbufferParameterivEXT, (GLuint, GLenum, GLint *)) +AGL_API(GLenum, CheckNamedFramebufferStatusEXT, (GLuint, GLenum)) +AGL_API(void, NamedFramebufferTexture1DEXT, (GLuint, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, NamedFramebufferTexture2DEXT, (GLuint, GLenum, GLenum, GLuint, GLint)) +AGL_API(void, NamedFramebufferTexture3DEXT, (GLuint, GLenum, GLenum, GLuint, GLint, GLint)) +AGL_API(void, NamedFramebufferRenderbufferEXT, (GLuint, GLenum, GLenum, GLuint)) +AGL_API(void, GetNamedFramebufferAttachmentParameterivEXT, (GLuint, GLenum, GLenum, GLint *)) +AGL_API(void, GenerateTextureMipmapEXT, (GLuint, GLenum)) +AGL_API(void, GenerateMultiTexMipmapEXT, (GLenum, GLenum)) +AGL_API(void, FramebufferDrawBufferEXT, (GLuint, GLenum)) +AGL_API(void, FramebufferDrawBuffersEXT, (GLuint, GLsizei, const GLenum *)) +AGL_API(void, FramebufferReadBufferEXT, (GLuint, GLenum)) +AGL_API(void, GetFramebufferParameterivEXT, (GLuint, GLenum, GLint *)) +AGL_API(void, NamedRenderbufferStorageMultisampleEXT, (GLuint, GLsizei, GLenum, GLsizei, GLsizei)) +AGL_API(void, NamedRenderbufferStorageMultisampleCoverageEXT, (GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei)) +AGL_API(void, NamedFramebufferTextureEXT, (GLuint, GLenum, GLuint, GLint)) +AGL_API(void, NamedFramebufferTextureLayerEXT, (GLuint, GLenum, GLuint, GLint, GLint)) +AGL_API(void, NamedFramebufferTextureFaceEXT, (GLuint, GLenum, GLuint, GLint, GLenum)) +AGL_API(void, TextureRenderbufferEXT, (GLuint, GLenum, GLuint)) +AGL_API(void, MultiTexRenderbufferEXT, (GLenum, GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_NV_explicit_multisample +AGL_API(void, GetMultisamplefvNV, (GLenum, GLuint, GLfloat *)) +AGL_API(void, SampleMaskIndexedNV, (GLuint, GLbitfield)) +AGL_API(void, TexRenderbufferNV, (GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_NV_transform_feedback2 +AGL_API(void, BindTransformFeedbackNV, (GLenum, GLuint)) +AGL_API(void, DeleteTransformFeedbacksNV, (GLsizei, const GLuint *)) +AGL_API(void, GenTransformFeedbacksNV, (GLsizei, GLuint *)) +AGL_API(GLboolean, IsTransformFeedbackNV, (GLuint)) +AGL_API(void, PauseTransformFeedbackNV, (void)) +AGL_API(void, ResumeTransformFeedbackNV, (void)) +AGL_API(void, DrawTransformFeedbackNV, (GLenum, GLuint)) +#endif + +#if defined _ALLEGRO_GL_AMD_performance_monitor +AGL_API(void, GetPerfMonitorGroupsAMD, (GLint *, GLsizei, GLuint *)) +AGL_API(void, GetPerfMonitorCountersAMD, (GLuint, GLint *, GLint *, GLsizei, GLuint *)) +AGL_API(void, GetPerfMonitorGroupStringAMD, (GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, GetPerfMonitorCounterStringAMD, (GLuint, GLuint, GLsizei, GLsizei *, GLchar *)) +AGL_API(void, GetPerfMonitorCounterInfoAMD, (GLuint, GLuint, GLenum, void *)) +AGL_API(void, GenPerfMonitorsAMD, (GLsizei, GLuint *)) +AGL_API(void, DeletePerfMonitorsAMD, (GLsizei, GLuint *)) +AGL_API(void, SelectPerfMonitorCountersAMD, (GLuint, GLboolean, GLuint, GLint, GLuint *)) +AGL_API(void, BeginPerfMonitorAMD, (GLuint)) +AGL_API(void, EndPerfMonitorAMD, (GLuint)) +AGL_API(void, GetPerfMonitorCounterDataAMD, (GLuint, GLenum, GLsizei, GLuint *, GLint *)) +#endif + +#if defined _ALLEGRO_GL_AMD_vertex_shader_tesselator +AGL_API(void, TessellationFactorAMD, (GLfloat)) +AGL_API(void, TessellationModeAMD, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_EXT_provoking_vertex +AGL_API(void, ProvokingVertexEXT, (GLenum)) +#endif + +#if defined _ALLEGRO_GL_AMD_draw_buffers_blend +AGL_API(void, BlendFuncIndexedAMD, (GLuint buf, GLenum src, GLenum dst)) +AGL_API(void, BlendFuncSeparateIndexedAMD, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) +AGL_API(void, BlendEquationIndexedAMD, (GLuint buf, GLenum mode)) +AGL_API(void, BlendEquationSeparateIndexedAMD, (GLuint buf, GLenum modeRGB, GLenum modeAlpha)) +#endif + +#if defined _ALLEGRO_GL_APPLE_texture_range +AGL_API(void, TextureRangeAPPLE, (GLenum target, GLsizei length, const GLvoid *pointer)) +AGL_API(void, GetTexParameterPointervAPPLE, (GLenum target, GLenum pname, GLvoid* *params)) +#endif + +#if defined _ALLEGRO_GL_APPLE_vertex_program_evaluators +AGL_API(void, EnableVertexAttribAPPLE, (GLuint index, GLenum pname)) +AGL_API(void, DisableVertexAttribAPPLE, (GLuint index, GLenum pname)) +AGL_API(GLboolean, IsVertexAttribEnabledAPPLE, (GLuint index, GLenum pname)) +AGL_API(void, MapVertexAttrib1dAPPLE, (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) +AGL_API(void, MapVertexAttrib1fAPPLE, (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) +AGL_API(void, MapVertexAttrib2dAPPLE, (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) +AGL_API(void, MapVertexAttrib2fAPPLE, (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) +#endif + +#if defined _ALLEGRO_GL_APPLE_object_purgeable +AGL_API(GLenum, ObjectPurgeableAPPLE, (GLenum objectType, GLuint name, GLenum option)) +AGL_API(GLenum, ObjectUnpurgeableAPPLE, (GLenum objectType, GLuint name, GLenum option)) +AGL_API(void, GetObjectParameterivAPPLE, (GLenum objectType, GLuint name, GLenum pname, GLint *params)) +#endif + +#if defined _ALLEGRO_GL_NV_video_capture +AGL_API(void, BeginVideoCaptureNV, (GLuint video_capture_slot)) +AGL_API(void, BindVideoCaptureStreamBufferNV, (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset)) +AGL_API(void, BindVideoCaptureStreamTextureNV, (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture)) +AGL_API(void, EndVideoCaptureNV, (GLuint video_capture_slot)) +AGL_API(void, GetVideoCaptureivNV, (GLuint video_capture_slot, GLenum pname, GLint *params)) +AGL_API(void, GetVideoCaptureStreamivNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params)) +AGL_API(void, GetVideoCaptureStreamfvNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params)) +AGL_API(void, GetVideoCaptureStreamdvNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params)) +AGL_API(GLenum, VideoCaptureNV, (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time)) +AGL_API(void, VideoCaptureStreamParameterivNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params)) +AGL_API(void, VideoCaptureStreamParameterfvNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params)) +AGL_API(void, VideoCaptureStreamParameterdvNV, (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params)) +#endif + +#if defined _ALLEGRO_GL_EXT_separate_shader_objects +AGL_API(void, UseShaderProgramEXT, (GLenum type, GLuint program)) +AGL_API(void, ActiveProgramEXT, (GLuint program)) +AGL_API(GLuint, CreateShaderProgramEXT, (GLenum type, const GLchar *string)) +#endif + +#if defined _ALLEGRO_GL_NV_shader_buffer_load +AGL_API(void, MakeBufferResidentNV, (GLenum target, GLenum access)) +AGL_API(void, MakeBufferNonResidentNV, (GLenum target)) +AGL_API(GLboolean, IsBufferResidentNV, (GLenum target)) +AGL_API(void, MakeNamedBufferResidentNV, (GLuint buffer, GLenum access)) +AGL_API(void, MakeNamedBufferNonResidentNV, (GLuint buffer)) +AGL_API(GLboolean, IsNamedBufferResidentNV, (GLuint buffer)) +AGL_API(void, GetBufferParameterui64vNV, (GLenum target, GLenum pname, GLuint64EXT *params)) +AGL_API(void, GetNamedBufferParameterui64vNV, (GLuint buffer, GLenum pname, GLuint64EXT *params)) +AGL_API(void, GetIntegerui64vNV, (GLenum value, GLuint64EXT *result)) +AGL_API(void, Uniformui64NV, (GLint location, GLuint64EXT value)) +AGL_API(void, Uniformui64vNV, (GLint location, GLsizei count, const GLuint64EXT *value)) +AGL_API(void, GetUniformui64vNV, (GLuint program, GLint location, GLuint64EXT *params)) +AGL_API(void, ProgramUniformui64NV, (GLuint program, GLint location, GLuint64EXT value)) +AGL_API(void, ProgramUniformui64vNV, (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value)) +#endif + +#if defined _ALLEGRO_GL_NV_vertex_buffer_unified_memory +AGL_API(void, BufferAddressRangeNV, (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length)) +AGL_API(void, VertexFormatNV, (GLint size, GLenum type, GLsizei stride)) +AGL_API(void, NormalFormatNV, (GLenum type, GLsizei stride)) +AGL_API(void, ColorFormatNV, (GLint size, GLenum type, GLsizei stride)) +AGL_API(void, IndexFormatNV, (GLenum type, GLsizei stride)) +AGL_API(void, TexCoordFormatNV, (GLint size, GLenum type, GLsizei stride)) +AGL_API(void, EdgeFlagFormatNV, (GLsizei stride)) +AGL_API(void, SecondaryColorFormatNV, (GLint size, GLenum type, GLsizei stride)) +AGL_API(void, FogCoordFormatNV, (GLenum type, GLsizei stride)) +AGL_API(void, VertexAttribFormatNV, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride)) +AGL_API(void, VertexAttribIFormatNV, (GLuint index, GLint size, GLenum type, GLsizei stride)) +AGL_API(void, GetIntegerui64i_vNV, (GLenum value, GLuint index, GLuint64EXT *result)) +#endif + +#if defined _ALLEGRO_GL_NV_texture_barrier +AGL_API(void, TextureBarrierNV, (void)) +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_defs.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_defs.h new file mode 100644 index 0000000..855963b --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_defs.h @@ -0,0 +1,5108 @@ +/* */ + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#define _ALLEGRO_GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#endif + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging +#define _ALLEGRO_GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#define _ALLEGRO_GL_VERSION_1_3 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#endif + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#define _ALLEGRO_GL_VERSION_1_4 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#endif + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#define _ALLEGRO_GL_VERSION_1_5 +/* New types */ +#include +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +/* Renamed enumerants */ +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +/* Promoted exts */ +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#endif + + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +#define _ALLEGRO_GL_VERSION_2_0 +/* New types */ +typedef char GLchar; + +#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_COORDS 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#endif + + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#define _ALLEGRO_GL_VERSION_2_1 +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#endif + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 +#define _ALLEGRO_GL_VERSION_3_0 +#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB +#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0 +#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1 +#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2 +#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3 +#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4 +#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5 +#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_DEPTH_BUFFER 0x8223 +#define GL_STENCIL_BUFFER 0x8224 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_ALPHA_INTEGER 0x8D97 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#endif + +#ifndef GL_VERSION_3_0_DEPRECATED +#define GL_VERSION_3_0_DEPRECATED +#define _ALLEGRO_GL_VERSION_3_0_DEPRECATED +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_ALPHA_INTEGER 0x8D97 +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_TEXTURE_LUMINANCE_TYPE */ +/* reuse GL_TEXTURE_INTENSITY_TYPE */ +#endif + + +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 +#define _ALLEGRO_GL_VERSION_3_1 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#endif + +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 +#define _ALLEGRO_GL_VERSION_3_2 +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#endif + +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 +#define _ALLEGRO_GL_VERSION_3_3 +#endif + + + +/* */ +/* */ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture +#define _ALLEGRO_GL_ARB_multitexture +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix +#define _ALLEGRO_GL_ARB_transpose_matrix +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#endif + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample +#define _ALLEGRO_GL_ARB_multisample +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map +#define _ALLEGRO_GL_ARB_texture_cube_map +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression +#define _ALLEGRO_GL_ARB_texture_compression +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp +#define _ALLEGRO_GL_ARB_texture_border_clamp +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters +#define _ALLEGRO_GL_ARB_point_parameters +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend +#define _ALLEGRO_GL_ARB_vertex_blend +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette +#define _ALLEGRO_GL_ARB_matrix_palette +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine +#define _ALLEGRO_GL_ARB_texture_env_combine +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 +#define _ALLEGRO_GL_ARB_texture_env_dot3 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat +#define _ALLEGRO_GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture +#define _ALLEGRO_GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos +#define _ALLEGRO_GL_ARB_window_pos +#endif + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow +#define _ALLEGRO_GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient +#define _ALLEGRO_GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program +#define _ALLEGRO_GL_ARB_vertex_program +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#endif + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program +#define _ALLEGRO_GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object +#define _ALLEGRO_GL_ARB_vertex_buffer_object +#include +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query +#define _ALLEGRO_GL_ARB_occlusion_query +#define GL_SAMPLES_PASSED_ARB 0x8914 +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects +#define _ALLEGRO_GL_ARB_shader_objects +typedef char GLcharARB; +typedef unsigned long GLhandleARB; +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#define GL_SHADER_OBJECT_ARB 0x8B48 +/* GL_FLOAT */ +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +/* GL_INT */ +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#endif + + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader +#define _ALLEGRO_GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#if !defined GL_ARB_shader_objects +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#endif +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#if !defined GL_ARB_shader_objects +#define GL_SHADER_OBJECT_ARB 0x8B48 +#endif +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#if !defined GL_ARB_shader_objects +/* GL_FLOAT */ +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#endif +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader +#define _ALLEGRO_GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#if !defined GL_ARB_shader_objects && !defined GL_ARB_vertex_shader +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_SHADER_OBJECT_ARB 0x8B48 +#endif +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 +#define _ALLEGRO_GL_ARB_shading_language_100 +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two +#define _ALLEGRO_GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite +#define _ALLEGRO_GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +/* GL_FALSE */ +/* GL_TRUE */ +#endif + + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers +#define _ALLEGRO_GL_ARB_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#endif + + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle +#define _ALLEGRO_GL_ARB_texture_rectangle +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif +#ifdef ALLEGRO_MACOSX +#ifndef GL_EXT_texture_rectangle +#define GL_EXT_texture_rectangle +#define _ALLEGRO_GL_EXT_texture_rectangle +#define GL_TEXTURE_RECTANGLE_EXT 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8 +#endif +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float +#define _ALLEGRO_GL_ARB_color_buffer_float +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +#endif + + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel +#define _ALLEGRO_GL_ARB_half_float_pixel +#define GL_HALF_FLOAT_ARB 0x140B +#endif + + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float +#define _ALLEGRO_GL_ARB_texture_float +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object +#define _ALLEGRO_GL_ARB_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float +#define _ALLEGRO_GL_ARB_depth_buffer_float +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#endif + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced +#define _ALLEGRO_GL_ARB_draw_instanced +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object +#define _ALLEGRO_GL_ARB_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_INDEX 0x8222 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB +#define _ALLEGRO_GL_ARB_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 +#define _ALLEGRO_GL_ARB_geometry_shader4 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex +#define _ALLEGRO_GL_ARB_half_float_vertex +#define GL_HALF_FLOAT 0x140B +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays +#define _ALLEGRO_GL_ARB_instanced_arrays +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range +#define _ALLEGRO_GL_ARB_map_buffer_range +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object +#define _ALLEGRO_GL_ARB_texture_buffer_object +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc +#define _ALLEGRO_GL_ARB_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#endif + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg +#define _ALLEGRO_GL_ARB_texture_rg +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object +#define _ALLEGRO_GL_ARB_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#endif + +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object +#define _ALLEGRO_GL_ARB_uniform_buffer_object +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#endif + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility +#define _ALLEGRO_GL_ARB_compatibility +/* ARB_compatibility just defines tokens from core 3.0 */ +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer +#define _ALLEGRO_GL_ARB_copy_buffer +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#endif + +#ifndef GL_ARB_shader_texture_lod +#define GL_ARB_shader_texture_lod +#define _ALLEGRO_GL_ARB_shader_texture_lod +#endif + +#ifndef GL_ARB_depth_clamp +#define GL_ARB_depth_clamp +#define _ALLEGRO_GL_ARB_depth_clamp +#define GL_DEPTH_CLAMP 0x864F +#endif + +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex +#define _ALLEGRO_GL_ARB_draw_elements_base_vertex +#endif + +#ifndef GL_ARB_fragment_coord_conventions +#define GL_ARB_fragment_coord_conventions +#define _ALLEGRO_GL_ARB_fragment_coord_conventions +#endif + +#ifndef GL_ARB_provoking_vertex +#define GL_ARB_provoking_vertex +#define _ALLEGRO_GL_ARB_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#endif + +#ifndef GL_ARB_seamless_cube_map +#define GL_ARB_seamless_cube_map +#define _ALLEGRO_GL_ARB_seamless_cube_map +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#endif + +#ifndef GL_ARB_sync +#define GL_ARB_sync +#define _ALLEGRO_GL_ARB_sync +#if (defined _MSC_VER) && (_MSC_VER < 1400) +typedef __int64 GLint64; +typedef unsigned __int64 GLuint64; +#else +typedef int64_t GLint64; +typedef uint64_t GLuint64; +#endif +typedef struct __GLsync *GLsync; +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#endif + +#ifndef GL_ARB_texture_multisample +#define GL_ARB_texture_multisample +#define _ALLEGRO_GL_ARB_texture_multisample +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#endif + +#ifndef GL_ARB_vertex_array_bgra +#define GL_ARB_vertex_array_bgra +#define _ALLEGRO_GL_ARB_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_ARB_draw_buffers_blend +#define GL_ARB_draw_buffers_blend +#define _ALLEGRO_GL_ARB_draw_buffers_blend +#endif + +#ifndef GL_ARB_sample_shading +#define GL_ARB_sample_shading +#define _ALLEGRO_GL_ARB_sample_shading +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#endif + +#ifndef GL_ARB_texture_cube_map_array +#define GL_ARB_texture_cube_map_array +#define _ALLEGRO_GL_ARB_texture_cube_map_array +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#endif + +#ifndef GL_ARB_texture_gather +#define GL_ARB_texture_gather +#define _ALLEGRO_GL_ARB_texture_gather +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +#endif + +#ifndef GL_ARB_texture_query_lod +#define GL_ARB_texture_query_lod +#define _ALLEGRO_GL_ARB_texture_query_lod +#endif + +#ifndef GL_ARB_shading_language_include +#define GL_ARB_shading_language_include +#define _ALLEGRO_GL_ARB_shading_language_include +#define GL_SHADER_INCLUDE_ARB 0x8DAE +#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +#endif + +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc +#define _ALLEGRO_GL_ARB_texture_compression_bptc +#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +#endif + +#ifndef GL_ARB_blend_func_extended +#define GL_ARB_blend_func_extended +#define _ALLEGRO_GL_ARB_blend_func_extended +#define GL_SRC1_COLOR 0x88F9 +/* reuse GL_SRC1_ALPHA */ +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#endif + +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location +#define _ALLEGRO_GL_ARB_explicit_attrib_location +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 +#define _ALLEGRO_GL_ARB_occlusion_query2 +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#endif + +#ifndef GL_ARB_sampler_objects +#define GL_ARB_sampler_objects +#define _ALLEGRO_GL_ARB_sampler_objects +#define GL_SAMPLER_BINDING 0x8919 +#endif + +#ifndef GL_ARB_shader_bit_encoding +#define GL_ARB_shader_bit_encoding +#define _ALLEGRO_GL_ARB_shader_bit_encoding +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui +#define _ALLEGRO_GL_ARB_texture_rgb10_a2ui +#define GL_RGB10_A2UI 0x906F +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle +#define _ALLEGRO_GL_ARB_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#endif + +#ifndef GL_ARB_timer_query +#define GL_ARB_timer_query +#define _ALLEGRO_GL_ARB_timer_query +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#endif + +#ifndef GL_ARB_vertex_type_2_10_10_10_rev +#define GL_ARB_vertex_type_2_10_10_10_rev +#define _ALLEGRO_GL_ARB_vertex_type_2_10_10_10_rev +/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ +#define GL_INT_2_10_10_10_REV 0x8D9F +#endif + +#ifndef GL_ARB_draw_indirect +#define GL_ARB_draw_indirect +#define _ALLEGRO_GL_ARB_draw_indirect +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#endif + +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 +#define _ALLEGRO_GL_ARB_gpu_shader5 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#endif + +#ifndef GL_ARB_gpu_shader_fp64 +#define GL_ARB_gpu_shader_fp64 +#define _ALLEGRO_GL_ARB_gpu_shader_fp64 +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#endif + +#ifndef GL_ARB_shader_subroutine +#define GL_ARB_shader_subroutine +#define _ALLEGRO_GL_ARB_shader_subroutine +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +/* reuse GL_UNIFORM_SIZE */ +/* reuse GL_UNIFORM_NAME_LENGTH */ +#endif + +#ifndef GL_ARB_tessellation_shader +#define GL_ARB_tessellation_shader +#define _ALLEGRO_GL_ARB_tessellation_shader +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +/* reuse GL_TRIANGLES */ +/* reuse GL_QUADS */ +#define GL_ISOLINES 0x8E7A +/* reuse GL_EQUAL */ +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +/* reuse GL_CCW */ +/* reuse GL_CW */ +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#endif + +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 +#define _ALLEGRO_GL_ARB_texture_buffer_object_rgb32 +/* reuse GL_RGB32F */ +/* reuse GL_RGB32UI */ +/* reuse GL_RGB32I */ +#endif + +#ifndef GL_ARB_transform_feedback2 +#define GL_ARB_transform_feedback2 +#define _ALLEGRO_GL_ARB_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#endif + +#ifndef GL_ARB_transform_feedback3 +#define GL_ARB_transform_feedback3 +#define _ALLEGRO_GL_ARB_transform_feedback3 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#endif + + +/* */ + + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr +#define _ALLEGRO_GL_EXT_abgr +#define GL_ABGR_EXT 0x8000 +#endif + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color +#define _ALLEGRO_GL_EXT_blend_color +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset +#define _ALLEGRO_GL_EXT_polygon_offset +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +#endif + +#ifndef GL_EXT_texture +#define GL_EXT_texture +#define _ALLEGRO_GL_EXT_texture +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D +#define _ALLEGRO_GL_EXT_texture3D +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 +#define _ALLEGRO_GL_SGIS_texture_filter4 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +#endif + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram +#define _ALLEGRO_GL_EXT_histogram +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +#endif + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture +#define _ALLEGRO_GL_EXT_subtexture +#endif + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture +/* NV's headers don't define EXT_copy_texture yet provide the API */ +#ifndef ALLEGRO_GL_HEADER_NV +#define _ALLEGRO_GL_EXT_copy_texture +#endif +#endif + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram +#define _ALLEGRO_GL_EXT_histogram +#endif + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution +#define _ALLEGRO_GL_EXT_convolution +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +#endif + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix +#define _ALLEGRO_GL_SGI_color_matrix +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table +#define _ALLEGRO_GL_SGI_color_table +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture +#define _ALLEGRO_GL_SGIS_pixel_texture +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture +#define _ALLEGRO_GL_SGIX_pixel_texture +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +#endif + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D +#define _ALLEGRO_GL_SGIS_texture4D +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table +#define _ALLEGRO_GL_SGI_texture_color_table +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka +#define _ALLEGRO_GL_EXT_cmyka +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object +#define _ALLEGRO_GL_EXT_texture_object +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture +#define _ALLEGRO_GL_SGIS_detail_texture +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture +#define _ALLEGRO_GL_SGIS_sharpen_texture +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels +#define _ALLEGRO_GL_EXT_packed_pixels +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod +#define _ALLEGRO_GL_SGIS_texture_lod +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample +#define _ALLEGRO_GL_SGIS_multisample +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal +#define _ALLEGRO_GL_EXT_rescale_normal +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array +#define _ALLEGRO_GL_EXT_vertex_array +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap +#define _ALLEGRO_GL_SGIS_generate_mipmap +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap +#define _ALLEGRO_GL_SGIX_clipmap +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow +#define _ALLEGRO_GL_SGIX_shadow +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp +#define _ALLEGRO_GL_SGIS_texture_edge_clamp +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax +#define _ALLEGRO_GL_EXT_blend_minmax +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract +#define _ALLEGRO_GL_EXT_blend_subtract +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace +#define _ALLEGRO_GL_SGIX_interlace +#define GL_INTERLACE_SGIX 0x8094 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles +#define _ALLEGRO_GL_SGIX_pixel_tiles +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif + +#ifndef GL_SGIS_texture_select +#define GL_SGIS_texture_select +#define _ALLEGRO_GL_SGIS_texture_select +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite +#define _ALLEGRO_GL_SGIX_sprite +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer +#define _ALLEGRO_GL_SGIX_texture_multi_buffer +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters +#define _ALLEGRO_GL_EXT_point_parameters +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters +#define _ALLEGRO_GL_SGIS_point_parameters +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +#endif + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments +#define _ALLEGRO_GL_SGIX_instruments +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias +#define _ALLEGRO_GL_SGIX_texture_scale_bias +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom +#define _ALLEGRO_GL_SGIX_framezoom +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +#endif + +#ifndef GL_FfdMaskSGIX +#define GL_FfdMaskSGIX +#define _ALLEGRO_GL_FfdMaskSGIX +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer +#define _ALLEGRO_GL_SGIX_tag_sample_buffer +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd +#define _ALLEGRO_GL_SGIX_polynomial_ffd +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane +#define _ALLEGRO_GL_SGIX_reference_plane +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture +#define _ALLEGRO_GL_SGIX_depth_texture +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster +#define _ALLEGRO_GL_SGIX_flush_raster +#endif + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function +#define _ALLEGRO_GL_SGIS_fog_function +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset +#define _ALLEGRO_GL_SGIX_fog_offset +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform +#define _ALLEGRO_GL_HP_image_transform +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes +#define _ALLEGRO_GL_HP_convolution_border_modes +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env +#define _ALLEGRO_GL_SGIX_texture_add_env +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable +#define _ALLEGRO_GL_EXT_color_subtable +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints +#define _ALLEGRO_GL_PGI_vertex_hints +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints +#define _ALLEGRO_GL_PGI_misc_hints +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture +#define _ALLEGRO_GL_EXT_paletted_texture +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint +#define _ALLEGRO_GL_EXT_clip_volume_hint +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority +#define _ALLEGRO_GL_SGIX_list_priority +#define GL_LIST_PRIORITY_SGIX 0x8182 +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 +#define _ALLEGRO_GL_SGIX_ir_instrument1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment +#define _ALLEGRO_GL_SGIX_calligraphic_fragment +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias +#define _ALLEGRO_GL_SGIX_texture_lod_bias +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient +#define _ALLEGRO_GL_SGIX_shadow_ambient +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material +#define _ALLEGRO_GL_EXT_index_material +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +#endif + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func +#define _ALLEGRO_GL_EXT_index_func +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats +#define _ALLEGRO_GL_EXT_index_array_formats +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array +#define _ALLEGRO_GL_EXT_compiled_vertex_array +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex +#define _ALLEGRO_GL_EXT_cull_vertex +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb +#define _ALLEGRO_GL_SGIX_ycrcb +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting +#define _ALLEGRO_GL_SGIX_fragment_lighting +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip +#define _ALLEGRO_GL_IBM_rasterpos_clip +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting +#define _ALLEGRO_GL_HP_texture_lighting +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements +#define _ALLEGRO_GL_EXT_draw_range_elements +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +#endif + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading +#define _ALLEGRO_GL_WIN_phong_shading +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog +#define _ALLEGRO_GL_WIN_specular_fog +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture +#define _ALLEGRO_GL_EXT_light_texture +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +#ifndef GL_FRAGMENT_DEPTH_EXT +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#endif +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax +#define _ALLEGRO_GL_SGIX_blend_alpha_minmax +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif + +#ifndef GL_SGIX_impact_pixel_texture +#define GL_SGIX_impact_pixel_texture +#define _ALLEGRO_GL_SGIX_impact_pixel_texture +#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +#endif + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra +#define _ALLEGRO_GL_EXT_bgra +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif + +#ifndef GL_SGIX_async +#define GL_SGIX_async +#define _ALLEGRO_GL_SGIX_async +#define GL_ASYNC_MARKER_SGIX 0x8329 +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel +#define _ALLEGRO_GL_SGIX_async_pixel +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram +#define _ALLEGRO_GL_SGIX_async_histogram +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays +#define _ALLEGRO_GL_INTEL_parallel_arrays +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +#endif + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test +#define _ALLEGRO_GL_HP_occlusion_test +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform +#define _ALLEGRO_GL_EXT_pixel_transform +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette +#define _ALLEGRO_GL_EXT_shared_texture_palette +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color +#define _ALLEGRO_GL_EXT_separate_specular_color +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color +#define _ALLEGRO_GL_EXT_secondary_color +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal +#define _ALLEGRO_GL_EXT_texture_perturb_normal +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays +#define _ALLEGRO_GL_EXT_multi_draw_arrays +#endif + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord +#define _ALLEGRO_GL_EXT_fog_coord +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates +#define _ALLEGRO_GL_REND_screen_coordinates +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame +#define _ALLEGRO_GL_EXT_coordinate_frame +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine +#define _ALLEGRO_GL_EXT_texture_env_combine +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector +#define _ALLEGRO_GL_APPLE_specular_vector +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint +#define _ALLEGRO_GL_APPLE_transform_hint +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_SGIX_fog_scale +#define _ALLEGRO_GL_SGIX_fog_scale +#define GL_FOG_SCALE_SGIX 0x81FC +#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +#endif + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data +#define _ALLEGRO_GL_SUNX_constant_data +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +#endif + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha +#define _ALLEGRO_GL_SUN_global_alpha +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +#endif + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list +#define _ALLEGRO_GL_SUN_triangle_list +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +#endif + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex +#define _ALLEGRO_GL_SUN_vertex +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate +#define _ALLEGRO_GL_EXT_blend_func_separate +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +#endif + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp +#define _ALLEGRO_GL_INGR_color_clamp +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate +#define _ALLEGRO_GL_INGR_blend_func_separate +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read +#define _ALLEGRO_GL_INGR_interlace_read +#define GL_INTERLACE_READ_INGR 0x8568 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap +#define _ALLEGRO_GL_EXT_stencil_wrap +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels +#define _ALLEGRO_GL_EXT_422_pixels +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection +#define _ALLEGRO_GL_NV_texgen_reflection +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif + +#ifndef GL_EXT_texture_cube_map +#define GL_EXT_texture_cube_map +#define _ALLEGRO_GL_EXT_texture_cube_map +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes +#define _ALLEGRO_GL_SUN_convolution_border_modes +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias +#define _ALLEGRO_GL_EXT_texture_lod_bias +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic +#define _ALLEGRO_GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting +#define _ALLEGRO_GL_EXT_vertex_weighting +#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT GL_MODELVIEW +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent +#define _ALLEGRO_GL_NV_light_max_exponent +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range +#define _ALLEGRO_GL_NV_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +#endif + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners +#define _ALLEGRO_GL_NV_register_combiners +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +/* GL_TEXTURE0_ARB */ +/* GL_TEXTURE1_ARB */ +/* GL_ZERO */ +/* GL_NONE */ +/* GL_FOG */ +#endif + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance +#define _ALLEGRO_GL_NV_fog_distance +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +/* GL_EYE_PLANE */ +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss +#define _ALLEGRO_GL_NV_texgen_emboss +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 +#define _ALLEGRO_GL_NV_texture_env_combine4 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc +#define _ALLEGRO_GL_EXT_texture_compression_s3tc +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers +#define _ALLEGRO_GL_MESA_resize_buffers +#endif + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos +#define _ALLEGRO_GL_MESA_window_pos +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex +#define _ALLEGRO_GL_IBM_cull_vertex +#define GL_CULL_VERTEX_IBM 103050 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays +#define _ALLEGRO_GL_IBM_multimode_draw_arrays +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists +#define _ALLEGRO_GL_IBM_vertex_array_lists +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +#endif + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample +#define _ALLEGRO_GL_SGIX_subsample +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba +#define _ALLEGRO_GL_SGIX_ycrcba +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif + +#ifndef GL_SGI_depth_pass_instrument +#define GL_SGI_depth_pass_instrument +#define _ALLEGRO_GL_SGI_depth_pass_instrument +#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 +#define _ALLEGRO_GL_3DFX_texture_compression_FXT1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample +#define _ALLEGRO_GL_3DFX_multisample +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer +#ifndef ALLEGRO_GL_HEADER_NV +#define _ALLEGRO_GL_3DFX_tbuffer +#endif +#endif + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample +#define _ALLEGRO_GL_EXT_multisample +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip +#define _ALLEGRO_GL_SGIX_vertex_preclip +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy +#define _ALLEGRO_GL_SGIX_convolution_accuracy +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample +#define _ALLEGRO_GL_SGIX_resample +#define GL_PACK_RESAMPLE_SGIX 0x842C +#define GL_UNPACK_RESAMPLE_SGIX 0x842D +#define GL_RESAMPLE_REPLICATE_SGIX 0x842E +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen +#define _ALLEGRO_GL_SGIS_point_line_texgen +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask +#ifndef ALLEGRO_GL_HEADER_NV +#define _ALLEGRO_GL_SGIS_texture_color_mask +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#endif +#endif + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface +#define _ALLEGRO_GL_SGIX_igloo_interface +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 +#define _ALLEGRO_GL_EXT_texture_env_dot3 +/* GL_DOT3_RGB_EXT */ +/* GL_DOT3_RGBA_EXT */ +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once +#define _ALLEGRO_GL_ATI_texture_mirror_once +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif + +#ifndef GL_NV_fence +#define GL_NV_fence +#define _ALLEGRO_GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_IBM_texture_mirrored_repeat +#define _ALLEGRO_GL_IBM_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators +#define _ALLEGRO_GL_NV_evaluators +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil +#define _ALLEGRO_GL_NV_packed_depth_stencil +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 +#define _ALLEGRO_GL_NV_register_combiners2 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle +#define _ALLEGRO_GL_NV_texture_rectangle +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader +#define _ALLEGRO_GL_NV_texture_shader +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 +#define _ALLEGRO_GL_NV_texture_shader2 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 +#define _ALLEGRO_GL_NV_vertex_array_range2 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program +#define _ALLEGRO_GL_NV_vertex_program +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp +#define _ALLEGRO_GL_SGIX_texture_coordinate_clamp +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint +#define _ALLEGRO_GL_SGIX_scalebias_hint +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif + +#ifndef GL_OML_interlace +#define GL_OML_interlace +#define _ALLEGRO_GL_OML_interlace +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif + +#ifndef GL_OML_subsample +#define GL_OML_subsample +#define _ALLEGRO_GL_OML_subsample +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif + +#ifndef GL_OML_resample +#define GL_OML_resample +#define _ALLEGRO_GL_OML_resample +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color +#define _ALLEGRO_GL_NV_copy_depth_to_color +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap +#define _ALLEGRO_GL_ATI_envmap_bumpmap +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader +#define _ALLEGRO_GL_ATI_fragment_shader +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles +#define _ALLEGRO_GL_ATI_pn_triangles +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object +#define _ALLEGRO_GL_ATI_vertex_array_object +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader +#define _ALLEGRO_GL_EXT_vertex_shader +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams +#define _ALLEGRO_GL_ATI_vertex_streams +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +#endif + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array +#define _ALLEGRO_GL_ATI_element_array +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#endif + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array +#define _ALLEGRO_GL_SUN_mesh_array +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum +#define _ALLEGRO_GL_SUN_slice_accum +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint +#define _ALLEGRO_GL_NV_multisample_filter_hint +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp +#define _ALLEGRO_GL_NV_depth_clamp +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query +#define _ALLEGRO_GL_NV_occlusion_query +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#endif + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite +#define _ALLEGRO_GL_NV_point_sprite +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 +#define _ALLEGRO_GL_NV_texture_shader3 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side +#define _ALLEGRO_GL_EXT_stencil_two_side +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader +#define _ALLEGRO_GL_ATI_text_fragment_shader +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage +#define _ALLEGRO_GL_APPLE_client_storage +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array +#define _ALLEGRO_GL_APPLE_element_array +#define GL_ELEMENT_ARRAY_APPLE 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A +#endif + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence +#define _ALLEGRO_GL_APPLE_fence +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object +#define _ALLEGRO_GL_APPLE_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range +#define _ALLEGRO_GL_APPLE_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 +#define _ALLEGRO_GL_APPLE_ycbcr_422 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc +#define _ALLEGRO_GL_S3_s3tc +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers +#define _ALLEGRO_GL_ATI_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 +#define _ALLEGRO_GL_ATI_texture_env_combine3 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float +#define _ALLEGRO_GL_ATI_texture_float +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer +#define _ALLEGRO_GL_NV_float_buffer +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program +#define _ALLEGRO_GL_NV_fragment_program +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#endif + +#ifndef GL_NV_half_float +#define GL_NV_half_float +#define _ALLEGRO_GL_NV_half_float +typedef short GLhalfNV; +#define GL_HALF_FLOAT_NV 0x140B +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range +#define _ALLEGRO_GL_NV_pixel_data_range +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#endif + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart +#define _ALLEGRO_GL_NV_primitive_restart +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal +#define _ALLEGRO_GL_NV_texture_expand_normal +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer +#define _ALLEGRO_GL_ATI_map_object_buffer +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object +#define _ALLEGRO_GL_ATI_vertex_attrib_array_object +#endif + +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates +#define _ALLEGRO_GL_OES_byte_coordinates +/* GL_BYTE */ +#endif + +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point +#define _ALLEGRO_GL_OES_fixed_point +typedef int GLfixed; +typedef int GLclampx; +#define GL_FIXED_OES 0x140C +#endif + +#ifndef GL_OES_single_precision +#define GL_OES_single_precision +#define _ALLEGRO_GL_OES_single_precision +#endif + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture +#define _ALLEGRO_GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +#ifndef GL_OES_read_format +#define GL_OES_read_format +#define _ALLEGRO_GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix +#define _ALLEGRO_GL_OES_query_matrix +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test +#define _ALLEGRO_GL_EXT_depth_bounds_test +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp +#define _ALLEGRO_GL_EXT_texture_mirror_clamp +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate +#define _ALLEGRO_GL_EXT_blend_equation_separate +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 /* Same as GL_BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#endif + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert +#define _ALLEGRO_GL_MESA_pack_invert +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture +#define _ALLEGRO_GL_MESA_ycbcr_texture +#define GL_YCBCR_MESA 0x8757 +/* Same as GL_UNSIGNED_SHORT_8_8_APPLE and GL_UNSIGNED_SHORT_8_8_REV_APPLE */ +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#endif + + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object +#define _ALLEGRO_GL_EXT_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + + + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option +#define _ALLEGRO_GL_NV_fragment_program_option +#endif + + + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 +#define _ALLEGRO_GL_NV_fragment_program2 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + + + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option +#define _ALLEGRO_GL_NV_vertex_program2_option +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#endif + + + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 +#define _ALLEGRO_GL_NV_vertex_program3 +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#endif + + +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 +#define _ALLEGRO_GL_EXT_texture_compression_dxt1 +#ifndef ALLEGRO_GL_EXT_texture_compression_s3tc +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif +#endif + + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object +#define _ALLEGRO_GL_EXT_framebuffer_object +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_STENCIL_INDEX_EXT 0x8D45 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_FRAMEBUFFER_STATUS_ERROR_EXT 0x8CDE +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#endif + + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker +#define _ALLEGRO_GL_GREMEDY_string_marker +#endif + + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil +#define _ALLEGRO_GL_EXT_packed_depth_stencil +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag +#define _ALLEGRO_GL_EXT_stencil_clear_tag +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB +#define _ALLEGRO_GL_EXT_texture_sRGB +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit +#define _ALLEGRO_GL_EXT_framebuffer_blit +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample +#define _ALLEGRO_GL_EXT_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack +#define _ALLEGRO_GL_MESAX_texture_stack +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query +#define _ALLEGRO_GL_EXT_timer_query +#if (defined _MSC_VER) && (_MSC_VER < 1400) +typedef __int64 GLint64EXT; +typedef unsigned __int64 GLuint64EXT; +#else +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +#endif +#define GL_TIME_ELAPSED_EXT 0x88BF +#endif + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters +#define _ALLEGRO_GL_EXT_gpu_program_parameters +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range +#define _ALLEGRO_GL_APPLE_flush_buffer_range +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform +#define _ALLEGRO_GL_EXT_bindable_uniform +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#endif + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 +#define _ALLEGRO_GL_EXT_draw_buffers2 +#endif + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced +#define _ALLEGRO_GL_EXT_draw_instanced +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB +#define _ALLEGRO_GL_EXT_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 +#define _ALLEGRO_GL_EXT_geometry_shader4 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_LINES_ADJACENCY_EXT 0xA +#define GL_LINE_STRIP_ADJACENCY_EXT 0xB +#define GL_TRIANGLES_ADJACENCY_EXT 0xC +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 +#define _ALLEGRO_GL_EXT_gpu_shader4 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT 0x1405 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 +#endif + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float +#define _ALLEGRO_GL_EXT_packed_float +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array +#define _ALLEGRO_GL_EXT_texture_array +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object +#define _ALLEGRO_GL_EXT_texture_buffer_object +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc +#define _ALLEGRO_GL_EXT_texture_compression_latc +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc +#define _ALLEGRO_GL_EXT_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer +#define _ALLEGRO_GL_EXT_texture_integer +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent +#define _ALLEGRO_GL_EXT_texture_shared_exponent +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float +#define _ALLEGRO_GL_NV_depth_buffer_float +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +#endif + +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 +#define _ALLEGRO_GL_NV_fragment_program4 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage +#define _ALLEGRO_GL_NV_framebuffer_multisample_coverage +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 +#define _ALLEGRO_GL_NV_geometry_program4 +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +#if !defined GL_EXT_geometry_shader4 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_LINES_ADJACENCY_EXT 0xA +#define GL_LINE_STRIP_ADJACENCY_EXT 0xB +#define GL_TRIANGLES_ADJACENCY_EXT 0xC +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#endif +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 +#define _ALLEGRO_GL_NV_gpu_program4 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object +#define _ALLEGRO_GL_NV_parameter_buffer_object +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +#endif + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback +#define _ALLEGRO_GL_NV_transform_feedback +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#if !defined GL_NV_register_combiners +#define GL_SECONDARY_COLOR_NV 0x852D +#endif +#if !defined GL_EXT_gpu_shader4 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#endif +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 +#define _ALLEGRO_GL_NV_vertex_program4 +#if !defined GL_EXT_vertex_shader4 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +#endif +#endif + +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator +#define _ALLEGRO_GL_GREMEDY_frame_terminator +#endif + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render +#define _ALLEGRO_GL_NV_conditional_render +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +#endif + +#ifndef GL_NV_present_video +#define GL_NV_present_video +#define _ALLEGRO_GL_NV_present_video +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback +#define _ALLEGRO_GL_EXT_transform_feedback +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access +#define _ALLEGRO_GL_EXT_direct_state_access +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle +#define _ALLEGRO_GL_EXT_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample +#define _ALLEGRO_GL_NV_explicit_multisample +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 +#define _ALLEGRO_GL_NV_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#endif + +#ifndef GL_ATI_meminfo +#define GL_ATI_meminfo +#define _ALLEGRO_GL_ATI_meminfo +#define GL_VBO_FREE_MEMORY_ATI 0x87FB +#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +#endif + +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor +#define _ALLEGRO_GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +#ifndef GL_AMD_texture_texture4 +#define GL_AMD_texture_texture4 +#define _ALLEGRO_GL_AMD_texture_texture4 +#endif + +#ifndef GL_AMD_vertex_shader_tesselator +#define GL_AMD_vertex_shader_tesselator +#define _ALLEGRO_GL_AMD_vertex_shader_tesselator +#define GL_SAMPLER_BUFFER_AMD 0x9001 +#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +#define GL_TESSELLATION_MODE_AMD 0x9004 +#define GL_TESSELLATION_FACTOR_AMD 0x9005 +#define GL_DISCRETE_AMD 0x9006 +#define GL_CONTINUOUS_AMD 0x9007 +#endif + +#ifndef GL_EXT_provoking_vertex +#define GL_EXT_provoking_vertex +#define _ALLEGRO_GL_EXT_provoking_vertex +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +#define GL_PROVOKING_VERTEX_EXT 0x8E4F +#endif + +#ifndef GL_EXT_texture_snorm +#define GL_EXT_texture_snorm +#define _ALLEGRO_GL_EXT_texture_snorm +#define GL_ALPHA_SNORM 0x9010 +#define GL_LUMINANCE_SNORM 0x9011 +#define GL_LUMINANCE_ALPHA_SNORM 0x9012 +#define GL_INTENSITY_SNORM 0x9013 +#define GL_ALPHA8_SNORM 0x9014 +#define GL_LUMINANCE8_SNORM 0x9015 +#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +#define GL_INTENSITY8_SNORM 0x9017 +#define GL_ALPHA16_SNORM 0x9018 +#define GL_LUMINANCE16_SNORM 0x9019 +#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +#define GL_INTENSITY16_SNORM 0x901B +/* reuse GL_RED_SNORM */ +/* reuse GL_RG_SNORM */ +/* reuse GL_RGB_SNORM */ +/* reuse GL_RGBA_SNORM */ +/* reuse GL_R8_SNORM */ +/* reuse GL_RG8_SNORM */ +/* reuse GL_RGB8_SNORM */ +/* reuse GL_RGBA8_SNORM */ +/* reuse GL_R16_SNORM */ +/* reuse GL_RG16_SNORM */ +/* reuse GL_RGB16_SNORM */ +/* reuse GL_RGBA16_SNORM */ +/* reuse GL_SIGNED_NORMALIZED */ +#endif + +#ifndef GL_AMD_draw_buffers_blend +#define GL_AMD_draw_buffers_blend +#define _ALLEGRO_GL_AMD_draw_buffers_blend +#endif + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range +#define _ALLEGRO_GL_APPLE_texture_range +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +/* reuse GL_STORAGE_CACHED_APPLE */ +/* reuse GL_STORAGE_SHARED_APPLE */ +#endif + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels +#define _ALLEGRO_GL_APPLE_float_pixels +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F +#endif + +#ifndef GL_APPLE_vertex_program_evaluators +#define GL_APPLE_vertex_program_evaluators +#define _ALLEGRO_GL_APPLE_vertex_program_evaluators +#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +#endif + +#ifndef GL_APPLE_aux_depth_stencil +#define GL_APPLE_aux_depth_stencil +#define _ALLEGRO_GL_APPLE_aux_depth_stencil +#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +#endif + +#ifndef GL_APPLE_object_purgeable +#define GL_APPLE_object_purgeable +#define _ALLEGRO_GL_APPLE_object_purgeable +#define GL_BUFFER_OBJECT_APPLE 0x85B3 +#define GL_RELEASED_APPLE 0x8A19 +#define GL_VOLATILE_APPLE 0x8A1A +#define GL_RETAINED_APPLE 0x8A1B +#define GL_UNDEFINED_APPLE 0x8A1C +#define GL_PURGEABLE_APPLE 0x8A1D +#endif + +#ifndef GL_APPLE_row_bytes +#define GL_APPLE_row_bytes +#define _ALLEGRO_GL_APPLE_row_bytes +#define GL_PACK_ROW_BYTES_APPLE 0x8A15 +#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +#endif + +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 +#define _ALLEGRO_GL_APPLE_rgb_422 +#define GL_RGB_422_APPLE 0x8A1F +/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ +/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ +#endif + +#ifndef GL_NV_video_capture +#define GL_NV_video_capture +#define _ALLEGRO_GL_NV_video_capture +#define GL_VIDEO_BUFFER_NV 0x9020 +#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +#define GL_FIELD_UPPER_NV 0x9022 +#define GL_FIELD_LOWER_NV 0x9023 +#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +#define GL_PARTIAL_SUCCESS_NV 0x902E +#define GL_SUCCESS_NV 0x902F +#define GL_FAILURE_NV 0x9030 +#define GL_YCBYCR8_422_NV 0x9031 +#define GL_YCBAYCR8A_4224_NV 0x9032 +#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +#endif + +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects +#define _ALLEGRO_GL_EXT_separate_shader_objects +#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +#endif + +#ifndef GL_NV_parameter_buffer_object2 +#define GL_NV_parameter_buffer_object2 +#define _ALLEGRO_GL_NV_parameter_buffer_object2 +#endif + +#ifndef GL_NV_shader_buffer_load +#define GL_NV_shader_buffer_load +#define _ALLEGRO_GL_NV_shader_buffer_load +#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +#define GL_GPU_ADDRESS_NV 0x8F34 +#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +#endif + +#ifndef GL_NV_vertex_buffer_unified_memory +#define GL_NV_vertex_buffer_unified_memory +#define _ALLEGRO_GL_NV_vertex_buffer_unified_memory +#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#endif + +#ifndef GL_NV_texture_barrier +#define GL_NV_texture_barrier +#define _ALLEGRO_GL_NV_texture_barrier +#endif + +#ifndef GL_AMD_shader_stencil_export +#define GL_AMD_shader_stencil_export +#define _ALLEGRO_GL_AMD_shader_stencil_export +#endif + +#ifndef GL_AMD_seamless_cubemap_per_texture +#define GL_AMD_seamless_cubemap_per_texture +#define _ALLEGRO_GL_AMD_seamless_cubemap_per_texture +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS_ARB */ +#endif + +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth +#define _ALLEGRO_GL_AMD_conservative_depth +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_list.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_list.h new file mode 100644 index 0000000..8129de8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/gl_ext_list.h @@ -0,0 +1,358 @@ +AGL_EXT(ARB_imaging, 0) +AGL_EXT(ARB_multitexture, 1_2_1) +AGL_EXT(ARB_transpose_matrix, 1_3) +AGL_EXT(ARB_multisample, 1_3) +AGL_EXT(ARB_texture_env_add, 1_3) +AGL_EXT(ARB_texture_cube_map, 1_3) +AGL_EXT(ARB_texture_compression, 1_3) +AGL_EXT(ARB_texture_border_clamp, 1_3) +AGL_EXT(ARB_point_parameters, 1_4) +AGL_EXT(ARB_vertex_blend, 0) +AGL_EXT(ARB_texture_env_combine, 1_3) +AGL_EXT(ARB_texture_env_crossbar, 1_4) +AGL_EXT(ARB_texture_env_dot3, 1_3) +AGL_EXT(ARB_texture_mirrored_repeat, 1_4) +AGL_EXT(ARB_depth_texture, 1_4) +AGL_EXT(ARB_shadow, 1_4) +AGL_EXT(ARB_shadow_ambient, 0) +AGL_EXT(ARB_window_pos, 1_4) +AGL_EXT(ARB_vertex_program, 0) +AGL_EXT(ARB_fragment_program, 0) +AGL_EXT(ARB_vertex_buffer_object, 1_5) +AGL_EXT(ARB_occlusion_query, 1_5) +AGL_EXT(ARB_shader_objects, 0) /* Those were promoted to Core in */ +AGL_EXT(ARB_vertex_shader, 0) /* 2.0 with modifications. */ +AGL_EXT(ARB_fragment_shader, 0) /* */ +AGL_EXT(ARB_shading_language_100, 0) /* */ +AGL_EXT(ARB_texture_non_power_of_two,2_0) +AGL_EXT(ARB_point_sprite, 2_0) +AGL_EXT(ARB_fragment_program_shadow, 0) +AGL_EXT(ARB_draw_buffers, 2_0) +AGL_EXT(ARB_texture_rectangle, 3_1) +AGL_EXT(ARB_color_buffer_float, 3_0) +AGL_EXT(ARB_half_float_pixel, 3_0) +AGL_EXT(ARB_texture_float, 3_0) +AGL_EXT(ARB_pixel_buffer_object, 2_1) +AGL_EXT(ARB_instanced_arrays, 0) +AGL_EXT(ARB_draw_instanced, 3_1) +AGL_EXT(ARB_geometry_shader4, 0) +AGL_EXT(ARB_texture_buffer_object, 3_1) +AGL_EXT(ARB_depth_buffer_float, 3_0) +AGL_EXT(ARB_framebuffer_object, 3_0) +AGL_EXT(ARB_framebuffer_sRGB, 3_0) +AGL_EXT(ARB_half_float_vertex, 3_0) +AGL_EXT(ARB_map_buffer_range, 3_0) +AGL_EXT(ARB_texture_compression_rgtc,3_0) +AGL_EXT(ARB_texture_rg, 3_0) +AGL_EXT(ARB_vertex_array_object, 3_0) +AGL_EXT(ARB_copy_buffer, 3_1) +AGL_EXT(ARB_compatibility, 0) +AGL_EXT(ARB_uniform_buffer_object, 3_1) +AGL_EXT(ARB_shader_texture_lod, 0) +AGL_EXT(ARB_depth_clamp, 3_2) +AGL_EXT(ARB_draw_elements_base_vertex, 3_2) +AGL_EXT(ARB_fragment_coord_conventions, 3_2) +AGL_EXT(ARB_provoking_vertex, 3_2) +AGL_EXT(ARB_seamless_cube_map, 3_2) +AGL_EXT(ARB_sync, 3_2) +AGL_EXT(ARB_texture_multisample, 3_2) +AGL_EXT(ARB_vertex_array_bgra, 0) +AGL_EXT(ARB_draw_buffers_blend, 0) +AGL_EXT(ARB_sample_shading, 0) +AGL_EXT(ARB_texture_cube_map_array, 0) +AGL_EXT(ARB_texture_gather, 0) +AGL_EXT(ARB_texture_query_lod, 0) +AGL_EXT(ARB_shading_language_include, 0) +AGL_EXT(ARB_texture_compression_bptc, 0) +AGL_EXT(ARB_blend_func_extended, 3_3) +AGL_EXT(ARB_explicit_attrib_location, 3_3) +AGL_EXT(ARB_occlusion_query2, 3_3) +AGL_EXT(ARB_sampler_objects, 3_3) +AGL_EXT(ARB_shader_bit_encoding, 3_3) +AGL_EXT(ARB_texture_rgb10_a2ui, 3_3) +AGL_EXT(ARB_texture_swizzle, 3_3) +AGL_EXT(ARB_timer_query, 3_3) +AGL_EXT(ARB_vertex_type_2_10_10_10_rev, 3_3) +AGL_EXT(ARB_draw_indirect, 4_0) +AGL_EXT(ARB_gpu_shader5, 4_0) +AGL_EXT(ARB_gpu_shader_fp64, 4_0) +AGL_EXT(ARB_shader_subroutine, 4_0) +AGL_EXT(ARB_tessellation_shader, 4_0) +AGL_EXT(ARB_texture_buffer_object_rgb32, 4_0) +AGL_EXT(ARB_transform_feedback2, 4_0) +AGL_EXT(ARB_transform_feedback3, 4_0) + +AGL_EXT(EXT_abgr, 0) +AGL_EXT(EXT_blend_color, 1_1) +AGL_EXT(EXT_polygon_offset, 1_1) +AGL_EXT(EXT_texture, 1_1) +AGL_EXT(EXT_texture3D, 1_2) +AGL_EXT(SGIS_texture_filter4, 0) +AGL_EXT(EXT_subtexture, 1_1) +AGL_EXT(EXT_copy_texture, 1_1) +AGL_EXT(EXT_histogram, 0) +AGL_EXT(EXT_convolution, 0) +AGL_EXT(SGI_color_matrix, 0) +AGL_EXT(SGI_color_table, 0) +AGL_EXT(SGIS_pixel_texture, 0) +AGL_EXT(SGIX_pixel_texture, 0) +AGL_EXT(SGIS_texture4D, 0) +AGL_EXT(SGI_texture_color_table, 0) +AGL_EXT(EXT_cmyka, 0) +AGL_EXT(EXT_texture_object, 1_1) +AGL_EXT(SGIS_detail_texture, 0) +AGL_EXT(SGIS_sharpen_texture, 0) +AGL_EXT(EXT_packed_pixels, 1_2) +AGL_EXT(SGIS_texture_lod, 1_2) +AGL_EXT(SGIS_multisample, 1_3) +AGL_EXT(EXT_rescale_normal, 1_2) +AGL_EXT(EXT_vertex_array, 1_1) +AGL_EXT(EXT_misc_attribute, 0) +AGL_EXT(SGIS_generate_mipmap, 1_4) +AGL_EXT(SGIX_clipmap, 0) +AGL_EXT(SGIX_shadow, 0) +AGL_EXT(SGIS_texture_edge_clamp, 1_2) +AGL_EXT(SGIS_texture_border_clamp, 0) +AGL_EXT(EXT_blend_minmax, 0) +AGL_EXT(EXT_blend_subtract, 0) +AGL_EXT(EXT_blend_logic_op, 1_1) +AGL_EXT(SGIX_interlace, 0) +AGL_EXT(SGIS_texture_select, 0) +AGL_EXT(SGIX_sprite, 0) +AGL_EXT(SGIX_texture_multi_buffer, 0) +AGL_EXT(EXT_point_parameters, 0) +AGL_EXT(SGIX_instruments, 0) +AGL_EXT(SGIX_texture_scale_bias, 0) +AGL_EXT(SGIX_framezoom, 0) +AGL_EXT(SGIX_tag_sample_buffer, 0) +AGL_EXT(SGIX_reference_plane, 0) +AGL_EXT(SGIX_flush_raster, 0) +AGL_EXT(SGIX_depth_texture, 0) +AGL_EXT(SGIS_fog_function, 0) +AGL_EXT(SGIX_fog_offset, 0) +AGL_EXT(HP_image_transform, 0) +AGL_EXT(HP_convolution_border_modes, 0) +AGL_EXT(SGIX_texture_add_env, 0) +AGL_EXT(EXT_color_subtable, 0) +AGL_EXT(PGI_vertex_hints, 0) +AGL_EXT(PGI_misc_hints, 0) +AGL_EXT(EXT_paletted_texture, 0) +AGL_EXT(EXT_clip_volume_hint, 0) +AGL_EXT(SGIX_list_priority, 0) +AGL_EXT(SGIX_ir_instrument1, 0) +AGL_EXT(SGIX_texture_lod_bias, 0) +AGL_EXT(SGIX_shadow_ambient, 0) +AGL_EXT(EXT_index_texture, 0) +AGL_EXT(EXT_index_material, 0) +AGL_EXT(EXT_index_func, 0) +AGL_EXT(EXT_index_array_formats, 0) +AGL_EXT(EXT_compiled_vertex_array, 0) +AGL_EXT(EXT_cull_vertex, 0) +AGL_EXT(SGIX_ycrcb, 0) +AGL_EXT(EXT_fragment_lighting, 0) +AGL_EXT(IBM_rasterpos_clip, 0) +AGL_EXT(HP_texture_lighting, 0) +AGL_EXT(EXT_draw_range_elements, 0) +AGL_EXT(WIN_phong_shading, 0) +AGL_EXT(WIN_specular_fog, 0) +AGL_EXT(EXT_light_texture, 0) +AGL_EXT(SGIX_blend_alpha_minmax, 0) +AGL_EXT(EXT_scene_marker, 0) +AGL_EXT(SGIX_pixel_texture_bits, 0) +AGL_EXT(EXT_bgra, 1_2) +AGL_EXT(SGIX_async, 0) +AGL_EXT(SGIX_async_pixel, 0) +AGL_EXT(SGIX_async_histogram, 0) +AGL_EXT(INTEL_texture_scissor, 0) +AGL_EXT(INTEL_parallel_arrays, 0) +AGL_EXT(HP_occlusion_test, 0) +AGL_EXT(EXT_pixel_transform, 0) +AGL_EXT(EXT_pixel_transform_color_table, 0) +AGL_EXT(EXT_shared_texture_palette, 0) +AGL_EXT(EXT_separate_specular_color, 1_2) +AGL_EXT(EXT_secondary_color, 1_4) +AGL_EXT(EXT_texture_env, 0) +AGL_EXT(EXT_texture_perturb_normal, 0) +AGL_EXT(EXT_multi_draw_arrays, 1_4) +AGL_EXT(EXT_fog_coord, 1_4) +AGL_EXT(REND_screen_coordinates, 0) +AGL_EXT(EXT_coordinate_frame, 0) +AGL_EXT(EXT_texture_env_combine, 0) +AGL_EXT(APPLE_specular_vector, 0) +AGL_EXT(APPLE_transform_hint, 0) +AGL_EXT(SUNX_constant_data, 0) +AGL_EXT(SUN_global_alpha, 0) +AGL_EXT(SUN_triangle_list, 0) +AGL_EXT(SUN_vertex, 0) +AGL_EXT(EXT_blend_func_separate, 1_4) +AGL_EXT(INGR_color_clamp, 0) +AGL_EXT(INGR_interlace_read, 0) +AGL_EXT(EXT_stencil_wrap, 1_4) +AGL_EXT(EXT_422_pixels, 0) +AGL_EXT(NV_texgen_reflection, 0) +AGL_EXT(SGIX_texture_range, 0) +AGL_EXT(SUN_convolution_border_modes, 0) +AGL_EXT(EXT_texture_env_add, 0) +AGL_EXT(EXT_texture_lod_bias, 1_4) +AGL_EXT(EXT_texture_filter_anisotropic, 0) +AGL_EXT(EXT_vertex_weighting, 0) +AGL_EXT(NV_light_max_exponent, 0) +AGL_EXT(NV_vertex_array_range, 0) +AGL_EXT(NV_register_combiners, 0) +AGL_EXT(NV_fog_distance, 0) +AGL_EXT(NV_texgen_emboss, 0) +AGL_EXT(NV_blend_square, 1_4) +AGL_EXT(NV_texture_env_combine4, 0) +AGL_EXT(MESA_resize_buffers, 0) +AGL_EXT(MESA_window_pos, 0) +AGL_EXT(EXT_texture_compression_s3tc, 0) +AGL_EXT(IBM_cull_vertex, 0) +AGL_EXT(IBM_multimode_draw_arrays, 0) +AGL_EXT(IBM_vertex_array_lists, 0) +AGL_EXT(3DFX_texture_compression_FXT1, 0) +AGL_EXT(3DFX_multisample, 0) +AGL_EXT(3DFX_tbuffer, 0) +AGL_EXT(SGIX_vertex_preclip, 0) +AGL_EXT(SGIX_resample, 0) +AGL_EXT(SGIS_texture_color_mask, 0) +AGL_EXT(EXT_texture_env_dot3, 0) +AGL_EXT(ATI_texture_mirror_once, 0) +AGL_EXT(NV_fence, 0) +AGL_EXT(IBM_static_data, 0) +AGL_EXT(IBM_texture_mirrored_repeat, 0) +AGL_EXT(NV_evaluators, 0) +AGL_EXT(NV_packed_depth_stencil, 3_0) +AGL_EXT(NV_register_combiners2, 0) +AGL_EXT(NV_texture_compression_vtc, 0) +AGL_EXT(NV_texture_rectangle, 0) +AGL_EXT(NV_texture_shader, 0) +AGL_EXT(NV_texture_shader2, 0) +AGL_EXT(NV_vertex_array_range2, 0) +AGL_EXT(NV_vertex_program, 0) +AGL_EXT(SGIX_texture_coordinate_clamp, 0) +AGL_EXT(OML_interlace, 0) +AGL_EXT(OML_subsample, 0) +AGL_EXT(OML_resample, 0) +AGL_EXT(NV_copy_depth_to_color, 0) +AGL_EXT(ATI_envmap_bumpmap, 0) +AGL_EXT(ATI_fragment_shader, 0) +AGL_EXT(ATI_pn_triangles, 0) +AGL_EXT(ATI_vertex_array_object, 0) +AGL_EXT(EXT_vertex_shader, 0) +AGL_EXT(ATI_vertex_streams, 0) +AGL_EXT(ATI_element_array, 0) +AGL_EXT(SUN_mesh_array, 0) +AGL_EXT(SUN_slice_accum, 0) +AGL_EXT(NV_multisample_filter_hint, 0) +AGL_EXT(NV_depth_clamp, 0) +AGL_EXT(NV_occlusion_query, 0) +AGL_EXT(NV_point_sprite, 0) +AGL_EXT(NV_texture_shader3, 0) +AGL_EXT(NV_vertex_program1_1, 0) +AGL_EXT(EXT_shadow_funcs, 1_5) +AGL_EXT(EXT_stencil_two_side, 0) +AGL_EXT(ATI_text_fragment_shader, 0) +AGL_EXT(APPLE_client_storage, 0) +AGL_EXT(APPLE_element_array, 0) +AGL_EXT(APPLE_fence, 0) +AGL_EXT(APPLE_vertex_array_object, 3_0) +AGL_EXT(APPLE_vertex_array_range, 0) +AGL_EXT(APPLE_ycbcr_422, 0) +AGL_EXT(S3_s3tc, 0) +AGL_EXT(ATI_draw_buffers, 0) +AGL_EXT(ATI_texture_env_combine3, 0) +AGL_EXT(ATI_texture_float, 0) +AGL_EXT(NV_float_buffer, 0) +AGL_EXT(NV_fragment_program, 0) +AGL_EXT(NV_half_float, 3_0) +AGL_EXT(NV_pixel_data_range, 0) +AGL_EXT(NV_primitive_restart, 3_1) +AGL_EXT(NV_texture_expand_normal, 0) +AGL_EXT(NV_vertex_program2, 0) +AGL_EXT(ATI_map_object_buffer, 0) +AGL_EXT(ATI_separate_stencil, 2_0) +AGL_EXT(ATI_vertex_attrib_array_object, 0) +AGL_EXT(OES_byte_coordinates, 0) +AGL_EXT(OES_fixed_point, 0) +AGL_EXT(OES_single_precision, 0) +AGL_EXT(OES_compressed_paletted_texture, 0) +AGL_EXT(OES_read_format, 0) +AGL_EXT(OES_query_matrix, 0) +AGL_EXT(OES_framebuffer_object, 0) +AGL_EXT(EXT_depth_bounds_test, 0) +AGL_EXT(EXT_texture_mirror_clamp, 0) +AGL_EXT(EXT_blend_equation_separate, 0) +AGL_EXT(MESA_pack_invert, 0) +AGL_EXT(MESA_ycbcr_texture, 0) +AGL_EXT(EXT_pixel_buffer_object, 0) +AGL_EXT(NV_fragment_program_option, 0) +AGL_EXT(NV_fragment_program2, 0) +AGL_EXT(NV_vertex_program2_option, 0) +AGL_EXT(NV_vertex_program3, 0) +AGL_EXT(EXT_texture_compression_dxt1, 0) +AGL_EXT(EXT_framebuffer_object, 3_0) +AGL_EXT(GREMEDY_string_marker, 0) +AGL_EXT(EXT_packed_depth_stencil, 0) +AGL_EXT(EXT_stencil_clear_tag, 0) +AGL_EXT(EXT_texture_sRGB, 2_1) +AGL_EXT(EXT_framebuffer_blit, 3_0) +AGL_EXT(EXT_framebuffer_multisample, 3_0) +AGL_EXT(MESAX_texture_stack, 0) +AGL_EXT(EXT_timer_query, 0) +AGL_EXT(EXT_gpu_program_parameters, 0) +AGL_EXT(APPLE_flush_buffer_range, 0) +#ifdef ALLEGRO_MACOSX +AGL_EXT(EXT_texture_rectangle, 0) +#endif +AGL_EXT(EXT_bindable_uniform, 0) +AGL_EXT(EXT_draw_buffers2, 3_0) +AGL_EXT(EXT_draw_instanced, 0) +AGL_EXT(EXT_framebuffer_sRGB, 3_0) +AGL_EXT(EXT_geometry_shader4, 0) +AGL_EXT(EXT_gpu_shader4, 3_0) +AGL_EXT(EXT_packed_float, 3_0) +AGL_EXT(EXT_texture_array, 3_0) +AGL_EXT(EXT_texture_buffer_object, 0) +AGL_EXT(EXT_texture_compression_latc, 0) +AGL_EXT(EXT_texture_compression_rgtc,3_0) +AGL_EXT(EXT_texture_integer, 3_0) +AGL_EXT(EXT_texture_shared_exponent, 3_0) +AGL_EXT(NV_depth_buffer_float, 3_0) +AGL_EXT(NV_fragment_program4, 0) +AGL_EXT(NV_framebuffer_multisample_coverage, 0) +AGL_EXT(NV_geometry_program4, 0) +AGL_EXT(NV_gpu_program4, 0) +AGL_EXT(NV_parameter_buffer_object, 0) +AGL_EXT(NV_transform_feedback, 0) +AGL_EXT(NV_vertex_program4, 0) +AGL_EXT(GREMEDY_frame_terminator, 0) +AGL_EXT(NV_conditional_render, 3_0) +AGL_EXT(NV_present_video, 0) +AGL_EXT(EXT_direct_state_access, 0) +AGL_EXT(EXT_transform_feedback, 3_0) +AGL_EXT(EXT_texture_swizzle, 0) +AGL_EXT(NV_explicit_multisample, 0) +AGL_EXT(NV_transform_feedback2, 0) +AGL_EXT(ATI_meminfo, 0) +AGL_EXT(AMD_performance_monitor, 0) +AGL_EXT(AMD_texture_texture4, 0) +AGL_EXT(AMD_vertex_shader_tesselator, 0) +AGL_EXT(EXT_provoking_vertex, 0) +AGL_EXT(EXT_texture_snorm, 0) +AGL_EXT(AMD_draw_buffers_blend, 0) +AGL_EXT(APPLE_texture_range, 0) +AGL_EXT(APPLE_float_pixels, 0) +AGL_EXT(APPLE_vertex_program_evaluators, 0) +AGL_EXT(APPLE_aux_depth_stencil, 0) +AGL_EXT(APPLE_object_purgeable, 0) +AGL_EXT(APPLE_row_bytes, 0) +AGL_EXT(APPLE_rgb_422, 0) +AGL_EXT(NV_video_capture, 0) +AGL_EXT(EXT_separate_shader_objects, 0) +AGL_EXT(NV_parameter_buffer_object2, 0) +AGL_EXT(NV_shader_buffer_load, 0) +AGL_EXT(NV_vertex_buffer_unified_memory, 0) +AGL_EXT(NV_texture_barrier, 0) +AGL_EXT(AMD_shader_stencil_export, 0) +AGL_EXT(AMD_seamless_cubemap_per_texture, 0) +AGL_EXT(AMD_conservative_depth, 0) diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_alias.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_alias.h new file mode 100644 index 0000000..595cd56 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_alias.h @@ -0,0 +1,213 @@ +/*Automatically generated by gl_mkalias.sh DO NOT EDIT!*/ +#ifdef _ALLEGRO_GLX_VERSION_1_3 +/*GLX1.3*/ +#define glXGetFBConfigs _al_glXGetFBConfigs +#define glXChooseFBConfig _al_glXChooseFBConfig +#define glXGetFBConfigAttrib _al_glXGetFBConfigAttrib +#define glXGetVisualFromFBConfig _al_glXGetVisualFromFBConfig +#define glXCreateWindow _al_glXCreateWindow +#define glXDestroyWindow _al_glXDestroyWindow +#define glXCreatePixmap _al_glXCreatePixmap +#define glXDestroyPixmap _al_glXDestroyPixmap +#define glXCreatePbuffer _al_glXCreatePbuffer +#define glXDestroyPbuffer _al_glXDestroyPbuffer +#define glXQueryDrawable _al_glXQueryDrawable +#define glXCreateNewContext _al_glXCreateNewContext +#define glXMakeContextCurrent _al_glXMakeContextCurrent +#define glXGetCurrentReadDrawable _al_glXGetCurrentReadDrawable +#define glXGetCurrentDisplay _al_glXGetCurrentDisplay +#define glXQueryContext _al_glXQueryContext +#define glXSelectEvent _al_glXSelectEvent +#define glXGetSelectedEvent _al_glXGetSelectedEvent +#endif +#ifdef _ALLEGRO_GLX_VERSION_1_4 +/*GLX1.4*/ +#define glXGetProcAddress _al_glXGetProcAddress +#endif + +#ifdef _ALLEGRO_GLX_ARB_get_proc_address +/*GLX_ARB_get_proc_address*/ +#define glXGetProcAddressARB _al_glXGetProcAddressARB +#endif + +#ifdef _ALLEGRO_GLX_ARB_create_context +#define glXCreateContextAttribsARB _al_glXCreateContextAttribsARB +#endif + +#ifdef _ALLEGRO_GLX_SGI_swap_control +/*GLX_SGI_swap_control*/ +#define glXSwapIntervalSGI _al_glXSwapIntervalSGI +#endif + +#ifdef _ALLEGRO_GLX_SGI_video_sync +/*GLX_SGI_video_sync*/ +#define glXGetVideoSyncSGI _al_glXGetVideoSyncSGI +#define glXWaitVideoSyncSGI _al_glXWaitVideoSyncSGI +#endif + +#ifdef _ALLEGRO_GLX_SGI_make_current_read +/*GLX_SGI_make_current_read*/ +#define glXMakeCurrentReadSGI _al_glXMakeCurrentReadSGI +#define glXGetCurrentReadDrawableSGI _al_glXGetCurrentReadDrawableSGI +#endif + +#ifdef _ALLEGRO_GLX_SGIX_video_source +/*GLX_SGIX_video_source*/ +/*ThisoneneedsSGI'sheaderfiletobeincludedfirst*/ +#ifdef _VL_H_ +#define glXCreateGLXVideoSourceSGIX _al_glXCreateGLXVideoSourceSGIX +#define glXDestroyGLXVideoSourceSGIX _al_glXDestroyGLXVideoSourceSGIX +#endif +#endif + +#ifdef _ALLEGRO_GLX_EXT_import_context +/*GLX_EXT_import_context*/ +#define glXGetCurrentDisplayEXT _al_glXGetCurrentDisplayEXT +#define glXQueryContextInfoEXT _al_glXQueryContextInfoEXT +#define glXGetContextIDEXT _al_glXGetContextIDEXT +#define glXImportContextEXT _al_glXImportContextEXT +#define glXFreeContextEXT _al_glXFreeContextEXT +#endif + +#ifdef _ALLEGRO_GLX_SGIX_fbconfig +/*GLX_SGIX_fbconfig*/ +#define glXGetFBConfigAttribSGIX _al_glXGetFBConfigAttribSGIX +#define glXChooseFBConfigSGIX _al_glXChooseFBConfigSGIX +#define glXCreateGLXPixmapWithConfigSGIX _al_glXCreateGLXPixmapWithConfigSGIX +#define glXCreateContextWithConfigSGIX _al_glXCreateContextWithConfigSGIX +#define glXGetVisualFromFBConfigSGIX _al_glXGetVisualFromFBConfigSGIX +#define glXGetFBConfigFromVisualSGIX _al_glXGetFBConfigFromVisualSGIX +#endif + +#ifdef _ALLEGRO_GLX_SGIX_pbuffer +/*GLX_SGIX_pbuffer*/ +#define glXCreateGLXPbufferSGIX _al_glXCreateGLXPbufferSGIX +#define glXDestroyGLXPbufferSGIX _al_glXDestroyGLXPbufferSGIX +#define glXQueryGLXPbufferSGIX _al_glXQueryGLXPbufferSGIX +#define glXSelectEventSGIX _al_glXSelectEventSGIX +#define glXGetSelectedEventSGIX _al_glXGetSelectedEventSGIX +#endif + +#ifdef _ALLEGRO_GLX_SGI_cushion +/*GLX_SGI_cushion*/ +#define glXCushionSGI _al_glXCushionSGI +#endif + +#ifdef _ALLEGRO_GLX_SGIX_video_resize +/*GLX_SGIX_video_resize*/ +#define glXBindChannelToWindowSGIX _al_glXBindChannelToWindowSGIX +#define glXChannelRectSGIX _al_glXChannelRectSGIX +#define glXQueryChannelRectSGIX _al_glXQueryChannelRectSGIX +#define glXQueryChannelDeltasSGIX _al_glXQueryChannelDeltasSGIX +#define glXChannelRectSyncSGIX _al_glXChannelRectSyncSGIX +#endif + +#ifdef _ALLEGRO_GLX_SGIX_dmbuffer +/*GLX_SGIX_dmbuffer*/ +/*ThisoneneedsSGI'sheaderfiletobeincludedfirst*/ +#ifdef _DM_BUFFER_H_ +#define glXAssociateDMPbufferSGIX _al_glXAssociateDMPbufferSGIX +#endif +#endif + +#ifdef _ALLEGRO_GLX_SGIX_swap_group +/*GLX_SGIX_swap_group*/ +#define glXJoinSwapGroupSGIX _al_glXJoinSwapGroupSGIX +#endif + +#ifdef _ALLEGRO_GLX_SGIX_swap_barrier +/*GLX_SGIX_swap_barrier*/ +#define glXBindSwapBarrierSGIX _al_glXBindSwapBarrierSGIX +#define glXQueryMaxSwapBarriersSGIX _al_glXQueryMaxSwapBarriersSGIX +#endif + +#ifdef _ALLEGRO_GLX_SUN_get_transparent_index +/*GLX_SUN_get_transparent_index*/ +#define glXGetTransparentIndexSUN _al_glXGetTransparentIndexSUN +#endif + +#ifdef _ALLEGRO_GLX_MESA_copy_sub_buffer +/*GLX_MESA_copy_sub_buffer*/ +#define glXCopySubBufferMESA _al_glXCopySubBufferMESA +#endif + +#ifdef _ALLEGRO_GLX_MESA_pixmap_colormap +/*GLX_MESA_pixmap_colormap*/ +#define glXCreateGLXPixmapMESA _al_glXCreateGLXPixmapMESA +#endif + +#ifdef _ALLEGRO_GLX_MESA_release_buffers +/*GLX_MESA_release_buffers*/ +#define glXReleaseBuffersMESA _al_glXReleaseBuffersMESA +#endif + +#ifdef _ALLEGRO_GLX_MESA_set_3dfx_mode +/*GLX_MESA_set_3dfx_mode*/ +#define glXSet3DfxModeMESA _al_glXSet3DfxModeMESA +#endif + +#ifdef _ALLEGRO_GLX_OML_sync_control +/*GLX_OML_sync_control*/ +#define glXGetSyncValuesOML _al_glXGetSyncValuesOML +#define glXGetMscRateOML _al_glXGetMscRateOML +#define glXSwapBuffersMscOML _al_glXSwapBuffersMscOML +#define glXWaitForMscOML _al_glXWaitForMscOML +#define glXWaitForSbcOML _al_glXWaitForSbcOML +#endif + + +#ifdef _ALLEGRO_GLX_SGIX_hyperpipe +#define glXQueryHyperpipeNetworkSGIX _al_glXQueryHyperpipeNetworkSGIX +#define glXHyperpipeConfigSGIX _al_glXHyperpipeConfigSGIX +#define glXQueryHyperpipeConfigSGIX _al_glXQueryHyperpipeConfigSGIX +#define glXDestroyHyperpipeConfigSGIX _al_glXDestroyHyperpipeConfigSGIX +#define glXBindHyperpipeSGIX _al_glXBindHyperpipeSGIX +#define glXQueryHyperpipeBestAttribSGIX _al_glXQueryHyperpipeBestAttribSGIX +#define glXHyperpipeAttribSGIX _al_glXHyperpipeAttribSGIX +#define glXQueryHyperpipeAttribSGIX _al_glXQueryHyperpipeAttribSGIX +#endif + + +#ifdef _ALLEGRO_GLX_MESA_agp_offset +#define glXGetAGPOffsetMESA _al_glXGetAGPOffsetMESA +#endif + + +#ifdef _ALLEGRO_GLX_EXT_texture_from_pixmap +#define glXBindTexImageEXT _al_glXBindTexImageEXT +#define glXReleaseTextImageEXT _al_glXReleaseTextImageEXT +#endif + +#ifdef _ALLEGRO_GLX_NV_video_output +#define glXGetVideoDeviceNV _al_glXGetVideoDeviceNV +#define glXReleaseVideoDeviceNV _al_glXReleaseVideoDeviceNV +#define glXBindVideoImageNV _al_glXBindVideoImageNV +#define glXReleaseVideoImageNV _al_glXReleaseVideoImageNV +#define glXSendPbufferToVideoNV _al_glXSendPbufferToVideoNV +#define glXGetVideoInfoNV _al_glXGetVideoInfoNV +#endif + +#ifdef _ALLEGRO_GLX_NV_swap_group +#define glXJoinSwapGroupNV _al_glXJoinSwapGroupNV +#define glXBindSwapBarrierNV _al_glXBindSwapBarrierNV +#define glXQuerySwapGroupNV _al_glXQuerySwapGroupNV +#define glXQueryMaxSwapGroupsNV _al_glXQueryMaxSwapGroupsNV +#define glXQueryFrameCountNV _al_glXQueryFrameCountNV +#define glXResetFrameCountNV _al_glXResetFrameCountNV +#endif + +#ifdef _ALLEGRO_GLX_NV_video_capture +#define glXBindVideoCaptureDeviceNV _al_glXBindVideoCaptureDeviceNV +#define glXEnumerateVideoCaptureDevicesNV _al_glXEnumerateVideoCaptureDevicesNV +#define glXLockVideoCaptureDeviceNV _al_glXLockVideoCaptureDeviceNV +#define glXQueryVideoCaptureDeviceNV _al_glXQueryVideoCaptureDeviceNV +#define glXReleaseVideoCaptureDeviceNV _al_glXReleaseVideoCaptureDeviceNV +#endif + +#ifdef _ALLEGRO_GLX_EXT_swap_control +#define glXSwapIntervalEXT _al_glXSwapIntervalEXT +#endif + +#ifdef _ALLEGRO_GLX_NV_copy_image +#define glXCopyImageSubDataNV _al_glXCopyImageSubDataNV +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_api.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_api.h new file mode 100644 index 0000000..528357c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_api.h @@ -0,0 +1,212 @@ +#ifdef _ALLEGRO_GLX_VERSION_1_3 +/* GLX 1.3 */ +AGL_API(GLXFBConfig *, GetFBConfigs, (Display *, int, int *)) +AGL_API(GLXFBConfig *, ChooseFBConfig, (Display *, int, const int *, int *)) +AGL_API(int, GetFBConfigAttrib, (Display *, GLXFBConfig, int, int *)) +AGL_API(XVisualInfo *, GetVisualFromFBConfig, (Display *, GLXFBConfig)) +AGL_API(GLXWindow, CreateWindow, (Display *, GLXFBConfig, Window, const int *)) +AGL_API(void, DestroyWindow, (Display *, GLXWindow)) +AGL_API(GLXPixmap, CreatePixmap, (Display *, GLXFBConfig, Pixmap, const int *)) +AGL_API(void, DestroyPixmap, (Display *, GLXPixmap)) +AGL_API(GLXPbuffer, CreatePbuffer, (Display *, GLXFBConfig, const int *)) +AGL_API(void, DestroyPbuffer, (Display *, GLXPbuffer)) +AGL_API(void, QueryDrawable, (Display *, GLXDrawable, int, unsigned int *)) +AGL_API(GLXContext, CreateNewContext, (Display *, GLXFBConfig, int, GLXContext, Bool)) +AGL_API(Bool, MakeContextCurrent, (Display *, GLXDrawable, GLXDrawable, GLXContext)) +AGL_API(GLXDrawable, GetCurrentReadDrawable, (void)) +AGL_API(Display *, GetCurrentDisplay, (void)) +AGL_API(int, QueryContext, (Display *, GLXContext, int, int *)) +AGL_API(void, SelectEvent, (Display *, GLXDrawable, unsigned long)) +AGL_API(void, GetSelectedEvent, (Display *, GLXDrawable, unsigned long *)) +#endif +#ifdef _ALLEGRO_GLX_VERSION_1_4 +/* GLX 1.4 */ +AGL_API(__GLXextFuncPtr, GetProcAddress, (const GLubyte *)) +#endif + +#ifdef _ALLEGRO_GLX_ARB_get_proc_address +/* GLX_ARB_get_proc_address */ +AGL_API(__GLXextFuncPtr, GetProcAddressARB, (const GLubyte *)) +#endif + +#ifdef _ALLEGRO_GLX_ARB_create_context +AGL_API(GLXContext, CreateContextAttribsARB, (Display *, GLXFBConfig, GLXContext, Bool, const int *)) +#endif + +#ifdef _ALLEGRO_GLX_SGI_swap_control +/* GLX_SGI_swap_control */ +AGL_API(int, SwapIntervalSGI, (int)) +#endif + +#ifdef _ALLEGRO_GLX_SGI_video_sync +/* GLX_SGI_video_sync */ +AGL_API(int, GetVideoSyncSGI, (unsigned int *)) +AGL_API(int, WaitVideoSyncSGI, (int, int, unsigned int *)) +#endif + +#ifdef _ALLEGRO_GLX_SGI_make_current_read +/* GLX_SGI_make_current_read */ +AGL_API(Bool, MakeCurrentReadSGI, (Display *, GLXDrawable, GLXDrawable, GLXContext)) +AGL_API(GLXDrawable, GetCurrentReadDrawableSGI, (void)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_video_source +/* GLX_SGIX_video_source */ +/* This one needs SGI's header file to be included first */ +#ifdef _VL_H_ +AGL_API(GLXVideoSourceSGIX, CreateGLXVideoSourceSGIX, (Display *, int, VLServer, VLPath, int, VLNode)) +AGL_API(void, DestroyGLXVideoSourceSGIX, (Display *, GLXVideoSourceSGIX)) +#endif +#endif + +#ifdef _ALLEGRO_GLX_EXT_import_context +/* GLX_EXT_import_context */ +AGL_API(Display *, GetCurrentDisplayEXT, (void)) +AGL_API(int, QueryContextInfoEXT, (Display *, GLXContext, int, int *)) +AGL_API(GLXContextID, GetContextIDEXT, (const GLXContext)) +AGL_API(GLXContext, ImportContextEXT, (Display *, GLXContextID)) +AGL_API(void, FreeContextEXT, (Display *, GLXContext)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_fbconfig +/* GLX_SGIX_fbconfig */ +AGL_API(int, GetFBConfigAttribSGIX, (Display *, GLXFBConfigSGIX, int, int *)) +AGL_API(GLXFBConfigSGIX *, ChooseFBConfigSGIX, (Display *, int, int *, int *)) +AGL_API(GLXPixmap, CreateGLXPixmapWithConfigSGIX, (Display *, GLXFBConfigSGIX, Pixmap)) +AGL_API(GLXContext, CreateContextWithConfigSGIX, (Display *, GLXFBConfigSGIX, int, GLXContext, Bool)) +AGL_API(XVisualInfo *, GetVisualFromFBConfigSGIX, (Display *, GLXFBConfigSGIX)) +AGL_API(GLXFBConfigSGIX, GetFBConfigFromVisualSGIX, (Display *, XVisualInfo *)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_pbuffer +/* GLX_SGIX_pbuffer */ +AGL_API(GLXPbufferSGIX, CreateGLXPbufferSGIX, (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *)) +AGL_API(void, DestroyGLXPbufferSGIX, (Display *, GLXPbufferSGIX)) +AGL_API(int, QueryGLXPbufferSGIX, (Display *, GLXPbufferSGIX, int, unsigned int *)) +AGL_API(void, SelectEventSGIX, (Display *, GLXDrawable, unsigned long)) +AGL_API(void, GetSelectedEventSGIX, (Display *, GLXDrawable, unsigned long *)) +#endif + +#ifdef _ALLEGRO_GLX_SGI_cushion +/* GLX_SGI_cushion */ +AGL_API(void, CushionSGI, (Display *, Window, float)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_video_resize +/* GLX_SGIX_video_resize */ +AGL_API(int, BindChannelToWindowSGIX, (Display *, int, int, Window)) +AGL_API(int, ChannelRectSGIX, (Display *, int, int, int, int, int, int)) +AGL_API(int, QueryChannelRectSGIX, (Display *, int, int, int *, int *, int *, int *)) +AGL_API(int, QueryChannelDeltasSGIX, (Display *, int, int, int *, int *, int *, int *)) +AGL_API(int, ChannelRectSyncSGIX, (Display *, int, int, GLenum)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_dmbuffer +/* GLX_SGIX_dmbuffer */ +/* This one needs SGI's header file to be included first */ +#ifdef _DM_BUFFER_H_ +AGL_API(Bool, AssociateDMPbufferSGIX, (Display *, GLXPbufferSGIX, DMparams *, DMbuffer)) +#endif +#endif + +#ifdef _ALLEGRO_GLX_SGIX_swap_group +/* GLX_SGIX_swap_group */ +AGL_API(void, JoinSwapGroupSGIX, (Display *, GLXDrawable, GLXDrawable)) +#endif + +#ifdef _ALLEGRO_GLX_SGIX_swap_barrier +/* GLX_SGIX_swap_barrier */ +AGL_API(void, BindSwapBarrierSGIX, (Display *, GLXDrawable, int)) +AGL_API(Bool, QueryMaxSwapBarriersSGIX, (Display *, int, int *)) +#endif + +#ifdef _ALLEGRO_GLX_SUN_get_transparent_index +/* GLX_SUN_get_transparent_index */ +AGL_API(Status, GetTransparentIndexSUN, (Display *, Window, Window, long *)) +#endif + +#ifdef _ALLEGRO_GLX_MESA_copy_sub_buffer +/* GLX_MESA_copy_sub_buffer */ +AGL_API(void, CopySubBufferMESA, (Display *, GLXDrawable, int, int, int, int)) +#endif + +#ifdef _ALLEGRO_GLX_MESA_pixmap_colormap +/* GLX_MESA_pixmap_colormap */ +AGL_API(GLXPixmap, CreateGLXPixmapMESA, (Display *, XVisualInfo *, Pixmap, Colormap)) +#endif + +#ifdef _ALLEGRO_GLX_MESA_release_buffers +/* GLX_MESA_release_buffers */ +AGL_API(Bool, ReleaseBuffersMESA, (Display *, GLXDrawable)) +#endif + +#ifdef _ALLEGRO_GLX_MESA_set_3dfx_mode +/* GLX_MESA_set_3dfx_mode */ +AGL_API(Bool, Set3DfxModeMESA, (int)) +#endif + +#ifdef _ALLEGRO_GLX_OML_sync_control +/* GLX_OML_sync_control */ +AGL_API(Bool, GetSyncValuesOML, (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *)) +AGL_API(Bool, GetMscRateOML, (Display *, GLXDrawable, int32_t *, int32_t *)) +AGL_API(int64_t, SwapBuffersMscOML, (Display *, GLXDrawable, int64_t, int64_t, int64_t)) +AGL_API(Bool, WaitForMscOML, (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *)) +AGL_API(Bool, WaitForSbcOML, (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *)) +#endif + + +#ifdef _ALLEGRO_GLX_SGIX_hyperpipe +AGL_API(GLXHyperpipeNetworkSGIX *, QueryHyperpipeNetworkSGIX, (Display *dpy, int *npipes)) +AGL_API(int, HyperpipeConfigSGIX, (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId)) +AGL_API(GLXHyperpipeConfigSGIX *, QueryHyperpipeConfigSGIX, (Display *dpy, int hpId, int *npipes)) +AGL_API(int, DestroyHyperpipeConfigSGIX, (Display * dpy, int hpId)) +AGL_API(int, BindHyperpipeSGIX, (Display *dpy, int hpId)) +AGL_API(int, QueryHyperpipeBestAttribSGIX, (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList)) +AGL_API(int, HyperpipeAttribSGIX, (Display *dpy, int timeSlice, int attrib, int size, void *attribList)) +AGL_API(int, QueryHyperpipeAttribSGIX, (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList)) +#endif + + +#ifdef _ALLEGRO_GLX_MESA_agp_offset +AGL_API(unsigned int, GetAGPOffsetMESA, (const void *pointer)) +#endif + + +#ifdef _ALLEGRO_GLX_EXT_texture_from_pixmap +AGL_API(void, BindTexImageEXT, (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list)) +AGL_API(void, ReleaseTextImageEXT, (Display *dpy, GLXDrawable drawable, int buffer)) +#endif + +#ifdef _ALLEGRO_GLX_NV_video_output +AGL_API(int, GetVideoDeviceNV, (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice)) +AGL_API(int, ReleaseVideoDeviceNV, (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice)) +AGL_API(int, BindVideoImageNV, (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer)) +AGL_API(int, ReleaseVideoImageNV, (Display *dpy, GLXPbuffer pbuf)) +AGL_API(int, SendPbufferToVideoNV, (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock)) +AGL_API(int, GetVideoInfoNV, (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputVideo, unsigned long *pulCounterOutputPbuffer)) +#endif + +#ifdef _ALLEGRO_GLX_NV_swap_group +AGL_API(Bool, JoinSwapGroupNV, (Display *dpy, GLXDrawable drawable, GLuint group)) +AGL_API(Bool, BindSwapBarrierNV, (Display *dpy, GLuint group, GLuint barrier)) +AGL_API(Bool, QuerySwapGroupNV, (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier)) +AGL_API(Bool, QueryMaxSwapGroupsNV, (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers)) +AGL_API(Bool, QueryFrameCountNV, (Display *dpy, int screen, GLuint *count)) +AGL_API(Bool, ResetFrameCountNV, (Display *dpy, int screen)) +#endif + +#ifdef _ALLEGRO_GLX_NV_video_capture +AGL_API(int, BindVideoCaptureDeviceNV, (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device)) +AGL_API(GLXVideoCaptureDeviceNV *, EnumerateVideoCaptureDevicesNV, (Display *dpy, int screen, int *nelements)) +AGL_API(void, LockVideoCaptureDeviceNV, (Display *dpy, GLXVideoCaptureDeviceNV device)) +AGL_API(int, QueryVideoCaptureDeviceNV, (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value)) +AGL_API(void, ReleaseVideoCaptureDeviceNV, (Display *dpy, GLXVideoCaptureDeviceNV device)) +#endif + +#ifdef _ALLEGRO_GLX_EXT_swap_control +AGL_API(int, SwapIntervalEXT, (Display *dpy, GLXDrawable drawable, int interval)) +#endif + +#ifdef _ALLEGRO_GLX_NV_copy_image +AGL_API(void, CopyImageSubDataNV, (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)) +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_defs.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_defs.h new file mode 100644 index 0000000..21e0097 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_defs.h @@ -0,0 +1,505 @@ +/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */ +#define __glxext_h_ +#include +#undef __glxext_h_ + +#ifndef GLX_VERSION_1_3 +#define _ALLEGRO_GLX_VERSION_1_3 +#define GLX_VERSION_1_3 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#endif + +#ifndef GLX_VERSION_1_4 +#define _ALLEGRO_GLX_VERSION_1_4 +#define GLX_VERSION_1_4 +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +#endif + +#ifndef GLX_ARB_get_proc_address +#define _ALLEGRO_GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address +typedef void (*__GLXextFuncPtr)(void); +#endif + +#ifndef GLX_ARB_multisample +#define _ALLEGRO_GLX_ARB_multisample +#define GLX_ARB_multisample +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif + +#ifndef GLX_ARB_vertex_buffer_object +#define GLX_ARB_vertex_buffer_object +#define _ALLEGRO_GLX_ARB_vertex_buffer_object +#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float +#define _ALLEGRO_GLX_ARB_fbconfig_float +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context +#define _ALLEGRO_GLX_ARB_create_context +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#endif + +#ifndef GLX_ARB_create_context_profile +#define GLX_ARB_create_context_profile +#define _ALLEGRO_GLX_ARB_create_context_profile +#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +#endif + +#ifndef GLX_SGIS_multisample +#define _ALLEGRO_GLX_SGIS_multisample +#define GLX_SGIS_multisample +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif + +/* Fix for system headers that define GLX_VERSION_1_4 but do not define + * GLX_SAMPLES and GLX_SAMPLE_BUFFERS. */ +#ifndef GLX_SAMPLES +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +#endif + +#ifndef GLX_EXT_visual_info +#define _ALLEGRO_GLX_EXT_visual_info +#define GLX_EXT_visual_info +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif + +#ifndef GLX_EXT_visual_rating +#define _ALLEGRO_GLX_EXT_visual_rating +#define GLX_EXT_visual_rating +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +/* GLX_NONE_EXT */ +#endif + +#ifndef GLX_EXT_import_context +#define _ALLEGRO_GLX_EXT_import_context +#define GLX_EXT_import_context +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +#endif + +#ifndef GLX_SGIX_fbconfig +#define _ALLEGRO_GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig +typedef XID GLXFBConfigIDSGIX; +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +/* GLX_SCREEN_EXT */ +#endif + +#ifndef GLX_SGIX_pbuffer +#define _ALLEGRO_GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer +typedef XID GLXPbufferSGIX; +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXBufferClobberEventSGIX; +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +#endif + +#ifndef GLX_SGIX_video_resize +#define _ALLEGRO_GLX_SGIX_video_resize +#define GLX_SGIX_video_resize +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +#endif + +#ifndef GLX_SGIX_dmbuffer +#define _ALLEGRO_GLX_SGIX_dmbuffer +#define GLX_SGIX_dmbuffer +#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +#endif + +#ifndef GLX_SGIS_blended_overlay +#define _ALLEGRO_GLX_SGIS_blended_overlay +#define GLX_SGIS_blended_overlay +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif + +#ifndef GLX_SGIS_shared_multisample +#define _ALLEGRO_GLX_SGIS_shared_multisample +#define GLX_SGIS_shared_multisample +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif + +#ifndef GLX_3DFX_multisample +#define _ALLEGRO_GLX_3DFX_multisample +#define GLX_3DFX_multisample +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define _ALLEGRO_GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +#endif + +#ifndef GLX_SGIX_visual_select_group +#define _ALLEGRO_GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif + +#ifndef GLX_OML_swap_method +#define _ALLEGRO_GLX_OML_swap_method +#define GLX_OML_swap_method +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif + +#ifndef GLX_SGIX_video_source +#define _ALLEGRO_GLX_SGIX_video_source +#define GLX_SGIX_video_source +typedef XID GLXVideoSourceSGIX; +#endif + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync +#define _ALLEGRO_GLX_SGI_video_sync +#endif + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control +#define _ALLEGRO_GLX_SGI_swap_control +#endif + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read +#define _ALLEGRO_GLX_SGI_make_current_read +#endif + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion +#define _ALLEGRO_GLX_SGI_cushion +#endif + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group +#define _ALLEGRO_GLX_SGIX_swap_group +#endif + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier +#define _ALLEGRO_GLX_SGIX_swap_barrier +#endif + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index +#define _ALLEGRO_GLX_SUN_get_transparent_index +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer +#define _ALLEGRO_GLX_MESA_copy_sub_buffer +#endif + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap +#define _ALLEGRO_GLX_MESA_pixmap_colormap +#endif + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers +#define _ALLEGRO_GLX_MESA_release_buffers +#endif + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control +#define _ALLEGRO_GLX_OML_sync_control +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe +#define _ALLEGRO_GLX_SGIX_hyperpipe +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; +} GLXHyperpipeNetworkSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin; + int srcYOrigin; + int srcWidth; + int srcHeight; + int destXOrigin; + int destYOrigin; + int destWidth; + int destHeight; +} GLXPipeRect; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin; + int YOrigin; + int maxHeight; + int maxWidth; +} GLXPipeRectLimits; +#endif + + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset +#define _ALLEGRO_GLX_MESA_agp_offset +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_EXT_framebuffer_sRGB +#define _ALLEGRO_GLX_EXT_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_EXT_fbconfig_packed_float +#define _ALLEGRO_GLX_EXT_fbconfig_packed_float +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap +#define _ALLEGRO_GLX_EXT_texture_from_pixmap +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB +#endif + +#ifndef GLX_NV_present_video +#define GLX_NV_present_video +#define _ALLEGRO_GLX_NV_present_video +#define GLX_GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef GLX_NV_video_output +#define GLX_NV_video_output +#define _ALLEGRO_GLX_NV_video_output +#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +typedef unsigned int GLXVideoDeviceNV; +#endif + +#ifndef GLX_NV_swap_group +#define GLX_NV_swap_group +#define _ALLEGRO_GLX_NV_swap_group +#endif + +#ifndef GLX_NV_video_capture +#define GLX_NV_video_capture +#define _ALLEGRO_GLX_NV_video_capture +#define GLX_DEVICE_ID_NV 0x20CD +#define GLX_UNIQUE_ID_NV 0x20CE +#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +typedef XID GLXVideoCaptureDeviceNV; +#endif + +#ifndef GLX_EXT_swap_control +#define GLX_EXT_swap_control +#define _ALLEGRO_GLX_EXT_swap_control +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +#endif + +#ifndef GLX_NV_copy_image +#define GLX_NV_copy_image +#define _ALLEGRO_GLX_NV_copy_image +#endif + +#ifndef GLX_INTEL_swap_event +#define GLX_INTEL_swap_event +#define _ALLEGRO_GLX_INTEL_swap_event +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +#define GLX_COPY_COMPLETE_INTEL 0x8181 +#define GLX_FLIP_COMPLETE_INTEL 0x8182 +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_list.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_list.h new file mode 100644 index 0000000..342522c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/glx_ext_list.h @@ -0,0 +1,40 @@ +AGL_EXT(ARB_get_proc_address, 0) +AGL_EXT(ARB_multisample, 0) +AGL_EXT(ARB_fbconfig_float, 0) +AGL_EXT(ARB_create_context, 0) +AGL_EXT(ARB_vertex_buffer_object, 0) +AGL_EXT(EXT_visual_info, 0) +AGL_EXT(SGI_swap_control, 0) +AGL_EXT(SGI_video_sync, 0) +AGL_EXT(SGI_make_current_read, 0) +AGL_EXT(SGIX_video_source, 0) +AGL_EXT(EXT_visual_rating, 0) +AGL_EXT(EXT_import_context, 0) +AGL_EXT(SGIX_fbconfig, 0) +AGL_EXT(SGIX_pbuffer, 0) +AGL_EXT(SGI_cushion, 0) +AGL_EXT(SGIX_video_resize, 0) +AGL_EXT(SGIX_dm_buffer, 0) +AGL_EXT(SGIX_swap_group, 0) +AGL_EXT(SGIX_swap_barrier, 0) +AGL_EXT(SGIS_color_range, 0) +AGL_EXT(SGIS_blended_overlay, 0) +AGL_EXT(SUN_get_transparent_index, 0) +AGL_EXT(MESA_copy_sub_buffer, 0) +AGL_EXT(MESA_pixmap_colormap, 0) +AGL_EXT(MESA_release_buffers, 0) +AGL_EXT(MESA_set_3dfx_mode, 0) +AGL_EXT(SGIX_visual_select_group, 0) +AGL_EXT(OML_swap_method, 0) +AGL_EXT(OML_sync_control, 0) +AGL_EXT(SGIX_hyperpipe, 0) +AGL_EXT(MESA_agp_offset, 0) +AGL_EXT(EXT_framebuffer_sRGB, 0) +AGL_EXT(EXT_packed_float, 0) +AGL_EXT(EXT_texture_from_pixmap, 0) +AGL_EXT(NV_video_output, 0) +AGL_EXT(NV_swap_group, 0) +AGL_EXT(NV_video_capture, 0) +AGL_EXT(EXT_swap_control, 0) +AGL_EXT(NV_copy_image, 0) +AGL_EXT(INTEL_swap_event, 0) diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_alias.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_alias.h new file mode 100644 index 0000000..ab0cf1f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_alias.h @@ -0,0 +1,168 @@ +/*Automatically generated by gl_mkalias.sh DO NOT EDIT!*/ +/*WGL_ARB_buffer_region*/ +#define wglCreateBufferRegionARB _al_wglCreateBufferRegionARB +#define wglDeleteBufferRegionARB _al_wglDeleteBufferRegionARB +#define wglSaveBufferRegionARB _al_wglSaveBufferRegionARB +#define wglRestoreBufferRegionARB _al_wglRestoreBufferRegionARB + +/*WGL_ARB_extensions_string*/ +#define wglGetExtensionsStringARB _al_wglGetExtensionsStringARB + +/*WGL_ARB_pixel_format*/ +#define wglGetPixelFormatAttribivARB _al_wglGetPixelFormatAttribivARB +#define wglGetPixelFormatAttribfvARB _al_wglGetPixelFormatAttribfvARB +#define wglChoosePixelFormatARB _al_wglChoosePixelFormatARB + +/*WGL_ARB_make_current_read*/ +#define wglMakeContextCurrentARB _al_wglMakeContextCurrentARB +#define wglGetCurrentReadDCARB _al_wglGetCurrentReadDCARB + +/*WGL_ARB_pbuffer*/ +#define wglCreatePbufferARB _al_wglCreatePbufferARB +#define wglGetPbufferDCARB _al_wglGetPbufferDCARB +#define wglReleasePbufferDCARB _al_wglReleasePbufferDCARB +#define wglDestroyPbufferARB _al_wglDestroyPbufferARB +#define wglQueryPbufferARB _al_wglQueryPbufferARB + +/*WGL_ARB_render_texture*/ +#define wglBindTexImageARB _al_wglBindTexImageARB +#define wglReleaseTexImageARB _al_wglReleaseTexImageARB +#define wglSetPbufferAttribARB _al_wglSetPbufferAttribARB + +/*WGL_ARB_create_context*/ +#define wglCreateContextAttribsARB _al_wglCreateContextAttribsARB + +/*WGL_EXT_display_color_table*/ +#define wglCreateDisplayColorTableEXT _al_wglCreateDisplayColorTableEXT +#define wglLoadDisplayColorTableEXT _al_wglLoadDisplayColorTableEXT +#define wglBindDisplayColorTableEXT _al_wglBindDisplayColorTableEXT +#define wglDestroyDisplayColorTableEXT _al_wglDestroyDisplayColorTableEXT + +/*WGL_EXT_extensions_string*/ +#define wglGetExtensionsStringEXT _al_wglGetExtensionsStringEXT + +/*WGL_EXT_make_current_read*/ +#define wglMakeContextCurrentEXT _al_wglMakeContextCurrentEXT +#define wglGetCurrentReadDCEXT _al_wglGetCurrentReadDCEXT + +/*WGL_EXT_pbuffer*/ +#define wglCreatePbufferEXT _al_wglCreatePbufferEXT +#define wglGetPbufferDCEXT _al_wglGetPbufferDCEXT +#define wglReleasePbufferDCEXT _al_wglReleasePbufferDCEXT +#define wglDestroyPbufferEXT _al_wglDestroyPbufferEXT +#define wglQueryPbufferEXT _al_wglQueryPbufferEXT + +/*WGL_EXT_pixel_format*/ +#define wglGetPixelFormatAttribivEXT _al_wglGetPixelFormatAttribivEXT +#define wglGetPixelFormatAttribfvEXT _al_wglGetPixelFormatAttribfvEXT +#define wglChoosePixelFormatEXT _al_wglChoosePixelFormatEXT + +/*WGL_EXT_swap_control*/ +#define wglSwapIntervalEXT _al_wglSwapIntervalEXT +#define wglGetSwapIntervalEXT _al_wglGetSwapIntervalEXT + +/*WGL_NV_vertex_array_range*/ +#define wglAllocateMemoryNV _al_wglAllocateMemoryNV +#define wglFreeMemoryNV _al_wglFreeMemoryNV + +/*WGL_OML_sync_control*/ +#define wglGetSyncValuesOML _al_wglGetSyncValuesOML +#define wglGetMscRateOML _al_wglGetMscRateOML +#define wglSwapBuffersMscOML _al_wglSwapBuffersMscOML +#define wglSwapLayerBuffersMscOML _al_wglSwapLayerBuffersMscOML +#define wglWaitForMscOML _al_wglWaitForMscOML +#define wglWaitForSbcOML _al_wglWaitForSbcOML + +/*WGL_I3D_digital_video_control*/ +#define wglGetDigitalVideoParametersI3D _al_wglGetDigitalVideoParametersI3D +#define wglSetDigitalVideoParametersI3D _al_wglSetDigitalVideoParametersI3D + +/*WGL_I3D_gamma*/ +#define wglGetGammaTableParametersI3D _al_wglGetGammaTableParametersI3D +#define wglSetGammaTableParametersI3D _al_wglSetGammaTableParametersI3D +#define wglGetGammaTableI3D _al_wglGetGammaTableI3D +#define wglSetGammaTableI3D _al_wglSetGammaTableI3D + +/*WGL_I3D_genlock*/ +#define wglEnableGenlockI3D _al_wglEnableGenlockI3D +#define wglDisableGenlockI3D _al_wglDisableGenlockI3D +#define wglIsEnabledGenlockI3D _al_wglIsEnabledGenlockI3D +#define wglGenlockSourceI3D _al_wglGenlockSourceI3D +#define wglGetGenlockSourceI3D _al_wglGetGenlockSourceI3D +#define wglGenlockSourceEdgeI3D _al_wglGenlockSourceEdgeI3D +#define wglGetGenlockSourceEdgeI3D _al_wglGetGenlockSourceEdgeI3D +#define wglGenlockSampleRateI3D _al_wglGenlockSampleRateI3D +#define wglGetGenlockSampleRateI3D _al_wglGetGenlockSampleRateI3D +#define wglGenlockSourceDelayI3D _al_wglGenlockSourceDelayI3D +#define wglGetGenlockSourceDelayI3D _al_wglGetGenlockSourceDelayI3D +#define wglQueryGenlockMaxSourceDelayI3D _al_wglQueryGenlockMaxSourceDelayI3D + +/*WGL_I3D_image_buffer*/ +#define wglCreateImageBufferI3D _al_wglCreateImageBufferI3D +#define wglDestroyImageBufferI3D _al_wglDestroyImageBufferI3D +#define wglAssociateImageBufferEventsI3D _al_wglAssociateImageBufferEventsI3D +#define wglReleaseImageBufferEventsI3D _al_wglReleaseImageBufferEventsI3D + +/*WGL_I3D_swap_frame_lock*/ +#define wglEnableFrameLockI3D _al_wglEnableFrameLockI3D +#define wglDisableFrameLockI3D _al_wglDisableFrameLockI3D +#define wglIsEnabledFrameLockI3D _al_wglIsEnabledFrameLockI3D +#define wglQueryFrameLockMasterI3D _al_wglQueryFrameLockMasterI3D + +/*WGL_I3D_swap_frame_usage*/ +#define wglGetFrameUsageI3D _al_wglGetFrameUsageI3D +#define wglBeginFrameTrackingI3D _al_wglBeginFrameTrackingI3D +#define wglEndFrameTrackingI3D _al_wglEndFrameTrackingI3D +#define wglQueryFrameTrackingI3D _al_wglQueryFrameTrackingI3D + +/*glAddSwapHintRectWIN*/ +#define wglAddSwapHintRectWIN _al_wglAddSwapHintRectWIN + +/*WGL_NV_present_video*/ +#define wglEnumerateVideoDevicesNV _al_wglEnumerateVideoDevicesNV +#define wglBindVideoDeviceNV _al_wglBindVideoDeviceNV +#define wglQueryCurrentContextNV _al_wglQueryCurrentContextNV + +/*WGL_NV_video_out*/ +#define wglGetVideoDeviceNV _al_wglGetVideoDeviceNV +#define wglReleaseVideoDeviceNV _al_wglReleaseVideoDeviceNV +#define wglBindVideoImageNV _al_wglBindVideoImageNV +#define wglReleaseVideoImageNV _al_wglReleaseVideoImageNV +#define wglSendPbufferToVideoNV _al_wglSendPbufferToVideoNV +#define wglGetVideoInfoNV _al_wglGetVideoInfoNV + +/*WGL_NV_swap_group*/ +#define wglJoinSwapGroupNV _al_wglJoinSwapGroupNV +#define wglBindSwapBarrierNV _al_wglBindSwapBarrierNV +#define wglQuerySwapGroupNV _al_wglQuerySwapGroupNV +#define wglQueryMaxSwapGroupsNV _al_wglQueryMaxSwapGroupsNV +#define wglQueryFrameCountNV _al_wglQueryFrameCountNV +#define wglResetFrameCountNV _al_wglResetFrameCountNV + +/*WGL_NV_gpu_affinity*/ +#define wglEnumGpusNV _al_wglEnumGpusNV +#define wglEnumGpuDevicesNV _al_wglEnumGpuDevicesNV +#define wglCreateAffinityDCNV _al_wglCreateAffinityDCNV +#define wglEnumGpusFromAffinityDCNV _al_wglEnumGpusFromAffinityDCNV +#define wglDeleteDCNV _al_wglDeleteDCNV + +/*WGL_AMD_gpu_association*/ +#define wglGetGPUIDsAMD _al_wglGetGPUIDsAMD +#define wglGetGPUInfoAMD _al_wglGetGPUInfoAMD +#define wglGetContextGPUIDAMD _al_wglGetContextGPUIDAMD +#define wglCreateAssociatedContextAMD _al_wglCreateAssociatedContextAMD +#define wglCreateAssociatedContextAttribsAMD _al_wglCreateAssociatedContextAttribsAMD +#define wglDeleteAssociatedContextAMD _al_wglDeleteAssociatedContextAMD +#define wglMakeAssociatedContextCurrentAMD _al_wglMakeAssociatedContextCurrentAMD +#define wglGetCurrentAssociatedContextAMD _al_wglGetCurrentAssociatedContextAMD +#define wglBlitContextFramebufferAMD _al_wglBlitContextFramebufferAMD + +/*WGL_NV_video_capture*/ +#define wglBindVideoCaptureDeviceNV _al_wglBindVideoCaptureDeviceNV +#define wglEnumerateVideoCaptureDevicesNV _al_wglEnumerateVideoCaptureDevicesNV +#define wglLockVideoCaptureDeviceNV _al_wglLockVideoCaptureDeviceNV +#define wglQueryVideoCaptureDeviceNV _al_wglQueryVideoCaptureDeviceNV +#define wglReleaseVideoCaptureDeviceNV _al_wglReleaseVideoCaptureDeviceNV + +/*WGL_NV_copy_image*/ +#define wglCopyImageSubDataNV _al_wglCopyImageSubDataNV diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_api.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_api.h new file mode 100644 index 0000000..40aa964 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_api.h @@ -0,0 +1,167 @@ +/* WGL_ARB_buffer_region */ +AGL_API(HANDLE, CreateBufferRegionARB, (HDC, int, UINT)) +AGL_API(VOID, DeleteBufferRegionARB, (HANDLE)) +AGL_API(BOOL, SaveBufferRegionARB, (HANDLE, int, int, int, int)) +AGL_API(BOOL, RestoreBufferRegionARB, (HANDLE, int, int, int, int, int, int)) + +/* WGL_ARB_extensions_string */ +AGL_API(const char *, GetExtensionsStringARB, (HDC)) + +/* WGL_ARB_pixel_format */ +AGL_API(BOOL, GetPixelFormatAttribivARB, (HDC, int, int, UINT, const int *, int *)) +AGL_API(BOOL, GetPixelFormatAttribfvARB, (HDC, int, int, UINT, const int *, FLOAT *)) +AGL_API(BOOL, ChoosePixelFormatARB, (HDC, const int *, const FLOAT *, UINT, int *, UINT *)) + +/* WGL_ARB_make_current_read */ +AGL_API(BOOL, MakeContextCurrentARB, (HDC, HDC, HGLRC)) +AGL_API(HDC, GetCurrentReadDCARB, (void)) + +/* WGL_ARB_pbuffer */ +AGL_API(HPBUFFERARB, CreatePbufferARB, (HDC, int, int, int, const int *)) +AGL_API(HDC, GetPbufferDCARB, (HPBUFFERARB)) +AGL_API(int, ReleasePbufferDCARB, (HPBUFFERARB, HDC)) +AGL_API(BOOL, DestroyPbufferARB, (HPBUFFERARB)) +AGL_API(BOOL, QueryPbufferARB, (HPBUFFERARB, int, int *)) + +/* WGL_ARB_render_texture */ +AGL_API(BOOL, BindTexImageARB, (HPBUFFERARB, int)) +AGL_API(BOOL, ReleaseTexImageARB, (HPBUFFERARB, int)) +AGL_API(BOOL, SetPbufferAttribARB, (HPBUFFERARB, const int *)) + +/* WGL_ARB_create_context */ +AGL_API(HGLRC, CreateContextAttribsARB, (HDC, HGLRC, const int *)) + +/* WGL_EXT_display_color_table */ +AGL_API(GLboolean, CreateDisplayColorTableEXT, (GLushort)) +AGL_API(GLboolean, LoadDisplayColorTableEXT, (const GLushort *, GLuint)) +AGL_API(GLboolean, BindDisplayColorTableEXT, (GLushort)) +AGL_API(VOID, DestroyDisplayColorTableEXT, (GLushort)) + +/* WGL_EXT_extensions_string */ +AGL_API(const char *, GetExtensionsStringEXT, (void)) + +/* WGL_EXT_make_current_read */ +AGL_API(BOOL, MakeContextCurrentEXT, (HDC, HDC, HGLRC)) +AGL_API(HDC, GetCurrentReadDCEXT, (void)) + +/* WGL_EXT_pbuffer */ +AGL_API(HPBUFFEREXT, CreatePbufferEXT, (HDC, int, int, int, const int *)) +AGL_API(HDC, GetPbufferDCEXT, (HPBUFFEREXT)) +AGL_API(int, ReleasePbufferDCEXT, (HPBUFFEREXT, HDC)) +AGL_API(BOOL, DestroyPbufferEXT, (HPBUFFEREXT)) +AGL_API(BOOL, QueryPbufferEXT, (HPBUFFEREXT, int, int *)) + +/* WGL_EXT_pixel_format */ +AGL_API(BOOL, GetPixelFormatAttribivEXT, (HDC, int, int, UINT, int *, int *)) +AGL_API(BOOL, GetPixelFormatAttribfvEXT, (HDC, int, int, UINT, int *, FLOAT *)) +AGL_API(BOOL, ChoosePixelFormatEXT, (HDC, const int *, const FLOAT *, UINT, int *, UINT *)) + +/* WGL_EXT_swap_control */ +AGL_API(BOOL, SwapIntervalEXT, (int)) +AGL_API(int, GetSwapIntervalEXT, (void)) + +/* WGL_NV_vertex_array_range */ +AGL_API(void*, AllocateMemoryNV, (GLsizei, GLfloat, GLfloat, GLfloat)) +AGL_API(void, FreeMemoryNV, (void *)) + +/* WGL_OML_sync_control */ +AGL_API(BOOL, GetSyncValuesOML, (HDC, INT64 *, INT64 *, INT64 *)) +AGL_API(BOOL, GetMscRateOML, (HDC, INT32 *, INT32 *)) +AGL_API(INT64, SwapBuffersMscOML, (HDC, INT64, INT64, INT64)) +AGL_API(INT64, SwapLayerBuffersMscOML, (HDC, int, INT64, INT64, INT64)) +AGL_API(BOOL, WaitForMscOML, (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *)) +AGL_API(BOOL, WaitForSbcOML, (HDC, INT64, INT64 *, INT64 *, INT64 *)) + +/* WGL_I3D_digital_video_control */ +AGL_API(BOOL, GetDigitalVideoParametersI3D, (HDC, int, int *)) +AGL_API(BOOL, SetDigitalVideoParametersI3D, (HDC, int, const int *)) + +/* WGL_I3D_gamma */ +AGL_API(BOOL, GetGammaTableParametersI3D, (HDC, int, int *)) +AGL_API(BOOL, SetGammaTableParametersI3D, (HDC, int, const int *)) +AGL_API(BOOL, GetGammaTableI3D, (HDC, int, USHORT *, USHORT *, USHORT *)) +AGL_API(BOOL, SetGammaTableI3D, (HDC, int, const USHORT *, const USHORT *, const USHORT *)) + +/* WGL_I3D_genlock */ +AGL_API(BOOL, EnableGenlockI3D, (HDC)) +AGL_API(BOOL, DisableGenlockI3D, (HDC)) +AGL_API(BOOL, IsEnabledGenlockI3D, (HDC, BOOL *)) +AGL_API(BOOL, GenlockSourceI3D, (HDC, UINT)) +AGL_API(BOOL, GetGenlockSourceI3D, (HDC, UINT *)) +AGL_API(BOOL, GenlockSourceEdgeI3D, (HDC, UINT)) +AGL_API(BOOL, GetGenlockSourceEdgeI3D, (HDC, UINT *)) +AGL_API(BOOL, GenlockSampleRateI3D, (HDC, UINT)) +AGL_API(BOOL, GetGenlockSampleRateI3D, (HDC, UINT *)) +AGL_API(BOOL, GenlockSourceDelayI3D, (HDC, UINT)) +AGL_API(BOOL, GetGenlockSourceDelayI3D, (HDC, UINT *)) +AGL_API(BOOL, QueryGenlockMaxSourceDelayI3D, (HDC, UINT *, UINT *)) + +/* WGL_I3D_image_buffer */ +AGL_API(LPVOID, CreateImageBufferI3D, (HDC, DWORD, UINT)) +AGL_API(BOOL, DestroyImageBufferI3D, (HDC, LPVOID)) +AGL_API(BOOL, AssociateImageBufferEventsI3D, (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT)) +AGL_API(BOOL, ReleaseImageBufferEventsI3D, (HDC, const LPVOID *, UINT)) + +/* WGL_I3D_swap_frame_lock */ +AGL_API(BOOL, EnableFrameLockI3D, (void)) +AGL_API(BOOL, DisableFrameLockI3D, (void)) +AGL_API(BOOL, IsEnabledFrameLockI3D, (BOOL *)) +AGL_API(BOOL, QueryFrameLockMasterI3D, (BOOL *)) + +/* WGL_I3D_swap_frame_usage */ +AGL_API(BOOL, GetFrameUsageI3D, (float *)) +AGL_API(BOOL, BeginFrameTrackingI3D, (void)) +AGL_API(BOOL, EndFrameTrackingI3D, (void)) +AGL_API(BOOL, QueryFrameTrackingI3D, (DWORD *, DWORD *, float *)) + +/* glAddSwapHintRectWIN */ +AGL_API(void, AddSwapHintRectWIN, (int, int, int, int)) + +/* WGL_NV_present_video */ +AGL_API(int, EnumerateVideoDevicesNV, (HDC, HVIDEOOUTPUTDEVICENV *)) +AGL_API(BOOL, BindVideoDeviceNV, (HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int *)) +AGL_API(BOOL, QueryCurrentContextNV, (int, int *)) + +/* WGL_NV_video_out */ +AGL_API(BOOL, GetVideoDeviceNV, (HDC, int, HPVIDEODEV *)) +AGL_API(BOOL, ReleaseVideoDeviceNV, (HPVIDEODEV)) +AGL_API(BOOL, BindVideoImageNV, (HPVIDEODEV, HPBUFFERARB, int)) +AGL_API(BOOL, ReleaseVideoImageNV, (HPBUFFERARB, int)) +AGL_API(BOOL, SendPbufferToVideoNV, (HPBUFFERARB, int, unsigned long *, BOOL)) +AGL_API(BOOL, GetVideoInfoNV, (HPVIDEODEV, unsigned long *, unsigned long *)) + +/* WGL_NV_swap_group */ +AGL_API(BOOL, JoinSwapGroupNV, (HDC hDC, GLuint group)) +AGL_API(BOOL, BindSwapBarrierNV, (GLuint group, GLuint barrier)) +AGL_API(BOOL, QuerySwapGroupNV, (HDC hDC, GLuint *group, GLuint *barrier)) +AGL_API(BOOL, QueryMaxSwapGroupsNV, (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers)) +AGL_API(BOOL, QueryFrameCountNV, (HDC hDC, GLuint *count)) +AGL_API(BOOL, ResetFrameCountNV, (HDC hDC)) + +/* WGL_NV_gpu_affinity */ +AGL_API(BOOL, EnumGpusNV, (UINT, HGPUNV *)) +AGL_API(BOOL, EnumGpuDevicesNV, (HGPUNV, UINT, PGPU_DEVICE)) +AGL_API(HDC, CreateAffinityDCNV, (const HGPUNV *)) +AGL_API(BOOL, EnumGpusFromAffinityDCNV, (HDC, UINT, HGPUNV *)) +AGL_API(BOOL, DeleteDCNV, (HDC)) + +/* WGL_AMD_gpu_association */ +AGL_API(UINT, GetGPUIDsAMD, (UINT, UINT *)) +AGL_API(INT, GetGPUInfoAMD, (UINT, int, GLenum, UINT, void *)) +AGL_API(UINT, GetContextGPUIDAMD, (HGLRC)) +AGL_API(HGLRC, CreateAssociatedContextAMD, (UINT)) +AGL_API(HGLRC, CreateAssociatedContextAttribsAMD, (UINT, HGLRC, const int *)) +AGL_API(BOOL, DeleteAssociatedContextAMD, (HGLRC)) +AGL_API(BOOL, MakeAssociatedContextCurrentAMD, (HGLRC)) +AGL_API(HGLRC, GetCurrentAssociatedContextAMD, (void)) +AGL_API(VOID, BlitContextFramebufferAMD, (HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) + +/* WGL_NV_video_capture */ +AGL_API(BOOL, BindVideoCaptureDeviceNV, (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice)) +AGL_API(UINT, EnumerateVideoCaptureDevicesNV, (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList)) +AGL_API(BOOL, LockVideoCaptureDeviceNV, (HDC hDc, HVIDEOINPUTDEVICENV hDevice)) +AGL_API(BOOL, QueryVideoCaptureDeviceNV, (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue)) +AGL_API(BOOL, ReleaseVideoCaptureDeviceNV, (HDC hDc, HVIDEOINPUTDEVICENV hDevice)) + +/* WGL_NV_copy_image */ +AGL_API(BOOL, CopyImageSubDataNV, (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)) diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_defs.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_defs.h new file mode 100644 index 0000000..aed3eac --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_defs.h @@ -0,0 +1,386 @@ +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +#endif + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#endif + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer +DECLARE_HANDLE(HPBUFFERARB); +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +#endif + + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float +#define AWGL_ARB_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +#endif + +#ifndef WGL_ARB_create_context_profile +#define WGL_ARB_create_context_profile +#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +#define ERROR_INVALID_PROFILE_ARB 0x2096 +#endif + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer +DECLARE_HANDLE(HPBUFFEREXT); +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +#endif + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +#endif + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +#endif + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif + +#ifndef WGL_WIN_swap_hint +#define WGL_WIN_swap_hint +#endif + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef WGL_NV_video_out +#define WGL_NV_video_out +DECLARE_HANDLE(HPVIDEODEV); +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +#endif + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity +DECLARE_HANDLE(HPGPUNV); +DECLARE_HANDLE(HGPUNV); + +typedef struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +} GPU_DEVICE, *PGPU_DEVICE; +#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +#endif + +#ifndef WGL_AMD_gpu_association +#define WGL_AMD_gpu_association +#define WGL_GPU_VENDOR_AMD 0x1F00 +#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define WGL_GPU_RAM_AMD 0x21A3 +#define WGL_GPU_CLOCK_AMD 0x21A4 +#define WGL_GPU_NUM_PIPES_AMD 0x21A5 +#define WGL_GPU_NUM_SIMD_AMD 0x21A6 +#define WGL_GPU_NUM_RB_AMD 0x21A7 +#define WGL_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef WGL_NV_video_capture +#define WGL_NV_video_capture +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +#define WGL_UNIQUE_ID_NV 0x20CE +#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#endif + +#ifndef WGL_NV_copy_image +#define WGL_NV_copy_image +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_list.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_list.h new file mode 100644 index 0000000..1fd6962 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/GLext/wgl_ext_list.h @@ -0,0 +1,38 @@ +AGL_EXT(ARB_buffer_region, 0) +AGL_EXT(ARB_multisample, 0) +AGL_EXT(ARB_extensions_string, 0) +AGL_EXT(ARB_pixel_format, 0) +AGL_EXT(ARB_make_current_read, 0) +AGL_EXT(ARB_pbuffer, 0) +AGL_EXT(ARB_render_texture, 0) +AGL_EXT(ARB_pixel_format_float, 0) +AGL_EXT(EXT_display_color_table, 0) +AGL_EXT(EXT_extensions_string, 0) +AGL_EXT(EXT_make_current_read, 0) +AGL_EXT(EXT_pixel_format, 0) +AGL_EXT(EXT_pbuffer, 0) +AGL_EXT(EXT_swap_control, 0) +AGL_EXT(EXT_depth_float, 0) +AGL_EXT(EXT_multisample, 0) +AGL_EXT(OML_sync_control, 0) +AGL_EXT(I3D_digital_video_control, 0) +AGL_EXT(I3D_gamma, 0) +AGL_EXT(I3D_genlock, 0) +AGL_EXT(I3D_image_buffer, 0) +AGL_EXT(I3D_swap_frame_lock, 0) +AGL_EXT(I3D_swap_frame_usage, 0) +AGL_EXT(NV_render_depth_texture, 0) +AGL_EXT(NV_render_texture_rectangle, 0) +AGL_EXT(ATI_pixel_format_float, 0) +AGL_EXT(EXT_framebuffer_sRGB, 0) +AGL_EXT(EXT_pixel_format_packed_float,0) +AGL_EXT(WIN_swap_hint, 0) +AGL_EXT(3DL_stereo_control, 0) +AGL_EXT(NV_swap_group, 0) +AGL_EXT(NV_gpu_affinity, 0) +AGL_EXT(NV_video_out, 0) +AGL_EXT(NV_present_video, 0) +AGL_EXT(ARB_create_context, 0) +AGL_EXT(AMD_gpu_association, 0) +AGL_EXT(NV_copy_image, 0) +AGL_EXT(NV_video_capture, 0) diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/gl_ext.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/gl_ext.h new file mode 100644 index 0000000..2ad6d1e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/opengl/gl_ext.h @@ -0,0 +1,140 @@ + +#ifndef __al_included_allegro5_gl_ext_h +#define __al_included_allegro5_gl_ext_h + + +/* + * MSVC declares the following extensions and MinGW doesn't. In order to + * export the same symbols on both platforms we removed the extensions from + * MSVC. + */ +#ifdef ALLEGRO_MSVC + #undef GL_EXT_vertex_array + #undef GL_EXT_paletted_texture + #undef GL_WIN_swap_hint + #undef GL_WIN_draw_range_elements +#endif + +/* GL extension definitions. */ + +/* For example: + * + * #define GL_BGRA 0x80E1 + * + */ + +#if !defined(ALLEGRO_GP2XWIZ) && !defined(ALLEGRO_IPHONE) +#include "allegro5/opengl/GLext/gl_ext_defs.h" +#endif +#if defined ALLEGRO_WINDOWS && !defined ALLEGRO_EXCLUDE_WGL +#include "allegro5/opengl/GLext/wgl_ext_defs.h" +#elif defined ALLEGRO_UNIX && !defined ALLEGRO_EXCLUDE_GLX +#include "allegro5/opengl/GLext/glx_ext_defs.h" +#endif + +/* GL extension types */ + +/* For example: + * + * typedef void (APIENTRY * _ALLEGRO_glBlendEquation_t (GLenum); + * + */ + +#ifndef APIENTRY +#define APIENTRY +#define APIENTRY_defined +#endif + +#define AGL_API(type, name, args) typedef type (APIENTRY * _ALLEGRO_gl##name##_t) args; +# include "allegro5/opengl/GLext/gl_ext_api.h" +#undef AGL_API +#ifdef ALLEGRO_WINDOWS +#define AGL_API(type, name, args) typedef type (APIENTRY * _ALLEGRO_wgl##name##_t) args; +# include "allegro5/opengl/GLext/wgl_ext_api.h" +#undef AGL_API +#elif defined ALLEGRO_UNIX +#define AGL_API(type, name, args) typedef type (APIENTRY * _ALLEGRO_glX##name##_t) args; +# include "allegro5/opengl/GLext/glx_ext_api.h" +#undef AGL_API +#endif + +#ifdef APIENTRY_defined +#undef APIENTRY +#undef APIENTRY_defined +#endif + +/* GL extension declarations */ + +/* For example: + * + * #define glBlendEquation _al_glBlendEquation + * extern _ALLEGRO_glBlendEquation_t _al_glBlendEquation; + * + */ + +#define AGL_API(type, name, args) AL_VAR(_ALLEGRO_gl##name##_t, _al_gl##name); +# include "allegro5/opengl/GLext/gl_ext_alias.h" +# include "allegro5/opengl/GLext/gl_ext_api.h" +#undef AGL_API +#ifdef ALLEGRO_WINDOWS +#define AGL_API(type, name, args) AL_VAR(_ALLEGRO_wgl##name##_t, _al_wgl##name); +# include "allegro5/opengl/GLext/wgl_ext_alias.h" +# include "allegro5/opengl/GLext/wgl_ext_api.h" +#undef AGL_API +#elif defined ALLEGRO_UNIX +#define AGL_API(type, name, args) extern _ALLEGRO_glX##name##_t _al_glX##name; +# include "allegro5/opengl/GLext/glx_ext_alias.h" +# include "allegro5/opengl/GLext/glx_ext_api.h" +#undef AGL_API +#endif + +/* A list of all supported extensions. + * + * For example: + * int ALLEGRO_GL_ARB_imaging; + * + */ + +typedef struct ALLEGRO_OGL_EXT_LIST { +# define AGL_EXT(name, ver) int ALLEGRO_GL_##name; +# include "allegro5/opengl/GLext/gl_ext_list.h" +# undef AGL_EXT + +#ifdef ALLEGRO_UNIX +# define AGL_EXT(name, ver) int ALLEGRO_GLX_##name; +# include "allegro5/opengl/GLext/glx_ext_list.h" +# undef AGL_EXT +#elif defined ALLEGRO_WINDOWS +# define AGL_EXT(name, ver) int ALLEGRO_WGL_##name; +# include "allegro5/opengl/GLext/wgl_ext_list.h" +# undef AGL_EXT + +#endif +} ALLEGRO_OGL_EXT_LIST; + + +/* GL extension Structure. Holds the pointers to all the functions + * of all extensions, for a single context. + * + * Example: + * ALLEGRO_BlendEquation_t BlendEquation; + */ +typedef struct ALLEGRO_OGL_EXT_API { +#define AGL_API(type, name, args) _ALLEGRO_gl##name##_t name; +# include "allegro5/opengl/GLext/gl_ext_api.h" +#undef AGL_API +#ifdef ALLEGRO_WINDOWS +#define AGL_API(type, name, args) _ALLEGRO_wgl##name##_t name; +# include "allegro5/opengl/GLext/wgl_ext_api.h" +#undef AGL_API +#elif defined ALLEGRO_UNIX +#define AGL_API(type, name, args) _ALLEGRO_glX##name##_t name; +# include "allegro5/opengl/GLext/glx_ext_api.h" +#undef AGL_API +#endif +} ALLEGRO_OGL_EXT_API; + + + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/path.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/path.h new file mode 100644 index 0000000..ce229cb --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/path.h @@ -0,0 +1,55 @@ +#ifndef __al_included_allegro5_path_h +#define __al_included_allegro5_path_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +#ifdef ALLEGRO_WINDOWS +# define ALLEGRO_NATIVE_PATH_SEP '\\' +# define ALLEGRO_NATIVE_DRIVE_SEP ':' +#else +# define ALLEGRO_NATIVE_PATH_SEP '/' +# define ALLEGRO_NATIVE_DRIVE_SEP '\0' +#endif + +typedef struct ALLEGRO_PATH ALLEGRO_PATH; + +AL_FUNC(ALLEGRO_PATH*, al_create_path, (const char *str)); +AL_FUNC(ALLEGRO_PATH*, al_create_path_for_directory, (const char *str)); +AL_FUNC(ALLEGRO_PATH*, al_clone_path, (const ALLEGRO_PATH *path)); + +AL_FUNC(int, al_get_path_num_components, (const ALLEGRO_PATH *path)); +AL_FUNC(const char*, al_get_path_component, (const ALLEGRO_PATH *path, int i)); +AL_FUNC(void, al_replace_path_component, (ALLEGRO_PATH *path, int i, const char *s)); +AL_FUNC(void, al_remove_path_component, (ALLEGRO_PATH *path, int i)); +AL_FUNC(void, al_insert_path_component, (ALLEGRO_PATH *path, int i, const char *s)); +AL_FUNC(const char*, al_get_path_tail, (const ALLEGRO_PATH *path)); +AL_FUNC(void, al_drop_path_tail, (ALLEGRO_PATH *path)); +AL_FUNC(void, al_append_path_component, (ALLEGRO_PATH *path, const char *s)); +AL_FUNC(bool, al_join_paths, (ALLEGRO_PATH *path, const ALLEGRO_PATH *tail)); +AL_FUNC(bool, al_rebase_path, (const ALLEGRO_PATH *head, ALLEGRO_PATH *tail)); +AL_FUNC(const char*, al_path_cstr, (const ALLEGRO_PATH *path, char delim)); +AL_FUNC(void, al_destroy_path, (ALLEGRO_PATH *path)); + +AL_FUNC(void, al_set_path_drive, (ALLEGRO_PATH *path, const char *drive)); +AL_FUNC(const char*, al_get_path_drive, (const ALLEGRO_PATH *path)); + +AL_FUNC(void, al_set_path_filename, (ALLEGRO_PATH *path, const char *filename)); +AL_FUNC(const char*, al_get_path_filename, (const ALLEGRO_PATH *path)); + +AL_FUNC(const char*, al_get_path_extension, (const ALLEGRO_PATH *path)); +AL_FUNC(bool, al_set_path_extension, (ALLEGRO_PATH *path, char const *extension)); +AL_FUNC(const char*, al_get_path_basename, (const ALLEGRO_PATH *path)); + +AL_FUNC(bool, al_make_path_canonical, (ALLEGRO_PATH *path)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintiphone.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintiphone.h new file mode 100644 index 0000000..f51f9a5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintiphone.h @@ -0,0 +1,15 @@ +#ifndef __al_included_allegro5_aintiphone_h +#define __al_included_allegro5_aintiphone_h + +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_bitmap.h" +#include "allegro5/internal/aintern_system.h" +#include "allegro5/system.h" +#include "allegro5/platform/aintunix.h" + +ALLEGRO_DISPLAY_INTERFACE *_al_display_iphone(void); +ALLEGRO_SYSTEM_INTERFACE *_al_system_iphone(void); +ALLEGRO_PATH *_al_iphone_get_path(int id); + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintlnx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintlnx.h new file mode 100644 index 0000000..96f62e0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintlnx.h @@ -0,0 +1,100 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Some definitions for internal use by the Linux console code. + * + * By George Foot. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_aintlnx_h +#define __al_included_allegro5_aintlnx_h + +#ifdef __cplusplus +extern "C" { +#endif + + +/**************************************/ +/************ Driver lists ************/ +/**************************************/ + +extern _AL_DRIVER_INFO _al_linux_keyboard_driver_list[]; +extern _AL_DRIVER_INFO _al_linux_mouse_driver_list[]; + + +/****************************************/ +/************ Memory mapping ************/ /* (src/linux/lmemory.c) */ +/****************************************/ + +/* struct MAPPED_MEMORY: Used to describe a block of memory mapped + * into our address space (in particular, the video memory). + */ +struct MAPPED_MEMORY { + unsigned int base, size; /* linear address and size of block */ + int perms; /* PROT_READ | PROT_WRITE, etc */ + void *data; /* pointer to block after mapping */ +}; + +extern int __al_linux_have_ioperms; + +int __al_linux_init_memory (void); +int __al_linux_shutdown_memory (void); +int __al_linux_map_memory (struct MAPPED_MEMORY *info); +int __al_linux_unmap_memory (struct MAPPED_MEMORY *info); + + +/******************************************/ +/************ Console routines ************/ /* (src/linux/lconsole.c) */ +/******************************************/ + +extern int __al_linux_vt; +extern int __al_linux_console_fd; +extern int __al_linux_prev_vt; +extern int __al_linux_got_text_message; +extern struct termios __al_linux_startup_termio; +extern struct termios __al_linux_work_termio; + +int __al_linux_use_console (void); +int __al_linux_leave_console (void); + +int __al_linux_console_graphics (void); +int __al_linux_console_text (void); + +int __al_linux_wait_for_display (void); + + +/**************************************/ +/************ VT switching ************/ /* (src/linux/vtswitch.c) */ +/**************************************/ + +/* signals for VT switching */ +#define SIGRELVT SIGUSR1 +#define SIGACQVT SIGUSR2 + +int __al_linux_init_vtswitch (void); +int __al_linux_done_vtswitch (void); + +int __al_linux_set_display_switch_mode (int mode); +void __al_linux_display_switch_lock (int lock, int foreground); + +extern volatile int __al_linux_switching_blocked; + + + +#ifdef __cplusplus +} +#endif + + + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintosx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintosx.h new file mode 100644 index 0000000..794b2bc --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintosx.h @@ -0,0 +1,162 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Internal header file for the MacOS X Allegro library port. + * + * By Angelo Mottola. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_aintosx_h +#define __al_included_allegro5_aintosx_h + +#include "allegro5/internal/aintern.h" +#include "allegro5/internal/aintern_system.h" +#include "allegro5/internal/aintern_events.h" +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_joystick.h" +#include "allegro5/internal/aintern_keyboard.h" +#include "allegro5/internal/aintern_mouse.h" +#include "allegro5/platform/aintunix.h" + +#ifdef __OBJC__ + +#include +#include +#include +#include +#include +#include + + +#ifndef NSAppKitVersionNumber10_1 +#define NSAppKitVersionNumber10_1 620 +#endif +#ifndef NSAppKitVersionNumber10_2 +#define NSAppKitVersionNumber10_2 663 +#endif + +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +#error Cannot target OS X versions before 10.4 +#endif + +/* We include code to detect a "dead bootstrap context" and fail + * gracefully if that situation is detected, but some of the code uses + * deprecated functions and it isn't generally clear what "dead bootstrap + * context" means (google's first result points back to Allegro). It is + * also not clear if the problem this aims to solve still occurs on recent + * versions of OS X. + * Define OSX_BOOTSTRAP_DETECTION to compile this check in. It can + * be brought back/reactivated when someone finds out how. + */ +//#define OSX_BOOTSTRAP_DETECTION + + +#define HID_MAX_DEVICES MAX_JOYSTICKS +#define HID_MOUSE 0 +#define HID_JOYSTICK 1 +#define HID_GAMEPAD 2 + +#define HID_MAX_DEVICE_ELEMENTS ((MAX_JOYSTICK_AXIS * MAX_JOYSTICK_STICKS) + MAX_JOYSTICK_BUTTONS) +#define HID_ELEMENT_BUTTON 0 +#define HID_ELEMENT_AXIS 1 +#define HID_ELEMENT_AXIS_PRIMARY_X 2 +#define HID_ELEMENT_AXIS_PRIMARY_Y 3 +#define HID_ELEMENT_STANDALONE_AXIS 4 +#define HID_ELEMENT_HAT 5 + + + + +typedef struct HID_ELEMENT +{ + int type; + IOHIDElementCookie cookie; + int max, min; + int app; + int col; + int index; + char *name; +} HID_ELEMENT; + + +typedef struct HID_DEVICE +{ + int type; + char *manufacturer; + char *product; + int num_elements; + int capacity; + HID_ELEMENT *element; + IOHIDDeviceInterface **interface; + int cur_app; +} HID_DEVICE; + +typedef struct +{ + int count; + int capacity; + HID_DEVICE* devices; +} HID_DEVICE_COLLECTION; + +int _al_osx_bootstrap_ok(void); + +void _al_osx_keyboard_handler(int pressed, NSEvent *event, ALLEGRO_DISPLAY*); +void _al_osx_keyboard_modifiers(unsigned int new_mods, ALLEGRO_DISPLAY*); +void _al_osx_keyboard_focused(int focused, int state); + +void _al_osx_mouse_generate_event(NSEvent*, ALLEGRO_DISPLAY*); +void _al_osx_mouse_handler(NSEvent*); +int _al_osx_mouse_set_sprite(ALLEGRO_BITMAP *sprite, int x, int y); +int _al_osx_mouse_show(ALLEGRO_BITMAP *bmp, int x, int y); +void _al_osx_mouse_hide(void); +void _al_osx_mouse_move(int x, int y); + +HID_DEVICE_COLLECTION *_al_osx_hid_scan(int type, HID_DEVICE_COLLECTION*); +void _al_osx_hid_free(HID_DEVICE_COLLECTION *); + +// Record in the keyboard state that the main window has changed +void _al_osx_switch_keyboard_focus(ALLEGRO_DISPLAY *, bool switch_in); +// Record in the mouse state that the main window has changed +void _al_osx_switch_mouse_focus(ALLEGRO_DISPLAY *, bool switch_in); +// Clear the mouse state when a dialog closes in the dialog addon +void _al_osx_clear_mouse_state(void); +// Notify the display that the mouse driver was installed/uninstalled. +void _al_osx_mouse_was_installed(BOOL); +// Create and destroy mouse cursors +ALLEGRO_MOUSE_CURSOR *_al_osx_create_mouse_cursor(ALLEGRO_BITMAP *bmp, int x_focus, int y_focus); +void _al_osx_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *curs); +// Notify the display that the keyboard driver was installed/uninstalled. +void _al_osx_keyboard_was_installed(BOOL); +// Notify that the quit menu was clicked +void _al_osx_post_quit(void); +// Get the underlying view +NSView* _al_osx_view_from_display(ALLEGRO_DISPLAY*); +// Create an image from an allegro bitmap +NSImage* NSImageFromAllegroBitmap(ALLEGRO_BITMAP* bmp); +// Drivers +AL_FUNC(ALLEGRO_KEYBOARD_DRIVER*, _al_osx_get_keyboard_driver, (void)); +AL_FUNC(ALLEGRO_DISPLAY_INTERFACE*, _al_osx_get_display_driver, (void)); +AL_FUNC(ALLEGRO_MOUSE_DRIVER*, _al_osx_get_mouse_driver, (void)); +AL_FUNC(ALLEGRO_JOYSTICK_DRIVER*, _al_osx_get_joystick_driver, (void)); +#endif + +AL_FUNC(int, _al_osx_run_main, (int argc, char **argv, + int (*real_main)(int, char **))); + +#endif + +/* Local variables: */ +/* mode: objc */ +/* c-basic-offset: 3 */ +/* indent-tabs-mode: nil */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintunix.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintunix.h new file mode 100644 index 0000000..d08cc72 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintunix.h @@ -0,0 +1,82 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Some definitions for internal use by the Unix library code. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_aintunix_h +#define __al_included_allegro5_aintunix_h + +#include "allegro5/path.h" +#include "allegro5/internal/aintern_driver.h" + +/* Need right now for XKeyEvent --pw */ +#ifdef ALLEGRO_WITH_XWINDOWS +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + AL_FUNC(ALLEGRO_PATH *, _al_unix_get_path, (int id)); + + +#ifdef __cplusplus +} +#endif + + +#ifdef ALLEGRO_LINUX + #include "allegro5/platform/aintlnx.h" +#endif + + + +/*----------------------------------------------------------------------* + * * + * New stuff * + * * + *----------------------------------------------------------------------*/ + +/* TODO: integrate this above */ + +#include "allegro5/platform/aintuthr.h" + + +#ifdef __cplusplus + extern "C" { +#endif + +/* time */ +AL_FUNC(void, _al_unix_init_time, (void)); + +/* fdwatch */ +void _al_unix_start_watching_fd(int fd, void (*callback)(void *), void *cb_data); +void _al_unix_stop_watching_fd(int fd); + +/* ljoynu.c */ +/* This isn't in aintlnx.h because it's needed for the X11 port as well. */ +#define _ALLEGRO_JOYDRV_LINUX AL_ID('L','N','X','A') + +#ifdef ALLEGRO_HAVE_LINUX_JOYSTICK_H +AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_linux); +#endif + +#ifdef __cplusplus + } +#endif + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintuthr.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintuthr.h new file mode 100644 index 0000000..809753a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintuthr.h @@ -0,0 +1,101 @@ +/* + * UNIX threads + */ +#ifndef __al_included_allegro5_aintuthr_h +#define __al_included_allegro5_aintuthr_h + +#include +#include "allegro5/internal/aintern_thread.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* threads */ +struct _AL_THREAD +{ + /* private: */ + pthread_t thread; + pthread_mutex_t mutex; + bool should_stop; + void (*proc)(struct _AL_THREAD *self, void *arg); + void *arg; +}; + +struct _AL_MUTEX +{ + bool inited; + pthread_mutex_t mutex; +}; + +#define _AL_MUTEX_UNINITED { false, PTHREAD_MUTEX_INITIALIZER } + /* makes no sense, but shuts gcc up */ +#define _AL_MARK_MUTEX_UNINITED(M) do { M.inited = false; } while (0) + +struct _AL_COND +{ + pthread_cond_t cond; +}; + +typedef struct ALLEGRO_TIMEOUT_UNIX ALLEGRO_TIMEOUT_UNIX; +struct ALLEGRO_TIMEOUT_UNIX +{ + struct timespec abstime; +}; + + +AL_INLINE(bool, _al_get_thread_should_stop, (struct _AL_THREAD *t), +{ + bool ret; + pthread_mutex_lock(&t->mutex); + ret = t->should_stop; + pthread_mutex_unlock(&t->mutex); + return ret; +}) + + +AL_FUNC(void, _al_mutex_init, (struct _AL_MUTEX*)); +AL_FUNC(void, _al_mutex_destroy, (struct _AL_MUTEX*)); +AL_INLINE(void, _al_mutex_lock, (struct _AL_MUTEX *m), +{ + if (m->inited) + pthread_mutex_lock(&m->mutex); +}) +AL_INLINE(void, _al_mutex_unlock, (struct _AL_MUTEX *m), +{ + if (m->inited) + pthread_mutex_unlock(&m->mutex); +}) + +AL_INLINE(void, _al_cond_init, (struct _AL_COND *cond), +{ + pthread_cond_init(&cond->cond, NULL); +}) + +AL_INLINE(void, _al_cond_destroy, (struct _AL_COND *cond), +{ + pthread_cond_destroy(&cond->cond); +}) + +AL_INLINE(void, _al_cond_wait, (struct _AL_COND *cond, struct _AL_MUTEX *mutex), +{ + pthread_cond_wait(&cond->cond, &mutex->mutex); +}) + +AL_INLINE(void, _al_cond_broadcast, (struct _AL_COND *cond), +{ + pthread_cond_broadcast(&cond->cond); +}) + +AL_INLINE(void, _al_cond_signal, (struct _AL_COND *cond), +{ + pthread_cond_signal(&cond->cond); +}) + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwin.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwin.h new file mode 100644 index 0000000..ea688a3 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwin.h @@ -0,0 +1,209 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Some definitions for internal use by the Windows library code. + * + * By Stefan Schimanski. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_aintwin_h +#define __al_included_allegro5_aintwin_h + +#ifndef __al_included_allegro5_allegro_h + #error must include allegro.h first +#endif + +#ifndef ALLEGRO_WINDOWS + #error bad include +#endif + + +#include "allegro5/platform/aintwthr.h" +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_system.h" +#include "allegro5/system.h" + + +#define WINDOWS_RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) + + +#ifdef __cplusplus + extern "C" { +#endif + + +typedef struct ALLEGRO_DISPLAY_WIN ALLEGRO_DISPLAY_WIN; + +struct ALLEGRO_DISPLAY_WIN +{ + ALLEGRO_DISPLAY display; + + HWND window; + HCURSOR mouse_selected_hcursor; + bool mouse_cursor_shown; + + UINT adapter; + + /* + * The display thread must communicate with the main thread + * through these variables. + */ + volatile bool end_thread; /* The display thread should end */ + volatile bool thread_ended; /* The display thread has ended */ + + /* For internal use by drivers, when this has been set to true + * after al_resize_display called you can call acknowledge_resize + */ + bool can_acknowledge; + + /* For internal use by the windows driver. When this is set and a Windows + * window resize event is received by the window procedure, the event is + * ignored and this value is set to false. + */ + bool ignore_resize; + + /* Size to reset to when al_set_display_flag(FULLSCREEN_WINDOW, false) + * is called. + */ + int toggle_w; + int toggle_h; +}; + + +/* standard path */ +ALLEGRO_PATH *_al_win_get_path(int id); + +/* thread routines */ +void _al_win_thread_init(void); +void _al_win_thread_exit(void); + +/* input routines */ +void _al_win_grab_input(ALLEGRO_DISPLAY_WIN *win_disp); + +/* keyboard routines */ +void _al_win_kbd_handle_key_press(int scode, int vcode, bool extended, + bool repeated, ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_kbd_handle_key_release(int scode, int vcode, bool extended, + ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_fix_modifiers(void); + +/* mouse routines */ +void _al_win_mouse_handle_move(int x, int y, bool abs, ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_mouse_handle_wheel(int d, bool abs, ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_mouse_handle_hwheel(int d, bool abs, ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_mouse_handle_button(int button, bool down, int x, int y, bool abs, ALLEGRO_DISPLAY_WIN *win_disp); +void _al_win_mouse_handle_leave(ALLEGRO_DISPLAY_WIN *win_display); +void _al_win_mouse_handle_enter(ALLEGRO_DISPLAY_WIN *win_display); + +/* joystick routines */ +void _al_win_joystick_dinput_unacquire(void *unused); +void _al_win_joystick_dinput_grab(void *ALLEGRO_DISPLAY_WIN); + +/* custom Allegro messages */ +extern UINT _al_win_msg_call_proc; +extern UINT _al_win_msg_suicide; + +/* main window routines */ +AL_FUNC(void, _al_win_wnd_schedule_proc, (HWND wnd, void (*proc)(void*), void *param)); +AL_FUNC(void, _al_win_wnd_call_proc, (HWND wnd, void (*proc)(void*), void *param)); + +int _al_win_determine_adapter(void); + +extern bool _al_win_disable_screensaver; + +/* dynamic library loading */ +HMODULE _al_win_safe_load_library(const char *filename); + +/* time */ +void _al_win_init_time(void); +void _al_win_shutdown_time(void); + +/* This is used to stop MinGW from complaining about type-punning */ +#define MAKE_UNION(ptr, t) \ + union { \ + LPVOID *v; \ + t p; \ + } u; \ + u.p = (ptr); + +typedef struct ALLEGRO_SYSTEM_WIN ALLEGRO_SYSTEM_WIN; +/* This is our version of ALLEGRO_SYSTEM with driver specific extra data. */ +struct ALLEGRO_SYSTEM_WIN +{ + ALLEGRO_SYSTEM system; /* This must be the first member, we "derive" from it. */ + ALLEGRO_DISPLAY *mouse_grab_display; /* May be inaccurate. */ + int toggle_mouse_grab_keycode; /* Disabled if zero. */ + unsigned int toggle_mouse_grab_modifiers; +}; + +/* helpers to create windows */ +HWND _al_win_create_window(ALLEGRO_DISPLAY *display, int width, int height, int flags); +HWND _al_win_create_faux_fullscreen_window(LPCTSTR devname, ALLEGRO_DISPLAY *display, + int x1, int y1, int width, int height, + int refresh_rate, int flags); +int _al_win_init_window(void); +HWND _al_win_create_hidden_window(void); + +/* icon helpers */ +void _al_win_set_display_icons(ALLEGRO_DISPLAY *display, int num_icons, ALLEGRO_BITMAP *bitmap[]); +HICON _al_win_create_icon(HWND wnd, ALLEGRO_BITMAP *sprite, int xfocus, int yfocus, bool is_cursor, bool resize); + +/* window decorations */ +void _al_win_set_window_position(HWND window, int x, int y); +void _al_win_get_window_position(HWND window, int *x, int *y); +void _al_win_set_window_frameless(ALLEGRO_DISPLAY *display, HWND window, bool frameless); +bool _al_win_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff); +void _al_win_set_window_title(ALLEGRO_DISPLAY *display, const char *title); + +/* cursor routines */ +typedef struct ALLEGRO_MOUSE_CURSOR_WIN ALLEGRO_MOUSE_CURSOR_WIN; +struct ALLEGRO_MOUSE_CURSOR_WIN +{ + HCURSOR hcursor; +}; + +ALLEGRO_MOUSE_CURSOR* _al_win_create_mouse_cursor(ALLEGRO_BITMAP *sprite, int xfocus, int yfocus); +void _al_win_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *cursor); +bool _al_win_set_mouse_cursor(ALLEGRO_DISPLAY *display, ALLEGRO_MOUSE_CURSOR *cursor); +bool _al_win_set_system_mouse_cursor(ALLEGRO_DISPLAY *display, ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id); +bool _al_win_show_mouse_cursor(ALLEGRO_DISPLAY *display); +bool _al_win_hide_mouse_cursor(ALLEGRO_DISPLAY *display); + + +/* driver specific functions */ + +#if defined ALLEGRO_CFG_D3D + ALLEGRO_DISPLAY_INTERFACE* _al_display_d3d_driver(void); + int _al_d3d_get_num_display_modes(int format, int refresh_rate, int flags); + ALLEGRO_DISPLAY_MODE* _al_d3d_get_display_mode(int index, int format, + int refresh_rate, int flags, + ALLEGRO_DISPLAY_MODE *mode); + bool _al_d3d_init_display(void); +#endif /* defined ALLEGRO_CFG_D3D */ + +#if defined ALLEGRO_CFG_OPENGL + ALLEGRO_DISPLAY_INTERFACE *_al_display_wgl_driver(void); + int _al_wgl_get_num_display_modes(int format, int refresh_rate, int flags); + ALLEGRO_DISPLAY_MODE* _al_wgl_get_display_mode(int index, int format, + int refresh_rate, int flags, + ALLEGRO_DISPLAY_MODE *mode); + bool _al_wgl_init_display(void); +#endif /* defined ALLEGRO_CFG_OPENGL */ + + +#ifdef __cplusplus + } +#endif + + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwiz.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwiz.h new file mode 100644 index 0000000..b48a1a9 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwiz.h @@ -0,0 +1,16 @@ +#ifndef __al_included_allegro5_aintwiz_h +#define __al_included_allegro5_aintwiz_h + +#include "allegro5/internal/aintern_display.h" +#include "allegro5/internal/aintern_bitmap.h" +#include "allegro5/internal/aintern_system.h" +#include "allegro5/system.h" +#include "allegro5/platform/aintunix.h" + +ALLEGRO_DISPLAY_INTERFACE *_al_display_gp2xwiz_opengl_driver(void); +ALLEGRO_DISPLAY_INTERFACE *_al_display_gp2xwiz_framebuffer_driver(void); +ALLEGRO_SYSTEM_INTERFACE *_al_system_gp2xwiz_driver(void); +ALLEGRO_BITMAP_INTERFACE *_al_bitmap_gp2xwiz_driver(void); + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwthr.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwthr.h new file mode 100644 index 0000000..cbe88c0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintwthr.h @@ -0,0 +1,75 @@ +/* + * Windows threads + */ +#ifndef __al_included_allegro5_aintwthr_h +#define __al_included_allegro5_aintwthr_h + +#include + +#ifdef __cplusplus + extern "C" { +#endif + + +/* threads */ +struct _AL_THREAD +{ + /* private: */ + HANDLE thread; + CRITICAL_SECTION cs; + bool should_stop; /* XXX: use a dedicated terminate Event object? */ + void (*proc)(struct _AL_THREAD *self, void *arg); + void *arg; +}; + +struct _AL_MUTEX +{ + PCRITICAL_SECTION cs; +}; + +#define _AL_MUTEX_UNINITED { NULL } +#define _AL_MARK_MUTEX_UNINITED(M) do { M.cs = NULL; } while (0) + +struct _AL_COND +{ + long nWaitersBlocked; + long nWaitersGone; + long nWaitersToUnblock; + HANDLE semBlockQueue; + CRITICAL_SECTION semBlockLock; + CRITICAL_SECTION mtxUnblockLock; +}; + +typedef struct ALLEGRO_TIMEOUT_WIN ALLEGRO_TIMEOUT_WIN; +struct ALLEGRO_TIMEOUT_WIN +{ + DWORD abstime; +}; + + +AL_INLINE(bool, _al_get_thread_should_stop, (struct _AL_THREAD *t), +{ + bool ret; + EnterCriticalSection(&t->cs); + ret = t->should_stop; + LeaveCriticalSection(&t->cs); + return ret; +}) + +AL_INLINE(void, _al_mutex_lock, (struct _AL_MUTEX *m), +{ + if (m->cs) + EnterCriticalSection(m->cs); +}) +AL_INLINE(void, _al_mutex_unlock, (struct _AL_MUTEX *m), +{ + if (m->cs) + LeaveCriticalSection(m->cs); +}) + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintxglx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintxglx.h new file mode 100644 index 0000000..6a52845 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aintxglx.h @@ -0,0 +1,7 @@ +#ifndef __al_included_allegro5_aintxglx_h +#define __al_included_allegro5_aintxglx_h + +ALLEGRO_DISPLAY_INTERFACE *_al_display_xglx_driver(void); +ALLEGRO_SYSTEM_INTERFACE *_al_system_xglx_driver(void); + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/albcc32.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/albcc32.h new file mode 100644 index 0000000..102eec8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/albcc32.h @@ -0,0 +1,98 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with Borland C++Builder. + * + * By Greg Hackmann. + * + * See readme.txt for copyright information. + */ + + +/* +#ifdef ALLEGRO_SRC + #error Currently BCC32 cannot build the library +#endif +*/ + + +#include +#include +#include +#include + + +#pragma warn -8004 /* unused assigned value */ +#pragma warn -8008 /* condition always met */ +#pragma warn -8057 /* unused parameter */ +#pragma warn -8066 /* unreachable code */ + + +/* describe this platform */ +#define ALLEGRO_PLATFORM_STR "BCC32" +#define ALLEGRO_WINDOWS +#define ALLEGRO_I386 +#define ALLEGRO_LITTLE_ENDIAN +#define ALLEGRO_GUESS_INTTYPES_OK + /* TODO: check if BCC has inttypes.h and/or stdint.h */ + +#ifdef ALLEGRO_USE_CONSOLE + #define ALLEGRO_NO_MAGIC_MAIN +#endif + + +/* describe how function prototypes look to BCC32 */ +#if (defined ALLEGRO_STATICLINK) + #define _AL_DLL +#elif (defined ALLEGRO_SRC) + #define _AL_DLL __declspec(dllexport) +#else + #define _AL_DLL __declspec(dllimport) +#endif + +#define AL_VAR(type, name) extern _AL_DLL type name +#define AL_ARRAY(type, name) extern _AL_DLL type name[] +#define AL_FUNC(type, name, args) extern _AL_DLL type name args +#define AL_METHOD(type, name, args) type (*name) args +#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args + + +#define END_OF_INLINE(name) +//#define AL_INLINE(type, name, args, code) extern __inline type name args code END_OF_INLINE(name) + +#define INLINE __inline + +#undef AL_INLINE +#undef AL_INLINE_STATIC + +#define AL_INLINE(type, name, args, code) extern __inline type __cdecl name args code END_OF_INLINE(name) +#define AL_INLINE_STATIC(type, name, args, code) static __inline type name args code END_OF_INLINE(name) + +#define LONG_LONG __int64 +#define int64_t signed __int64 +#define uint64_t unsigned __int64 + +#define __func__ "FIXME" + +#define _wfindfirst __wfindfirst +#define _wfindnext __wfindnext + +#define WinMain _main + +/* windows specific defines */ +#ifdef NONAMELESSUNION + #undef NONAMELESSUNION +#endif +/* This fixes 99.999999% of Borland C++Builder's problems with structs. */ + +/* arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aldmc.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aldmc.h new file mode 100644 index 0000000..2063ad7 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aldmc.h @@ -0,0 +1,85 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with Digital Mars C compiler. + * + * By Matthew Leverton. + * + * See readme.txt for copyright information. + */ + + +#include +#include + +#include + + +/* a static auto config */ +#define ALLEGRO_HAVE_INTTYPES_H +#define ALLEGRO_HAVE_STDINT_H + +#define LONG_LONG long long + +/* describe this platform */ +#ifdef ALLEGRO_STATICLINK + #define ALLEGRO_PLATFORM_STR "DMC.s" +#else + #define ALLEGRO_PLATFORM_STR "DMC" +#endif + +#define ALLEGRO_WINDOWS +#define ALLEGRO_I386 +#define ALLEGRO_LITTLE_ENDIAN + +#ifdef ALLEGRO_USE_CONSOLE + #define ALLEGRO_NO_MAGIC_MAIN +#endif + + +/* describe how function prototypes look to DMC */ +#if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC) + #define _AL_DLL +#else + #define _AL_DLL __declspec(dllimport) +#endif + +#define AL_VAR(type, name) extern _AL_DLL type name +#define AL_ARRAY(type, name) extern _AL_DLL type name[] +#define AL_FUNC(type, name, args) extern type name args +#define AL_METHOD(type, name, args) type (*name) args +#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args + + +/* Windows specific defines */ + +#if (defined ALLEGRO_SRC) + +#if (!defined S_IRUSR) + #define S_IRUSR S_IREAD + #define S_IWUSR S_IWRITE +#endif + +typedef unsigned long _fsize_t; + +struct _wfinddata_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + _fsize_t size; + wchar_t name[260]; /* may include spaces. */ +}; + +#endif /* ALLEGRO_SRC */ + +/* arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphone.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphone.h new file mode 100644 index 0000000..228c07e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphone.h @@ -0,0 +1,11 @@ +#ifndef ALLEGRO_IPHONE + #error bad include +#endif + +#ifndef ALLEGRO_LIB_BUILD +#define ALLEGRO_MAGIC_MAIN +#define main _al_mangled_main +#ifdef __cplusplus + extern "C" int _al_mangled_main(int, char **); +#endif +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphonecfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphonecfg.h new file mode 100644 index 0000000..a4739ac --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/aliphonecfg.h @@ -0,0 +1,33 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use on iOS. + * + * See readme.txt for copyright information. + */ + + +#include +#include + +/* Describe this platform. */ +#define ALLEGRO_PLATFORM_STR "IPHONE" + +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/aliphone.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintiphone.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h" + +#define ALLEGRO_EXCLUDE_GLX + +#ifndef AL_INLINE +#define AL_INLINE(type, name, args, code) \ +static __inline__ type name args; \ +static __inline__ type name args code +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almngw32.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almngw32.h new file mode 100644 index 0000000..cfda24f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almngw32.h @@ -0,0 +1,84 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with Mingw32. + * + * By Michael Rickmann. + * + * Native build version by Henrik Stokseth. + * + * See readme.txt for copyright information. + */ + + +#include +#include +#include +#include + +#include "allegro5/platform/alplatf.h" + + +/* describe this platform */ +#ifdef ALLEGRO_STATICLINK + #define ALLEGRO_PLATFORM_STR "MinGW32.s" +#else + #define ALLEGRO_PLATFORM_STR "MinGW32" +#endif + +#define ALLEGRO_WINDOWS +#define ALLEGRO_I386 +#define ALLEGRO_LITTLE_ENDIAN + +#ifdef ALLEGRO_USE_CONSOLE + #define ALLEGRO_NO_MAGIC_MAIN +#endif + + +/* describe how function prototypes look to MINGW32 */ +#if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC) + #define _AL_DLL +#else + #define _AL_DLL __declspec(dllimport) +#endif + +#define AL_VAR(type, name) extern _AL_DLL type name +#define AL_ARRAY(type, name) extern _AL_DLL type name[] +#define AL_FUNC(type, name, args) extern type name args +#define AL_METHOD(type, name, args) type (*name) args +#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args + + +/* windows specific defines */ + +#if (defined ALLEGRO_SRC) +/* pathches to handle DX7 headers on a win9x system */ + +/* should WINNT be defined on win9x systems? */ +#ifdef WINNT + #undef WINNT +#endif + +/* defined in windef.h */ +#ifndef HMONITOR_DECLARED + #define HMONITOR_DECLARED 1 +#endif + +#endif /* ALLEGRO_SRC */ + +/* another instance of missing constants in the mingw32 headers */ +#ifndef ENUM_CURRENT_SETTINGS + #define ENUM_CURRENT_SETTINGS ((DWORD)-1) +#endif + +/* arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almsvc.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almsvc.h new file mode 100644 index 0000000..906a95f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/almsvc.h @@ -0,0 +1,107 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with MSVC. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#include +#include +#include +#include + +#include "allegro5/platform/alplatf.h" + +#pragma warning (disable: 4200 4244 4305 4800) + + +/* describe this platform */ +#ifdef ALLEGRO_STATICLINK + #define ALLEGRO_PLATFORM_STR "MSVC.s" +#else + #define ALLEGRO_PLATFORM_STR "MSVC" +#endif + +#define ALLEGRO_WINDOWS +#define ALLEGRO_I386 +#define ALLEGRO_LITTLE_ENDIAN +#define ALLEGRO_GUESS_INTTYPES_OK + +#ifdef ALLEGRO_USE_CONSOLE + #define ALLEGRO_NO_MAGIC_MAIN +#endif + + +/* describe how function prototypes look to MSVC */ +#ifndef ALLEGRO_STATICLINK + #ifdef ALLEGRO_SRC + #define _AL_DLL __declspec(dllexport) + #else + #define _AL_DLL __declspec(dllimport) + #endif +#else + #define _AL_DLL +#endif + +#define AL_VAR(type, name) extern _AL_DLL type name +#define AL_ARRAY(type, name) extern _AL_DLL type name[] +#define AL_FUNC(type, name, args) _AL_DLL type __cdecl name args +#define AL_METHOD(type, name, args) type (__cdecl *name) args +#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (__cdecl *name) args + +#ifdef AL_INLINE + #define END_OF_INLINE(name) void *_force_instantiate_##name = name; +#else + #define END_OF_INLINE(name) +#endif + +#undef AL_INLINE +#undef AL_INLINE_STATIC + +#define AL_INLINE(type, name, args, code) __inline _AL_DLL type __cdecl name args code END_OF_INLINE(name) +#define AL_INLINE_STATIC(type, name, args, code) __inline type __cdecl name args code END_OF_INLINE(name) + +#define INLINE __inline + +#define LONG_LONG __int64 + +/* VC10 is the first version to define int64_t and uint64_t */ +#if _MSC_VER < 1600 +#define int64_t signed __int64 +#define uint64_t unsigned __int64 +#endif + +/* __func__ is C99 */ +#ifndef __func__ + /* MSVC versions before VC7 don't have __FUNCTION__ */ + #if _MSC_VER < 1300 + #define __func__ "???" + #else + #define __func__ __FUNCTION__ + #endif +#endif + + +/* life would be so easy if compilers would all use the same names! */ +#if (!defined S_IRUSR) + #define S_IRUSR S_IREAD + #define S_IWUSR S_IWRITE + #define S_IXUSR S_IEXEC +#endif + + +/* arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosx.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosx.h new file mode 100644 index 0000000..c8cf708 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosx.h @@ -0,0 +1,77 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * MacOS X specific header defines. + * + * By Angelo Mottola. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_alosx_h +#define __al_included_allegro5_alosx_h + +#ifndef ALLEGRO_MACOSX + #error bad include +#endif + + + +#include +#include +#include +#include +#include +#include +#if defined __OBJC__ && defined ALLEGRO_SRC + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import +#endif + +ALLEGRO_PATH *_al_osx_get_path(int id); + +#ifndef ALLEGRO_LIB_BUILD + #ifndef ALLEGRO_NO_MAGIC_MAIN + #define ALLEGRO_MAGIC_MAIN + #if __GNUC__ >= 4 + #define main __attribute__ ((visibility("default"))) _al_mangled_main + #else + #define main _al_mangled_main + #endif + #ifdef __cplusplus + extern "C" int _al_mangled_main(int, char **); + #endif + #endif +#endif + +/* Keyboard driver */ +#define KEYBOARD_MACOSX AL_ID('O','S','X','K') + +#endif + +/* Local variables: */ +/* mode: objc */ +/* c-basic-offset: 3 */ +/* indent-tabs-mode: nil */ +/* End: */ +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosxcfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosxcfg.h new file mode 100644 index 0000000..830cf11 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alosxcfg.h @@ -0,0 +1,36 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with MacOS X. + * + * By Angelo Mottola. + * + * See readme.txt for copyright information. + */ + + +#ifndef __al_included_allegro5_alosxcfg_h +#define __al_included_allegro5_alosxcfg_h + +/* Include configuration information. */ +#include "allegro5/platform/alplatf.h" + +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h" + +/* Describe this platform */ +#define ALLEGRO_PLATFORM_STR "MacOS X" + + +/* Arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alosx.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintosx.h" + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alplatf.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alplatf.h new file mode 100644 index 0000000..13b7208 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alplatf.h @@ -0,0 +1,198 @@ +/* alplatf.h is generated from alplatf.h.cmake */ +#define ALLEGRO_MINGW32 +/* #undef ALLEGRO_UNIX */ +/* #undef ALLEGRO_MSVC */ +#define ALLEGRO_CFG_D3D +/* #undef ALLEGRO_CFG_D3D9EX */ +#define ALLEGRO_CFG_OPENGL +/* #undef ALLEGRO_MACOSX */ +/* #undef ALLEGRO_BCC32 */ +/* #undef ALLEGRO_GP2XWIZ */ +/* #undef ALLEGRO_IPHONE */ +/* #undef ALLEGRO_ANDROID */ +/* #undef ALLEGRO_RASPBERRYPI */ +#define ALLEGRO_CFG_ALLOW_SSE +#define ALLEGRO_NO_ASM +/* #undef ALLEGRO_CFG_NO_FPU */ +/* #undef ALLEGRO_CFG_DLL_TLS */ +/* #undef ALLEGRO_CFG_PTHREADS_TLS */ +#define ALLEGRO_CFG_RELEASE_LOGGING + +/* #undef ALLEGRO_CFG_GLSL_SHADERS */ +/* #undef ALLEGRO_CFG_HLSL_SHADERS */ +/* #undef ALLEGRO_CFG_CG_SHADERS */ + +/* #undef ALLEGRO_CFG_OPENGLES */ +/* #undef ALLEGRO_CFG_NO_GLES2 */ +/* #undef ALLEGRO_CFG_ANDROID_LEGACY */ + +#ifdef ALLEGRO_ANDROID +#define ALLEGRO_CFG_ANDROID_APP_NAME ${ANDROID_APP_NAME} +#define ALLEGRO_CFG_ANDROID_APP_NAME_SLASH "${ANDROID_APP_NAME_SLASH}" +#endif + +/*---------------------------------------------------------------------------*/ + +/* TODO: rename this */ +#define RETSIGTYPE void + +/* This is defined on the command-line in the autotools build. */ +#define ALLEGRO_MODULES_PATH + +/*---------------------------------------------------------------------------*/ + +/* Define to 1 if you have the corresponding header file. */ +#define ALLEGRO_HAVE_DIRENT_H +#define ALLEGRO_HAVE_INTTYPES_H +/* #undef ALLEGRO_HAVE_LINUX_AWE_VOICE_H */ +/* #undef ALLEGRO_HAVE_LINUX_INPUT_H */ +/* #undef ALLEGRO_HAVE_LINUX_JOYSTICK_H */ +/* #undef ALLEGRO_HAVE_LINUX_SOUNDCARD_H */ +/* #undef ALLEGRO_HAVE_MACHINE_SOUNDCARD_H */ +/* #undef ALLEGRO_HAVE_SOUNDCARD_H */ +#define ALLEGRO_HAVE_STDBOOL_H +#define ALLEGRO_HAVE_STDINT_H +/* #undef ALLEGRO_HAVE_SV_PROCFS_H */ +/* #undef ALLEGRO_HAVE_SYS_IO_H */ +/* #undef ALLEGRO_HAVE_SYS_SOUNDCARD_H */ +#define ALLEGRO_HAVE_SYS_STAT_H +#define ALLEGRO_HAVE_SYS_TIME_H +#define ALLEGRO_HAVE_TIME_H +/* #undef ALLEGRO_HAVE_SYS_UTSNAME_H */ +#define ALLEGRO_HAVE_SYS_TYPES_H +/* #undef ALLEGRO_HAVE_OSATOMIC_H */ +/* #undef ALLEGRO_HAVE_SYS_INOTIFY_H */ +/* #undef ALLEGRO_HAVE_SYS_TIMERFD_H */ + +/* Define to 1 if the corresponding functions are available. */ +/* #undef ALLEGRO_HAVE_GETEXECNAME */ +/* #undef ALLEGRO_HAVE_MKSTEMP */ +/* #undef ALLEGRO_HAVE_MMAP */ +#define ALLEGRO_HAVE_MPROTECT +/* #undef ALLEGRO_HAVE_SCHED_YIELD */ +/* #undef ALLEGRO_HAVE_SYSCONF */ +/* #undef ALLEGRO_HAVE_FSEEKO */ +/* #undef ALLEGRO_HAVE_FTELLO */ +#define ALLEGRO_HAVE_VA_COPY + +/* Define to 1 if procfs reveals argc and argv */ +/* #undef ALLEGRO_HAVE_PROCFS_ARGCV */ + +/*---------------------------------------------------------------------------*/ + +/* Define if target machine is little endian. */ +#define ALLEGRO_LITTLE_ENDIAN + +/* Define if target machine is big endian. */ +/* #undef ALLEGRO_BIG_ENDIAN */ + +/* Define for Unix platforms, to use C convention for bank switching. */ +#define ALLEGRO_NO_ASM + +/* Define if compiler prepends underscore to symbols. */ +/* #undef ALLEGRO_ASM_PREFIX */ + +/* Define if assembler supports MMX. */ +/* #undef ALLEGRO_MMX */ + +/* Define if assembler supports SSE. */ +/* #undef ALLEGRO_SSE */ + +/* Define if target platform is Darwin. */ +/* #undef ALLEGRO_DARWIN */ + +/* Define if you have the pthread library. */ +/* #undef ALLEGRO_HAVE_LIBPTHREAD */ + +/* Define if constructor attribute is supported. */ +#define ALLEGRO_USE_CONSTRUCTOR + +/* Define if dynamically loaded modules are supported. */ +/* #undef ALLEGRO_WITH_MODULES */ + +/*---------------------------------------------------------------------------*/ + +/* Define if you need support for X-Windows. */ +/* #undef ALLEGRO_WITH_XWINDOWS */ + +/* Define if MIT-SHM extension is supported. */ +/* #undef ALLEGRO_XWINDOWS_WITH_SHM */ + +/* Define if XCursor ARGB extension is available. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XCURSOR */ + +/* Define if DGA version 2.0 or newer is supported */ +/* #undef ALLEGRO_XWINDOWS_WITH_XF86DGA2 */ + +/* Define if XF86VidMode extension is supported. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE */ + +/* Define if Xinerama extension is supported. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XINERAMA */ + +/* Define if XRandR extension is supported. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XRANDR */ + +/* Define if XIM extension is supported. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XIM */ + +/* Define if xpm bitmap support is available. */ +/* #undef ALLEGRO_XWINDOWS_WITH_XPM */ + +/*---------------------------------------------------------------------------*/ + +/* Define if target platform is linux. */ +/* #undef ALLEGRO_LINUX */ + +/* Define to enable Linux console fbcon driver. */ +/* #undef ALLEGRO_LINUX_FBCON */ + +/* Define to enable Linux console SVGAlib driver. */ +/* #undef ALLEGRO_LINUX_SVGALIB */ + +/* Define if SVGAlib driver can check vga_version. */ +/* #undef ALLEGRO_LINUX_SVGALIB_HAVE_VGA_VERSION */ + +/* Define to enable Linux console VBE/AF driver. */ +/* #undef ALLEGRO_LINUX_VBEAF */ + +/* Define to enable Linux console VGA driver. */ +/* #undef ALLEGRO_LINUX_VGA */ + +/*---------------------------------------------------------------------------*/ + +/* Define to the installed ALSA version. */ +/* #undef ALLEGRO_ALSA_VERSION */ + +/* Define if ALSA DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_ALSADIGI */ + +/* Define if ALSA MIDI driver is supported. */ +/* #undef ALLEGRO_WITH_ALSAMIDI */ + +/* Define if aRts DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_ARTSDIGI */ + +/* Define if ESD DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_ESDDIGI */ + +/* Define if JACK DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_JACKDIGI */ + +/* Define if OSS DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_OSSDIGI */ + +/* Define if OSS MIDI driver is supported. */ +/* #undef ALLEGRO_WITH_OSSMIDI */ + +/* Define if SGI AL DIGI driver is supported. */ +/* #undef ALLEGRO_WITH_SGIALDIGI */ + +/*---------------------------------------------------------------------------*/ + +/* TODO: Define to (void *)-1, if MAP_FAILED is not defined. */ +/* TODO: rename this */ +/* # cmakedefine MAP_FAILED */ + +/*---------------------------------------------------------------------------*/ +/* vi: set ft=c ts=3 sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alucfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alucfg.h new file mode 100644 index 0000000..b9947c8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alucfg.h @@ -0,0 +1,40 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use on Unix platforms. + * + * By Michael Bukin. + * + * See readme.txt for copyright information. + */ + + +#include +#include + +/* Describe this platform. */ +#define ALLEGRO_PLATFORM_STR "Unix" + +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alunix.h" + +#ifdef _this_is_a_hack_to_fool_scons +#include "alunix.h" +#endif + +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintunix.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h" + +/* Include configuration information. */ +#include "allegro5/platform/alplatf.h" + +/* Enable OpenGL if GLX is available. */ +#ifdef ALLEGRO_GLX +#define ALLEGRO_CFG_OPENGL +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alunix.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alunix.h new file mode 100644 index 0000000..ae1b858 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alunix.h @@ -0,0 +1,23 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Unix-specific header defines. + * + * See readme.txt for copyright information. + */ + + +#ifndef ALLEGRO_UNIX + #error bad include +#endif + + +/* Nothing left */ + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwatcom.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwatcom.h new file mode 100644 index 0000000..2e5b0bc --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwatcom.h @@ -0,0 +1,182 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use with Watcom. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef __SW_3S + #error Allegro only supports stack based calling convention +#endif + +#ifndef __SW_S + #error Stack overflow checking must be disabled +#endif + +#include +#include +#include +#include +#include +#include + + +#pragma disable_message (120 201 202) + + +/* these are available in OpenWatcom 1.3 (12.3) */ +#if __WATCOMC__ >= 1230 + #define ALLEGRO_HAVE_INTTYPES_H 1 + #define ALLEGRO_HAVE_STDINT_H 1 +#else + #define ALLEGRO_GUESS_INTTYPES_OK +#endif + + +/* describe this platform */ +#define ALLEGRO_PLATFORM_STR "Watcom" +#define ALLEGRO_DOS +#define ALLEGRO_I386 +#define ALLEGRO_LITTLE_ENDIAN + +#define LONG_LONG long long +#ifdef ALLEGRO_GUESS_INTTYPES_OK + #define int64_t signed long long + #define uint64_t unsigned long long +#endif + + +/* emulate some important djgpp routines */ +#define inportb(port) inp(port) +#define inportw(port) inpw(port) +#define outportb(port, val) outp(port, val) +#define outportw(port, val) outpw(port, val) + +#define ffblk find_t +#define ff_name name +#define ff_attrib attrib +#define ff_fsize size +#define ff_ftime wr_time +#define ff_fdate wr_date + +#define findfirst(name, dta, attrib) _dos_findfirst(name, attrib, dta) +#define findnext(dta) _dos_findnext(dta) + +#define random() rand() +#define srandom(n) srand(n) + +#define _dos_ds _default_ds() + +#define dosmemget(offset, length, buffer) memcpy(buffer, (void *)(offset), length) +#define dosmemput(buffer, length, offset) memcpy((void *)(offset), buffer, length) + +#define __djgpp_nearptr_enable() 1 +#define __djgpp_nearptr_disable() + +#define __djgpp_base_address 0 +#define __djgpp_conventional_base 0 + +#define _crt0_startup_flags 1 +#define _CRT0_FLAG_NEARPTR 1 + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef union __dpmi_regs +{ + struct { + unsigned long edi, esi, ebp, res, ebx, edx, ecx, eax; + } d; + struct { + unsigned short di, di_hi, si, si_hi, bp, bp_hi, res, res_hi; + unsigned short bx, bx_hi, dx, dx_hi, cx, cx_hi, ax, ax_hi; + unsigned short flags, es, ds, fs, gs, ip, cs, sp, ss; + } x; + struct { + unsigned char edi[4], esi[4], ebp[4], res[4]; + unsigned char bl, bh, ebx_b2, ebx_b3, dl, dh, edx_b2, edx_b3; + unsigned char cl, ch, ecx_b2, ecx_b3, al, ah, eax_b2, eax_b3; + } h; +} __dpmi_regs; + + +typedef struct __dpmi_meminfo +{ + unsigned long handle; + unsigned long size; + unsigned long address; +} __dpmi_meminfo; + + +typedef struct __dpmi_free_mem_info +{ + unsigned long largest_available_free_block_in_bytes; + unsigned long maximum_unlocked_page_allocation_in_pages; + unsigned long maximum_locked_page_allocation_in_pages; + unsigned long linear_address_space_size_in_pages; + unsigned long total_number_of_unlocked_pages; + unsigned long total_number_of_free_pages; + unsigned long total_number_of_physical_pages; + unsigned long free_linear_address_space_in_pages; + unsigned long size_of_paging_file_partition_in_pages; + unsigned long reserved[3]; +} __dpmi_free_mem_info; + + +extern unsigned long __tb; + + +int __dpmi_int(int vector, __dpmi_regs *regs); +int __dpmi_allocate_dos_memory(int paragraphs, int *ret); +int __dpmi_free_dos_memory(int selector); +int __dpmi_physical_address_mapping(__dpmi_meminfo *info); +int __dpmi_free_physical_address_mapping(__dpmi_meminfo *info); +int __dpmi_lock_linear_region(__dpmi_meminfo *info); +int __dpmi_unlock_linear_region(__dpmi_meminfo *info); +int __dpmi_allocate_ldt_descriptors(int count); +int __dpmi_free_ldt_descriptor(int descriptor); +int __dpmi_get_segment_base_address(int selector, unsigned long *addr); +int __dpmi_set_segment_base_address(int selector, unsigned long address); +int __dpmi_set_segment_limit(int selector, unsigned long limit); +int __dpmi_get_free_memory_information(__dpmi_free_mem_info *info); +int __dpmi_simulate_real_mode_interrupt(int vector, __dpmi_regs *regs); +int __dpmi_simulate_real_mode_procedure_retf(__dpmi_regs *regs); +int _go32_dpmi_lock_data(void *lockaddr, unsigned long locksize); +int _go32_dpmi_lock_code(void *lockaddr, unsigned long locksize); + +long _allocate_real_mode_callback(void (*handler)(__dpmi_regs *r), __dpmi_regs *regs); + + +/* memory locking macros */ +void _unlock_dpmi_data(void *addr, int size); + +#ifdef __cplusplus +} +#endif + + +#define END_OF_FUNCTION(x) void x##_end(void) { } +#define END_OF_STATIC_FUNCTION(x) static void x##_end(void) { } +#define LOCK_DATA(d, s) _go32_dpmi_lock_data(d, s) +#define LOCK_CODE(c, s) _go32_dpmi_lock_code(c, s) +#define UNLOCK_DATA(d,s) _unlock_dpmi_data(d, s) +#define LOCK_VARIABLE(x) LOCK_DATA((void *)&x, sizeof(x)) +#define LOCK_FUNCTION(x) LOCK_CODE((void *)FP_OFF(x), (long)FP_OFF(x##_end) - (long)FP_OFF(x)) + + +/* arrange for other headers to be included later on */ +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/aldos.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintdos.h" diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwin.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwin.h new file mode 100644 index 0000000..3a3ae33 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwin.h @@ -0,0 +1,58 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Windows-specific header defines. + * + * By Shawn Hargreaves. + * + * See readme.txt for copyright information. + */ + + +#ifndef ALLEGRO_WINDOWS + #error bad include +#endif + +#include + +/*******************************************/ +/********** magic main emulation ***********/ +/*******************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +AL_FUNC(int, _WinMain, (void *_main, void *hInst, void *hPrev, char *Cmd, int nShow)); + +#ifdef __cplusplus +} +#endif + + +/* The following is due to torhu from A.cc (see + * http://www.allegro.cc/forums/thread/596872/756993#target) + */ +#ifndef ALLEGRO_NO_MAGIC_MAIN + #if defined _MSC_VER && !defined ALLEGRO_LIB_BUILD + #pragma comment(linker,"/ENTRY:mainCRTStartup") + #endif +#endif + + +/*******************************************/ +/************ joystick drivers *************/ +/*******************************************/ +#define AL_JOY_TYPE_DIRECTX AL_ID('D','X',' ',' ') + +AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_directx); + +#define _AL_JOYSTICK_DRIVER_DIRECTX \ + { AL_JOY_TYPE_DIRECTX, &_al_joydrv_directx, true }, + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwiz.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwiz.h new file mode 100644 index 0000000..9595b3f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwiz.h @@ -0,0 +1,32 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Wiz-specific header defines. + * + * By Trent Gamblin + * + * See readme.txt for copyright information. + */ + + +#ifndef ALLEGRO_GP2XWIZ + #error bad include +#endif + +#define AL_JOY_TYPE_GP2XWIZ AL_ID('W','I','Z',' ') + +AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_gp2xwiz); + +#define _AL_JOYSTICK_DRIVER_GP2XWIZ \ + { AL_JOY_TYPE_GP2XWIZ, &_al_joydrv_gp2xwiz, true }, + + +#include "allegro5/platform/alunix.h" + diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwizcfg.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwizcfg.h new file mode 100644 index 0000000..a8afe36 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/alwizcfg.h @@ -0,0 +1,33 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Configuration defines for use on GP2X Wiz + * + * By Trent Gamblin + * + * See readme.txt for copyright information. + */ + + +#include +#include + +/* Describe this platform. */ +#define ALLEGRO_PLATFORM_STR "GP2XWIZ" + +#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwiz.h" +#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwiz.h" +#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h" + +/* Include configuration information. */ +#include "allegro5/platform/alplatf.h" + +/* No GLX on the Wiz */ +#define ALLEGRO_EXCLUDE_GLX diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdbool.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdbool.h new file mode 100644 index 0000000..591f476 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdbool.h @@ -0,0 +1,35 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * A header file to get C99's stdbool.h. + * + * By Peter Wang. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_astdbool_h +#define __al_included_allegro5_astdbool_h + +#ifndef __cplusplus +# ifdef ALLEGRO_HAVE_STDBOOL_H +# include +# else +# ifndef ALLEGRO_HAVE__BOOL + typedef unsigned char _Bool; +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +# endif +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdint.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdint.h new file mode 100644 index 0000000..6db81de --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/platform/astdint.h @@ -0,0 +1,75 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * A header file to get definitions of uint*_t and int*_t. + * + * By Peter Wang. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_astdint_h +#define __al_included_allegro5_astdint_h + +/* Please only include this file from include/allegro5/internal/alconfig.h + * and don't add more than inttypes.h/stdint.h emulation here. Thanks. + */ + + + +#if defined ALLEGRO_HAVE_INTTYPES_H + #include +#elif defined ALLEGRO_HAVE_STDINT_H + #include +#elif defined ALLEGRO_I386 && defined ALLEGRO_LITTLE_ENDIAN + #ifndef ALLEGRO_GUESS_INTTYPES_OK + #warning Guessing the definitions of fixed-width integer types. + #endif + #define int8_t signed char + #define uint8_t unsigned char + #define int16_t signed short + #define uint16_t unsigned short + #define int32_t signed int + #define uint32_t unsigned int + + #ifdef ALLEGRO_WINDOWS + + #ifndef _INTPTR_T_DEFINED + #ifdef _WIN64 + #define intptr_t __int64 + #else + #define intptr_t int + #endif + #define _INTPTR_T_DEFINED + #endif + + #ifndef _UINTPTR_T_DEFINED + #ifdef _WIN64 + #define uintptr_t unsigned __int64 + #else + #define uintptr_t unsigned int + #endif + #define _UINTPTR_T_DEFINED + #endif + + #else + + #define intptr_t int32_t + #define uintptr_t uint32_t + + #endif + +#else + #error I dunno how to get the definitions of fixed-width integer types on your platform. Please report this to your friendly Allegro developer. +#endif + + + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/system.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/system.h new file mode 100644 index 0000000..da525ca --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/system.h @@ -0,0 +1,50 @@ +#ifndef __al_included_allegro5_system_h +#define __al_included_allegro5_system_h + +#include "allegro5/config.h" +#include "allegro5/path.h" + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct ALLEGRO_SYSTEM ALLEGRO_SYSTEM; + +/* Function: al_init + */ +#define al_init() (al_install_system(ALLEGRO_VERSION_INT, atexit)) + +AL_FUNC(bool, al_install_system, (int version, int (*atexit_ptr)(void (*)(void)))); +AL_FUNC(void, al_uninstall_system, (void)); +AL_FUNC(bool, al_is_system_installed, (void)); +AL_FUNC(ALLEGRO_SYSTEM *, al_get_system_driver, (void)); +AL_FUNC(ALLEGRO_CONFIG *, al_get_system_config, (void)); + +enum { + ALLEGRO_RESOURCES_PATH = 0, + ALLEGRO_TEMP_PATH, + ALLEGRO_USER_DATA_PATH, + ALLEGRO_USER_HOME_PATH, + ALLEGRO_USER_SETTINGS_PATH, + ALLEGRO_USER_DOCUMENTS_PATH, + ALLEGRO_EXENAME_PATH, + ALLEGRO_LAST_PATH /* must be last */ +}; + +AL_FUNC(ALLEGRO_PATH *, al_get_standard_path, (int id)); +AL_FUNC(void, al_set_exe_name, (char const *path)); + +AL_FUNC(void, al_set_org_name, (const char *org_name)); +AL_FUNC(void, al_set_app_name, (const char *app_name)); +AL_FUNC(const char *, al_get_org_name, (void)); +AL_FUNC(const char *, al_get_app_name, (void)); + +AL_FUNC(bool, al_inhibit_screensaver, (bool inhibit)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/threads.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/threads.h new file mode 100644 index 0000000..c0d127f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/threads.h @@ -0,0 +1,67 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Thread routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_threads_h +#define __al_included_allegro5_threads_h + +#include "allegro5/altime.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: ALLEGRO_THREAD + */ +typedef struct ALLEGRO_THREAD ALLEGRO_THREAD; + +/* Type: ALLEGRO_MUTEX + */ +typedef struct ALLEGRO_MUTEX ALLEGRO_MUTEX; + +/* Type: ALLEGRO_COND + */ +typedef struct ALLEGRO_COND ALLEGRO_COND; + + +AL_FUNC(ALLEGRO_THREAD *, al_create_thread, + (void *(*proc)(ALLEGRO_THREAD *thread, void *arg), void *arg)); +AL_FUNC(void, al_start_thread, (ALLEGRO_THREAD *outer)); +AL_FUNC(void, al_join_thread, (ALLEGRO_THREAD *outer, void **ret_value)); +AL_FUNC(void, al_set_thread_should_stop, (ALLEGRO_THREAD *outer)); +AL_FUNC(bool, al_get_thread_should_stop, (ALLEGRO_THREAD *outer)); +AL_FUNC(void, al_destroy_thread, (ALLEGRO_THREAD *thread)); +AL_FUNC(void, al_run_detached_thread, (void *(*proc)(void *arg), void *arg)); + +AL_FUNC(ALLEGRO_MUTEX *, al_create_mutex, (void)); +AL_FUNC(ALLEGRO_MUTEX *, al_create_mutex_recursive, (void)); +AL_FUNC(void, al_lock_mutex, (ALLEGRO_MUTEX *mutex)); +AL_FUNC(void, al_unlock_mutex, (ALLEGRO_MUTEX *mutex)); +AL_FUNC(void, al_destroy_mutex, (ALLEGRO_MUTEX *mutex)); + +AL_FUNC(ALLEGRO_COND *, al_create_cond, (void)); +AL_FUNC(void, al_destroy_cond, (ALLEGRO_COND *cond)); +AL_FUNC(void, al_wait_cond, (ALLEGRO_COND *cond, ALLEGRO_MUTEX *mutex)); +AL_FUNC(int, al_wait_cond_until, (ALLEGRO_COND *cond, ALLEGRO_MUTEX *mutex, + const ALLEGRO_TIMEOUT *timeout)); +AL_FUNC(void, al_broadcast_cond, (ALLEGRO_COND *cond)); +AL_FUNC(void, al_signal_cond, (ALLEGRO_COND *cond)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/timer.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/timer.h new file mode 100644 index 0000000..a33e9fb --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/timer.h @@ -0,0 +1,65 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Timer routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_timer_h +#define __al_included_allegro5_timer_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Function: ALLEGRO_USECS_TO_SECS + */ +#define ALLEGRO_USECS_TO_SECS(x) ((x) / 1000000.0) + +/* Function: ALLEGRO_MSECS_TO_SECS + */ +#define ALLEGRO_MSECS_TO_SECS(x) ((x) / 1000.0) + +/* Function: ALLEGRO_BPS_TO_SECS + */ +#define ALLEGRO_BPS_TO_SECS(x) (1.0 / (x)) + +/* Function: ALLEGRO_BPM_TO_SECS + */ +#define ALLEGRO_BPM_TO_SECS(x) (60.0 / (x)) + + +/* Type: ALLEGRO_TIMER + */ +typedef struct ALLEGRO_TIMER ALLEGRO_TIMER; + + +AL_FUNC(ALLEGRO_TIMER*, al_create_timer, (double speed_secs)); +AL_FUNC(void, al_destroy_timer, (ALLEGRO_TIMER *timer)); +AL_FUNC(void, al_start_timer, (ALLEGRO_TIMER *timer)); +AL_FUNC(void, al_stop_timer, (ALLEGRO_TIMER *timer)); +AL_FUNC(bool, al_get_timer_started, (const ALLEGRO_TIMER *timer)); +AL_FUNC(double, al_get_timer_speed, (const ALLEGRO_TIMER *timer)); +AL_FUNC(void, al_set_timer_speed, (ALLEGRO_TIMER *timer, double speed_secs)); +AL_FUNC(int64_t, al_get_timer_count, (const ALLEGRO_TIMER *timer)); +AL_FUNC(void, al_set_timer_count, (ALLEGRO_TIMER *timer, int64_t count)); +AL_FUNC(void, al_add_timer_count, (ALLEGRO_TIMER *timer, int64_t diff)); +AL_FUNC(ALLEGRO_EVENT_SOURCE *, al_get_timer_event_source, (ALLEGRO_TIMER *timer)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/tls.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/tls.h new file mode 100644 index 0000000..b6b4f08 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/tls.h @@ -0,0 +1,65 @@ +/* ______ ___ ___ + * /\ _ \ /\_ \ /\_ \ + * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___ + * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\ + * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \ + * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ + * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ + * /\____/ + * \_/__/ + * + * Thread local storage routines. + * + * See readme.txt for copyright information. + */ + +#ifndef __al_included_allegro5_tls_h +#define __al_included_allegro5_tls_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + + +/* Enum: ALLEGRO_STATE_FLAGS + */ +typedef enum ALLEGRO_STATE_FLAGS +{ + ALLEGRO_STATE_NEW_DISPLAY_PARAMETERS = 0x0001, + ALLEGRO_STATE_NEW_BITMAP_PARAMETERS = 0x0002, + ALLEGRO_STATE_DISPLAY = 0x0004, + ALLEGRO_STATE_TARGET_BITMAP = 0x0008, + ALLEGRO_STATE_BLENDER = 0x0010, + ALLEGRO_STATE_NEW_FILE_INTERFACE = 0x0020, + ALLEGRO_STATE_TRANSFORM = 0x0040, + + ALLEGRO_STATE_BITMAP = ALLEGRO_STATE_TARGET_BITMAP +\ + ALLEGRO_STATE_NEW_BITMAP_PARAMETERS, + + ALLEGRO_STATE_ALL = 0xffff + +} ALLEGRO_STATE_FLAGS; + + +/* Type: ALLEGRO_STATE + */ +typedef struct ALLEGRO_STATE ALLEGRO_STATE; + +struct ALLEGRO_STATE +{ + /* Internally, a thread_local_state structure is placed here. */ + char _tls[1024]; +}; + + +AL_FUNC(void, al_store_state, (ALLEGRO_STATE *state, int flags)); +AL_FUNC(void, al_restore_state, (ALLEGRO_STATE const *state)); + + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/transformations.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/transformations.h new file mode 100644 index 0000000..2cb431f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/transformations.h @@ -0,0 +1,36 @@ +#ifndef __al_included_allegro5_transformations_h +#define __al_included_allegro5_transformations_h + +#include "allegro5/display.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: ALLEGRO_TRANSFORM + */ +typedef struct ALLEGRO_TRANSFORM ALLEGRO_TRANSFORM; + +struct ALLEGRO_TRANSFORM { + float m[4][4]; +}; + +/* Transformations*/ +AL_FUNC(void, al_use_transform, (const ALLEGRO_TRANSFORM* trans)); +AL_FUNC(void, al_copy_transform, (ALLEGRO_TRANSFORM* dest, const ALLEGRO_TRANSFORM* src)); +AL_FUNC(void, al_identity_transform, (ALLEGRO_TRANSFORM* trans)); +AL_FUNC(void, al_build_transform, (ALLEGRO_TRANSFORM* trans, float x, float y, float sx, float sy, float theta)); +AL_FUNC(void, al_translate_transform, (ALLEGRO_TRANSFORM* trans, float x, float y)); +AL_FUNC(void, al_rotate_transform, (ALLEGRO_TRANSFORM* trans, float theta)); +AL_FUNC(void, al_scale_transform, (ALLEGRO_TRANSFORM* trans, float sx, float sy)); +AL_FUNC(void, al_transform_coordinates, (const ALLEGRO_TRANSFORM* trans, float* x, float* y)); +AL_FUNC(void, al_compose_transform, (ALLEGRO_TRANSFORM* trans, const ALLEGRO_TRANSFORM* other)); +AL_FUNC(const ALLEGRO_TRANSFORM*, al_get_current_transform, (void)); +AL_FUNC(void, al_invert_transform, (ALLEGRO_TRANSFORM *trans)); +AL_FUNC(int, al_check_inverse, (const ALLEGRO_TRANSFORM *trans, float tol)); + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/allegro5/utf8.h b/allegro-5.0.10-mingw-4.7.0/include/allegro5/utf8.h new file mode 100644 index 0000000..f0459da --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/allegro5/utf8.h @@ -0,0 +1,150 @@ +#ifndef __al_included_allegro5_utf8_h +#define __al_included_allegro5_utf8_h + +#include "allegro5/base.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Type: ALLEGRO_USTR + */ +typedef struct _al_tagbstring ALLEGRO_USTR; + +/* Type: ALLEGRO_USTR_INFO + */ +typedef struct _al_tagbstring ALLEGRO_USTR_INFO; + +#ifndef __al_tagbstring_defined +#define __al_tagbstring_defined +struct _al_tagbstring { + int mlen; + int slen; + unsigned char * data; +}; +#endif + +/* Creating strings */ +AL_FUNC(ALLEGRO_USTR *, al_ustr_new, (const char *s)); +AL_FUNC(ALLEGRO_USTR *, al_ustr_new_from_buffer, (const char *s, size_t size)); +AL_PRINTFUNC(ALLEGRO_USTR *, al_ustr_newf, (const char *fmt, ...), 1, 2); +AL_FUNC(void, al_ustr_free, (ALLEGRO_USTR *us)); +AL_FUNC(const char *, al_cstr, (const ALLEGRO_USTR *us)); +AL_FUNC(void, al_ustr_to_buffer, (const ALLEGRO_USTR *us, char *buffer, int size)); +AL_FUNC(char *, al_cstr_dup, (const ALLEGRO_USTR *us)); +AL_FUNC(ALLEGRO_USTR *, al_ustr_dup, (const ALLEGRO_USTR *us)); +AL_FUNC(ALLEGRO_USTR *, al_ustr_dup_substr, (const ALLEGRO_USTR *us, + int start_pos, int end_pos)); + +/* Predefined string */ +AL_FUNC(const ALLEGRO_USTR *, al_ustr_empty_string, (void)); + +/* Reference strings */ +AL_FUNC(const ALLEGRO_USTR *, al_ref_cstr, (ALLEGRO_USTR_INFO *info, const char *s)); +AL_FUNC(const ALLEGRO_USTR *, al_ref_buffer, (ALLEGRO_USTR_INFO *info, const char *s, + size_t size)); +AL_FUNC(const ALLEGRO_USTR *, al_ref_ustr, (ALLEGRO_USTR_INFO *info, + const ALLEGRO_USTR *us, int start_pos, int end_pos)); + +/* Sizes and offsets */ +AL_FUNC(size_t, al_ustr_size, (const ALLEGRO_USTR *us)); +AL_FUNC(size_t, al_ustr_length, (const ALLEGRO_USTR *us)); +AL_FUNC(int, al_ustr_offset, (const ALLEGRO_USTR *us, int index)); +AL_FUNC(bool, al_ustr_next, (const ALLEGRO_USTR *us, int *pos)); +AL_FUNC(bool, al_ustr_prev, (const ALLEGRO_USTR *us, int *pos)); + +/* Get codepoints */ +AL_FUNC(int32_t, al_ustr_get, (const ALLEGRO_USTR *us, int pos)); +AL_FUNC(int32_t, al_ustr_get_next, (const ALLEGRO_USTR *us, int *pos)); +AL_FUNC(int32_t, al_ustr_prev_get, (const ALLEGRO_USTR *us, int *pos)); + +/* Insert */ +AL_FUNC(bool, al_ustr_insert, (ALLEGRO_USTR *us1, int pos, + const ALLEGRO_USTR *us2)); +AL_FUNC(bool, al_ustr_insert_cstr, (ALLEGRO_USTR *us, int pos, + const char *us2)); +AL_FUNC(size_t, al_ustr_insert_chr, (ALLEGRO_USTR *us, int pos, int32_t c)); + +/* Append */ +AL_FUNC(bool, al_ustr_append, (ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)); +AL_FUNC(bool, al_ustr_append_cstr, (ALLEGRO_USTR *us, const char *s)); +AL_FUNC(size_t, al_ustr_append_chr, (ALLEGRO_USTR *us, int32_t c)); +AL_PRINTFUNC(bool, al_ustr_appendf, (ALLEGRO_USTR *us, const char *fmt, ...), + 2, 3); +AL_FUNC(bool, al_ustr_vappendf, (ALLEGRO_USTR *us, const char *fmt, + va_list ap)); + +/* Remove */ +AL_FUNC(bool, al_ustr_remove_chr, (ALLEGRO_USTR *us, int pos)); +AL_FUNC(bool, al_ustr_remove_range, (ALLEGRO_USTR *us, int start_pos, + int end_pos)); +AL_FUNC(bool, al_ustr_truncate, (ALLEGRO_USTR *us, int start_pos)); +AL_FUNC(bool, al_ustr_ltrim_ws, (ALLEGRO_USTR *us)); +AL_FUNC(bool, al_ustr_rtrim_ws, (ALLEGRO_USTR *us)); +AL_FUNC(bool, al_ustr_trim_ws, (ALLEGRO_USTR *us)); + +/* Assign */ +AL_FUNC(bool, al_ustr_assign, (ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)); +AL_FUNC(bool, al_ustr_assign_substr, (ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2, + int start_pos, int end_pos)); +AL_FUNC(bool, al_ustr_assign_cstr, (ALLEGRO_USTR *us1, const char *s)); + +/* Replace */ +AL_FUNC(size_t, al_ustr_set_chr, (ALLEGRO_USTR *us, int pos, int32_t c)); +AL_FUNC(bool, al_ustr_replace_range, (ALLEGRO_USTR *us1, int start_pos1, + int end_pos1, const ALLEGRO_USTR *us2)); + +/* Searching */ +AL_FUNC(int, al_ustr_find_chr, (const ALLEGRO_USTR *us, int start_pos, + int32_t c)); +AL_FUNC(int, al_ustr_rfind_chr, (const ALLEGRO_USTR *us, int start_pos, + int32_t c)); +AL_FUNC(int, al_ustr_find_set, (const ALLEGRO_USTR *us, int start_pos, + const ALLEGRO_USTR *accept)); +AL_FUNC(int, al_ustr_find_set_cstr, (const ALLEGRO_USTR *us, int start_pos, + const char *accept)); +AL_FUNC(int, al_ustr_find_cset, (const ALLEGRO_USTR *us, int start_pos, + const ALLEGRO_USTR *reject)); +AL_FUNC(int, al_ustr_find_cset_cstr, (const ALLEGRO_USTR *us, int start_pos, + const char *reject)); +AL_FUNC(int, al_ustr_find_str, (const ALLEGRO_USTR *haystack, int start_pos, + const ALLEGRO_USTR *needle)); +AL_FUNC(int, al_ustr_find_cstr, (const ALLEGRO_USTR *haystack, int start_pos, + const char *needle)); +AL_FUNC(int, al_ustr_rfind_str, (const ALLEGRO_USTR *haystack, int start_pos, + const ALLEGRO_USTR *needle)); +AL_FUNC(int, al_ustr_rfind_cstr, (const ALLEGRO_USTR *haystack, int start_pos, + const char *needle)); +AL_FUNC(bool, al_ustr_find_replace, (ALLEGRO_USTR *us, int start_pos, + const ALLEGRO_USTR *find, const ALLEGRO_USTR *replace)); +AL_FUNC(bool, al_ustr_find_replace_cstr, (ALLEGRO_USTR *us, int start_pos, + const char *find, const char *replace)); + +/* Compare */ +AL_FUNC(bool, al_ustr_equal, (const ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)); +AL_FUNC(int, al_ustr_compare, (const ALLEGRO_USTR *u, const ALLEGRO_USTR *v)); +AL_FUNC(int, al_ustr_ncompare, (const ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2, + int n)); +AL_FUNC(bool, al_ustr_has_prefix,(const ALLEGRO_USTR *u, const ALLEGRO_USTR *v)); +AL_FUNC(bool, al_ustr_has_prefix_cstr, (const ALLEGRO_USTR *u, const char *s)); +AL_FUNC(bool, al_ustr_has_suffix,(const ALLEGRO_USTR *u, const ALLEGRO_USTR *v)); +AL_FUNC(bool, al_ustr_has_suffix_cstr,(const ALLEGRO_USTR *us1, const char *s)); + +/* Low level UTF-8 functions */ +AL_FUNC(size_t, al_utf8_width, (int32_t c)); +AL_FUNC(size_t, al_utf8_encode, (char s[], int32_t c)); + +/* UTF-16 */ +AL_FUNC(ALLEGRO_USTR *, al_ustr_new_from_utf16, (uint16_t const *s)); +AL_FUNC(size_t, al_ustr_size_utf16, (const ALLEGRO_USTR *us)); +AL_FUNC(size_t, al_ustr_encode_utf16, (const ALLEGRO_USTR *us, uint16_t *s, size_t n)); +AL_FUNC(size_t, al_utf16_width, (int c)); +AL_FUNC(size_t, al_utf16_encode, (uint16_t s[], int32_t c)); + +#ifdef __cplusplus + } +#endif + +#endif + +/* vim: set sts=3 sw=3 et: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/dumb.h b/allegro-5.0.10-mingw-4.7.0/include/dumb.h new file mode 100644 index 0000000..2789d7e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/dumb.h @@ -0,0 +1,687 @@ +/* _______ ____ __ ___ ___ + * \ _ \ \ / \ / \ \ / / ' ' ' + * | | \ \ | | || | \/ | . . + * | | | | | | || ||\ /| | + * | | | | | | || || \/ | | ' ' ' + * | | | | | | || || | | . . + * | |_/ / \ \__// || | | + * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque + * / \ + * / . \ + * dumb.h - The user header file for DUMB. / / \ \ + * | < / \_ + * Include this file in any of your files in | \/ /\ / + * which you wish to use the DUMB functions \_ / > / + * and variables. | \ / / + * | ' / + * Allegro users, you will probably want aldumb.h. \__/ + */ + +#ifndef DUMB_H +#define DUMB_H + + +#include +#include + + +#ifdef __cplusplus + extern "C" { +#endif + + +#define DUMB_MAJOR_VERSION 0 +#define DUMB_MINOR_VERSION 9 +#define DUMB_REVISION_VERSION 3 + +#define DUMB_VERSION (DUMB_MAJOR_VERSION*10000 + DUMB_MINOR_VERSION*100 + DUMB_REVISION_VERSION) + +#define DUMB_VERSION_STR "0.9.3" + +#define DUMB_NAME "DUMB v"DUMB_VERSION_STR + +#define DUMB_YEAR 2005 +#define DUMB_MONTH 8 +#define DUMB_DAY 7 + +#define DUMB_YEAR_STR2 "05" +#define DUMB_YEAR_STR4 "2005" +#define DUMB_MONTH_STR1 "8" +#define DUMB_DAY_STR1 "7" + +#if DUMB_MONTH < 10 +#define DUMB_MONTH_STR2 "0"DUMB_MONTH_STR1 +#else +#define DUMB_MONTH_STR2 DUMB_MONTH_STR1 +#endif + +#if DUMB_DAY < 10 +#define DUMB_DAY_STR2 "0"DUMB_DAY_STR1 +#else +#define DUMB_DAY_STR2 DUMB_DAY_STR1 +#endif + + +/* WARNING: The month and day were inadvertently swapped in the v0.8 release. + * Please do not compare this constant against any date in 2002. In + * any case, DUMB_VERSION is probably more useful for this purpose. + */ +#define DUMB_DATE (DUMB_YEAR*10000 + DUMB_MONTH*100 + DUMB_DAY) + +#define DUMB_DATE_STR DUMB_DAY_STR1"."DUMB_MONTH_STR1"."DUMB_YEAR_STR4 + + +#undef MIN +#undef MAX +#undef MID + +#define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#define MID(x,y,z) MAX((x), MIN((y), (z))) + +#undef ABS +#define ABS(x) (((x) >= 0) ? (x) : (-(x))) + + +#ifdef DEBUGMODE + +#ifndef ASSERT +#include +#define ASSERT(n) assert(n) +#endif +#ifndef TRACE +// it would be nice if this did actually trace ... +#define TRACE 1 ? (void)0 : (void)printf +#endif + +#else + +#ifndef ASSERT +#define ASSERT(n) +#endif +#ifndef TRACE +#define TRACE 1 ? (void)0 : (void)printf +#endif + +#endif + + +#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \ + ((unsigned int)(b) << 16) | \ + ((unsigned int)(c) << 8) | \ + ((unsigned int)(d) )) + + + +#ifndef LONG_LONG +#if defined __GNUC__ || defined __INTEL_COMPILER || defined __MWERKS__ +#define LONG_LONG long long +#elif defined _MSC_VER || defined __WATCOMC__ +#define LONG_LONG __int64 +#elif defined __sgi +#define LONG_LONG long long +#else +#error 64-bit integer type unknown +#endif +#endif + +#if __GNUC__ * 100 + __GNUC_MINOR__ >= 301 /* GCC 3.1+ */ +#ifndef DUMB_DECLARE_DEPRECATED +#define DUMB_DECLARE_DEPRECATED +#endif +#define DUMB_DEPRECATED __attribute__((__deprecated__)) +#else +#define DUMB_DEPRECATED +#endif + + +/* Basic Sample Type. Normal range is -0x800000 to 0x7FFFFF. */ + +typedef int sample_t; + + +/* Library Clean-up Management */ + +int dumb_atexit(void (*proc)(void)); + +void dumb_exit(void); + + +/* File Input Functions */ + +typedef struct DUMBFILE_SYSTEM +{ + void *(*open)(const char *filename); + int (*skip)(void *f, long n); + int (*getc)(void *f); + long (*getnc)(char *ptr, long n, void *f); + void (*close)(void *f); +} +DUMBFILE_SYSTEM; + +typedef struct DUMBFILE DUMBFILE; + +void register_dumbfile_system(DUMBFILE_SYSTEM *dfs); + +DUMBFILE *dumbfile_open(const char *filename); +DUMBFILE *dumbfile_open_ex(void *file, DUMBFILE_SYSTEM *dfs); + +long dumbfile_pos(DUMBFILE *f); +int dumbfile_skip(DUMBFILE *f, long n); + +int dumbfile_getc(DUMBFILE *f); + +int dumbfile_igetw(DUMBFILE *f); +int dumbfile_mgetw(DUMBFILE *f); + +long dumbfile_igetl(DUMBFILE *f); +long dumbfile_mgetl(DUMBFILE *f); + +unsigned long dumbfile_cgetul(DUMBFILE *f); +signed long dumbfile_cgetsl(DUMBFILE *f); + +long dumbfile_getnc(char *ptr, long n, DUMBFILE *f); + +int dumbfile_error(DUMBFILE *f); +int dumbfile_close(DUMBFILE *f); + + +/* stdio File Input Module */ + +void dumb_register_stdfiles(void); + +DUMBFILE *dumbfile_open_stdfile(FILE *p); + + +/* Memory File Input Module */ + +DUMBFILE *dumbfile_open_memory(const char *data, long size); + + +/* DUH Management */ + +typedef struct DUH DUH; + +#define DUH_SIGNATURE DUMB_ID('D','U','H','!') + +void unload_duh(DUH *duh); + +DUH *load_duh(const char *filename); +DUH *read_duh(DUMBFILE *f); + +long duh_get_length(DUH *duh); + +const char *duh_get_tag(DUH *duh, const char *key); + + +/* Signal Rendering Functions */ + +typedef struct DUH_SIGRENDERER DUH_SIGRENDERER; + +DUH_SIGRENDERER *duh_start_sigrenderer(DUH *duh, int sig, int n_channels, long pos); + +#ifdef DUMB_DECLARE_DEPRECATED +typedef void (*DUH_SIGRENDERER_CALLBACK)(void *data, sample_t **samples, int n_channels, long length); +/* This is deprecated, but is not marked as such because GCC tends to + * complain spuriously when the typedef is used later. See comments below. + */ + +void duh_sigrenderer_set_callback( + DUH_SIGRENDERER *sigrenderer, + DUH_SIGRENDERER_CALLBACK callback, void *data +) DUMB_DEPRECATED; +/* The 'callback' argument's type has changed for const-correctness. See the + * DUH_SIGRENDERER_CALLBACK definition just above. Also note that the samples + * in the buffer are now 256 times as large; the normal range is -0x800000 to + * 0x7FFFFF. The function has been renamed partly because its functionality + * has changed slightly and partly so that its name is more meaningful. The + * new one is duh_sigrenderer_set_analyser_callback(), and the typedef for + * the function pointer has also changed, from DUH_SIGRENDERER_CALLBACK to + * DUH_SIGRENDERER_ANALYSER_CALLBACK. (If you wanted to use this callback to + * apply a DSP effect, don't worry; there is a better way of doing this. It + * is undocumented, so contact me and I shall try to help. Contact details + * are in readme.txt.) + */ + +typedef void (*DUH_SIGRENDERER_ANALYSER_CALLBACK)(void *data, const sample_t *const *samples, int n_channels, long length); +/* This is deprecated, but is not marked as such because GCC tends to + * complain spuriously when the typedef is used later. See comments below. + */ + +void duh_sigrenderer_set_analyser_callback( + DUH_SIGRENDERER *sigrenderer, + DUH_SIGRENDERER_ANALYSER_CALLBACK callback, void *data +) DUMB_DEPRECATED; +/* This is deprecated because the meaning of the 'samples' parameter in the + * callback needed to change. For stereo applications, the array used to be + * indexed with samples[channel][pos]. It is now indexed with + * samples[0][pos*2+channel]. Mono sample data are still indexed with + * samples[0][pos]. The array is still 2D because samples will probably only + * ever be interleaved in twos. In order to fix your code, adapt it to the + * new sample layout and then call + * duh_sigrenderer_set_sample_analyser_callback below instead of this + * function. + */ +#endif + +typedef void (*DUH_SIGRENDERER_SAMPLE_ANALYSER_CALLBACK)(void *data, const sample_t *const *samples, int n_channels, long length); + +void duh_sigrenderer_set_sample_analyser_callback( + DUH_SIGRENDERER *sigrenderer, + DUH_SIGRENDERER_SAMPLE_ANALYSER_CALLBACK callback, void *data +); + +int duh_sigrenderer_get_n_channels(DUH_SIGRENDERER *sigrenderer); +long duh_sigrenderer_get_position(DUH_SIGRENDERER *sigrenderer); + +void duh_sigrenderer_set_sigparam(DUH_SIGRENDERER *sigrenderer, unsigned char id, long value); + +#ifdef DUMB_DECLARE_DEPRECATED +long duh_sigrenderer_get_samples( + DUH_SIGRENDERER *sigrenderer, + float volume, float delta, + long size, sample_t **samples +) DUMB_DEPRECATED; +/* The sample format has changed, so if you were using this function, + * you should switch to duh_sigrenderer_generate_samples() and change + * how you interpret the samples array. See the comments for + * duh_sigrenderer_set_analyser_callback(). + */ +#endif + +long duh_sigrenderer_generate_samples( + DUH_SIGRENDERER *sigrenderer, + float volume, float delta, + long size, sample_t **samples +); + +void duh_sigrenderer_get_current_sample(DUH_SIGRENDERER *sigrenderer, float volume, sample_t *samples); + +void duh_end_sigrenderer(DUH_SIGRENDERER *sigrenderer); + + +/* DUH Rendering Functions */ + +long duh_render( + DUH_SIGRENDERER *sigrenderer, + int bits, int unsign, + float volume, float delta, + long size, void *sptr +); + +#ifdef DUMB_DECLARE_DEPRECATED + +long duh_render_signal( + DUH_SIGRENDERER *sigrenderer, + float volume, float delta, + long size, sample_t **samples +) DUMB_DEPRECATED; +/* Please use duh_sigrenderer_generate_samples(), and see the + * comments for the deprecated duh_sigrenderer_get_samples() too. + */ + +typedef DUH_SIGRENDERER DUH_RENDERER DUMB_DEPRECATED; +/* Please use DUH_SIGRENDERER instead of DUH_RENDERER. */ + +DUH_SIGRENDERER *duh_start_renderer(DUH *duh, int n_channels, long pos) DUMB_DEPRECATED; +/* Please use duh_start_sigrenderer() instead. Pass 0 for 'sig'. */ + +int duh_renderer_get_n_channels(DUH_SIGRENDERER *dr) DUMB_DEPRECATED; +long duh_renderer_get_position(DUH_SIGRENDERER *dr) DUMB_DEPRECATED; +/* Please use the duh_sigrenderer_*() equivalents of these two functions. */ + +void duh_end_renderer(DUH_SIGRENDERER *dr) DUMB_DEPRECATED; +/* Please use duh_end_sigrenderer() instead. */ + +DUH_SIGRENDERER *duh_renderer_encapsulate_sigrenderer(DUH_SIGRENDERER *sigrenderer) DUMB_DEPRECATED; +DUH_SIGRENDERER *duh_renderer_get_sigrenderer(DUH_SIGRENDERER *dr) DUMB_DEPRECATED; +DUH_SIGRENDERER *duh_renderer_decompose_to_sigrenderer(DUH_SIGRENDERER *dr) DUMB_DEPRECATED; +/* These functions have become no-ops that just return the parameter. + * So, for instance, replace + * duh_renderer_encapsulate_sigrenderer(my_sigrenderer) + * with + * my_sigrenderer + */ + +#endif + + +/* Impulse Tracker Support */ + +extern int dumb_it_max_to_mix; + +typedef struct DUMB_IT_SIGDATA DUMB_IT_SIGDATA; +typedef struct DUMB_IT_SIGRENDERER DUMB_IT_SIGRENDERER; + +DUMB_IT_SIGDATA *duh_get_it_sigdata(DUH *duh); +DUH_SIGRENDERER *duh_encapsulate_it_sigrenderer(DUMB_IT_SIGRENDERER *it_sigrenderer, int n_channels, long pos); +DUMB_IT_SIGRENDERER *duh_get_it_sigrenderer(DUH_SIGRENDERER *sigrenderer); + +DUH_SIGRENDERER *dumb_it_start_at_order(DUH *duh, int n_channels, int startorder); + +void dumb_it_set_loop_callback(DUMB_IT_SIGRENDERER *sigrenderer, int (*callback)(void *data), void *data); +void dumb_it_set_xm_speed_zero_callback(DUMB_IT_SIGRENDERER *sigrenderer, int (*callback)(void *data), void *data); +void dumb_it_set_midi_callback(DUMB_IT_SIGRENDERER *sigrenderer, int (*callback)(void *data, int channel, unsigned char midi_byte), void *data); + +int dumb_it_callback_terminate(void *data); +int dumb_it_callback_midi_block(void *data, int channel, unsigned char midi_byte); + +DUH *dumb_load_it(const char *filename); +DUH *dumb_load_xm(const char *filename); +DUH *dumb_load_s3m(const char *filename); +DUH *dumb_load_mod(const char *filename); + +DUH *dumb_read_it(DUMBFILE *f); +DUH *dumb_read_xm(DUMBFILE *f); +DUH *dumb_read_s3m(DUMBFILE *f); +DUH *dumb_read_mod(DUMBFILE *f); + +DUH *dumb_load_it_quick(const char *filename); +DUH *dumb_load_xm_quick(const char *filename); +DUH *dumb_load_s3m_quick(const char *filename); +DUH *dumb_load_mod_quick(const char *filename); + +DUH *dumb_read_it_quick(DUMBFILE *f); +DUH *dumb_read_xm_quick(DUMBFILE *f); +DUH *dumb_read_s3m_quick(DUMBFILE *f); +DUH *dumb_read_mod_quick(DUMBFILE *f); + +long dumb_it_build_checkpoints(DUMB_IT_SIGDATA *sigdata); +void dumb_it_do_initial_runthrough(DUH *duh); + +const unsigned char *dumb_it_sd_get_song_message(DUMB_IT_SIGDATA *sd); + +int dumb_it_sd_get_n_orders(DUMB_IT_SIGDATA *sd); +int dumb_it_sd_get_n_samples(DUMB_IT_SIGDATA *sd); +int dumb_it_sd_get_n_instruments(DUMB_IT_SIGDATA *sd); + +const unsigned char *dumb_it_sd_get_sample_name(DUMB_IT_SIGDATA *sd, int i); +const unsigned char *dumb_it_sd_get_sample_filename(DUMB_IT_SIGDATA *sd, int i); +const unsigned char *dumb_it_sd_get_instrument_name(DUMB_IT_SIGDATA *sd, int i); +const unsigned char *dumb_it_sd_get_instrument_filename(DUMB_IT_SIGDATA *sd, int i); + +int dumb_it_sd_get_initial_global_volume(DUMB_IT_SIGDATA *sd); +void dumb_it_sd_set_initial_global_volume(DUMB_IT_SIGDATA *sd, int gv); + +int dumb_it_sd_get_mixing_volume(DUMB_IT_SIGDATA *sd); +void dumb_it_sd_set_mixing_volume(DUMB_IT_SIGDATA *sd, int mv); + +int dumb_it_sd_get_initial_speed(DUMB_IT_SIGDATA *sd); +void dumb_it_sd_set_initial_speed(DUMB_IT_SIGDATA *sd, int speed); + +int dumb_it_sd_get_initial_tempo(DUMB_IT_SIGDATA *sd); +void dumb_it_sd_set_initial_tempo(DUMB_IT_SIGDATA *sd, int tempo); + +int dumb_it_sd_get_initial_channel_volume(DUMB_IT_SIGDATA *sd, int channel); +void dumb_it_sd_set_initial_channel_volume(DUMB_IT_SIGDATA *sd, int channel, int volume); + +int dumb_it_sr_get_current_order(DUMB_IT_SIGRENDERER *sr); +int dumb_it_sr_get_current_row(DUMB_IT_SIGRENDERER *sr); + +int dumb_it_sr_get_global_volume(DUMB_IT_SIGRENDERER *sr); +void dumb_it_sr_set_global_volume(DUMB_IT_SIGRENDERER *sr, int gv); + +int dumb_it_sr_get_tempo(DUMB_IT_SIGRENDERER *sr); +void dumb_it_sr_set_tempo(DUMB_IT_SIGRENDERER *sr, int tempo); + +int dumb_it_sr_get_speed(DUMB_IT_SIGRENDERER *sr); +void dumb_it_sr_set_speed(DUMB_IT_SIGRENDERER *sr, int speed); + +#define DUMB_IT_N_CHANNELS 64 +#define DUMB_IT_N_NNA_CHANNELS 192 +#define DUMB_IT_TOTAL_CHANNELS (DUMB_IT_N_CHANNELS + DUMB_IT_N_NNA_CHANNELS) + +/* Channels passed to any of these functions are 0-based */ +int dumb_it_sr_get_channel_volume(DUMB_IT_SIGRENDERER *sr, int channel); +void dumb_it_sr_set_channel_volume(DUMB_IT_SIGRENDERER *sr, int channel, int volume); + +int dumb_it_sr_get_channel_muted(DUMB_IT_SIGRENDERER *sr, int channel); +void dumb_it_sr_set_channel_muted(DUMB_IT_SIGRENDERER *sr, int channel, int muted); + +typedef struct DUMB_IT_CHANNEL_STATE DUMB_IT_CHANNEL_STATE; + +struct DUMB_IT_CHANNEL_STATE +{ + int channel; /* 0-based; meaningful for NNA channels */ + int sample; /* 1-based; 0 if nothing playing, then other fields undef */ + int freq; /* in Hz */ + float volume; /* 1.0 maximum; affected by ALL factors, inc. mixing vol */ + unsigned char pan; /* 0-64, 100 for surround */ + signed char subpan; /* use (pan + subpan/256.0f) or ((pan<<8)+subpan) */ + unsigned char filter_cutoff; /* 0-127 cutoff=127 AND resonance=0 */ + unsigned char filter_subcutoff; /* 0-255 -> no filters (subcutoff */ + unsigned char filter_resonance; /* 0-127 always 0 in this case) */ + /* subcutoff only changes from zero if filter envelopes are in use. The + * calculation (filter_cutoff + filter_subcutoff/256.0f) gives a more + * accurate filter cutoff measurement as a float. It would often be more + * useful to use a scaled int such as ((cutoff<<8) + subcutoff). + */ +}; + +/* Values of 64 or more will access NNA channels here. */ +void dumb_it_sr_get_channel_state(DUMB_IT_SIGRENDERER *sr, int channel, DUMB_IT_CHANNEL_STATE *state); + + +/* Signal Design Helper Values */ + +/* Use pow(DUMB_SEMITONE_BASE, n) to get the 'delta' value to transpose up by + * n semitones. To transpose down, use negative n. + */ +#define DUMB_SEMITONE_BASE 1.059463094359295309843105314939748495817 + +/* Use pow(DUMB_QUARTERTONE_BASE, n) to get the 'delta' value to transpose up + * by n quartertones. To transpose down, use negative n. + */ +#define DUMB_QUARTERTONE_BASE 1.029302236643492074463779317738953977823 + +/* Use pow(DUMB_PITCH_BASE, n) to get the 'delta' value to transpose up by n + * units. In this case, 256 units represent one semitone; 3072 units + * represent one octave. These units are used by the sequence signal (SEQU). + */ +#define DUMB_PITCH_BASE 1.000225659305069791926712241547647863626 + + +/* Signal Design Function Types */ + +typedef void sigdata_t; +typedef void sigrenderer_t; + +typedef sigdata_t *(*DUH_LOAD_SIGDATA)(DUH *duh, DUMBFILE *file); + +typedef sigrenderer_t *(*DUH_START_SIGRENDERER)( + DUH *duh, + sigdata_t *sigdata, + int n_channels, + long pos +); + +typedef void (*DUH_SIGRENDERER_SET_SIGPARAM)( + sigrenderer_t *sigrenderer, + unsigned char id, long value +); + +typedef long (*DUH_SIGRENDERER_GENERATE_SAMPLES)( + sigrenderer_t *sigrenderer, + float volume, float delta, + long size, sample_t **samples +); + +typedef void (*DUH_SIGRENDERER_GET_CURRENT_SAMPLE)( + sigrenderer_t *sigrenderer, + float volume, + sample_t *samples +); + +typedef void (*DUH_END_SIGRENDERER)(sigrenderer_t *sigrenderer); + +typedef void (*DUH_UNLOAD_SIGDATA)(sigdata_t *sigdata); + + +/* Signal Design Function Registration */ + +typedef struct DUH_SIGTYPE_DESC +{ + long type; + DUH_LOAD_SIGDATA load_sigdata; + DUH_START_SIGRENDERER start_sigrenderer; + DUH_SIGRENDERER_SET_SIGPARAM sigrenderer_set_sigparam; + DUH_SIGRENDERER_GENERATE_SAMPLES sigrenderer_generate_samples; + DUH_SIGRENDERER_GET_CURRENT_SAMPLE sigrenderer_get_current_sample; + DUH_END_SIGRENDERER end_sigrenderer; + DUH_UNLOAD_SIGDATA unload_sigdata; +} +DUH_SIGTYPE_DESC; + +void dumb_register_sigtype(DUH_SIGTYPE_DESC *desc); + + +// Decide where to put these functions; new heading? + +sigdata_t *duh_get_raw_sigdata(DUH *duh, int sig, long type); + +DUH_SIGRENDERER *duh_encapsulate_raw_sigrenderer(sigrenderer_t *vsigrenderer, DUH_SIGTYPE_DESC *desc, int n_channels, long pos); +sigrenderer_t *duh_get_raw_sigrenderer(DUH_SIGRENDERER *sigrenderer, long type); + + +/* Standard Signal Types */ + +//void dumb_register_sigtype_sample(void); + + +/* Sample Buffer Allocation Helpers */ + +#ifdef DUMB_DECLARE_DEPRECATED +sample_t **create_sample_buffer(int n_channels, long length) DUMB_DEPRECATED; +/* DUMB has been changed to interleave stereo samples. Use + * allocate_sample_buffer() instead, and see the comments for + * duh_sigrenderer_set_analyser_callback(). + */ +#endif +sample_t **allocate_sample_buffer(int n_channels, long length); +void destroy_sample_buffer(sample_t **samples); + + +/* Silencing Helper */ + +void dumb_silence(sample_t *samples, long length); + + +/* Click Removal Helpers */ + +typedef struct DUMB_CLICK_REMOVER DUMB_CLICK_REMOVER; + +DUMB_CLICK_REMOVER *dumb_create_click_remover(void); +void dumb_record_click(DUMB_CLICK_REMOVER *cr, long pos, sample_t step); +void dumb_remove_clicks(DUMB_CLICK_REMOVER *cr, sample_t *samples, long length, int step, float halflife); +sample_t dumb_click_remover_get_offset(DUMB_CLICK_REMOVER *cr); +void dumb_destroy_click_remover(DUMB_CLICK_REMOVER *cr); + +DUMB_CLICK_REMOVER **dumb_create_click_remover_array(int n); +void dumb_record_click_array(int n, DUMB_CLICK_REMOVER **cr, long pos, sample_t *step); +void dumb_record_click_negative_array(int n, DUMB_CLICK_REMOVER **cr, long pos, sample_t *step); +void dumb_remove_clicks_array(int n, DUMB_CLICK_REMOVER **cr, sample_t **samples, long length, float halflife); +void dumb_click_remover_get_offset_array(int n, DUMB_CLICK_REMOVER **cr, sample_t *offset); +void dumb_destroy_click_remover_array(int n, DUMB_CLICK_REMOVER **cr); + + +/* Resampling Helpers */ + +#define DUMB_RQ_ALIASING 0 +#define DUMB_RQ_LINEAR 1 +#define DUMB_RQ_CUBIC 2 +#define DUMB_RQ_N_LEVELS 3 +extern int dumb_resampling_quality; + +typedef struct DUMB_RESAMPLER DUMB_RESAMPLER; + +typedef void (*DUMB_RESAMPLE_PICKUP)(DUMB_RESAMPLER *resampler, void *data); + +struct DUMB_RESAMPLER +{ + void *src; + long pos; + int subpos; + long start, end; + int dir; + DUMB_RESAMPLE_PICKUP pickup; + void *pickup_data; + int min_quality; + int max_quality; + /* Everything below this point is internal: do not use. */ + union { + sample_t x24[3*2]; + short x16[3*2]; + signed char x8[3*2]; + } x; + int overshot; +}; + +void dumb_reset_resampler(DUMB_RESAMPLER *resampler, sample_t *src, int src_channels, long pos, long start, long end); +DUMB_RESAMPLER *dumb_start_resampler(sample_t *src, int src_channels, long pos, long start, long end); +long dumb_resample_1_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume, float delta); +long dumb_resample_1_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_2_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_2_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +void dumb_resample_get_current_sample_1_1(DUMB_RESAMPLER *resampler, float volume, sample_t *dst); +void dumb_resample_get_current_sample_1_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_2_1(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_2_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_end_resampler(DUMB_RESAMPLER *resampler); + +void dumb_reset_resampler_16(DUMB_RESAMPLER *resampler, short *src, int src_channels, long pos, long start, long end); +DUMB_RESAMPLER *dumb_start_resampler_16(short *src, int src_channels, long pos, long start, long end); +long dumb_resample_16_1_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume, float delta); +long dumb_resample_16_1_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_16_2_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_16_2_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +void dumb_resample_get_current_sample_16_1_1(DUMB_RESAMPLER *resampler, float volume, sample_t *dst); +void dumb_resample_get_current_sample_16_1_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_16_2_1(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_16_2_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_end_resampler_16(DUMB_RESAMPLER *resampler); + +void dumb_reset_resampler_8(DUMB_RESAMPLER *resampler, signed char *src, int src_channels, long pos, long start, long end); +DUMB_RESAMPLER *dumb_start_resampler_8(signed char *src, int src_channels, long pos, long start, long end); +long dumb_resample_8_1_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume, float delta); +long dumb_resample_8_1_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_8_2_1(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_8_2_2(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +void dumb_resample_get_current_sample_8_1_1(DUMB_RESAMPLER *resampler, float volume, sample_t *dst); +void dumb_resample_get_current_sample_8_1_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_8_2_1(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_8_2_2(DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_end_resampler_8(DUMB_RESAMPLER *resampler); + +void dumb_reset_resampler_n(int n, DUMB_RESAMPLER *resampler, void *src, int src_channels, long pos, long start, long end); +DUMB_RESAMPLER *dumb_start_resampler_n(int n, void *src, int src_channels, long pos, long start, long end); +long dumb_resample_n_1_1(int n, DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume, float delta); +long dumb_resample_n_1_2(int n, DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_n_2_1(int n, DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +long dumb_resample_n_2_2(int n, DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, float volume_left, float volume_right, float delta); +void dumb_resample_get_current_sample_n_1_1(int n, DUMB_RESAMPLER *resampler, float volume, sample_t *dst); +void dumb_resample_get_current_sample_n_1_2(int n, DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_n_2_1(int n, DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_resample_get_current_sample_n_2_2(int n, DUMB_RESAMPLER *resampler, float volume_left, float volume_right, sample_t *dst); +void dumb_end_resampler_n(int n, DUMB_RESAMPLER *resampler); + + +/* DUH Construction */ + +DUH *make_duh( + long length, + int n_tags, + const char *const tag[][2], + int n_signals, + DUH_SIGTYPE_DESC *desc[], + sigdata_t *sigdata[] +); + +void duh_set_length(DUH *duh, long length); + + +#ifdef __cplusplus + } +#endif + + +#endif /* DUMB_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftconfig.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftconfig.h new file mode 100644 index 0000000..a9e767c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftconfig.h @@ -0,0 +1,566 @@ +/***************************************************************************/ +/* */ +/* ftconfig.h */ +/* */ +/* ANSI-specific configuration file (specification only). */ +/* */ +/* Copyright 1996-2004, 2006-2008, 2010-2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This header file contains a number of macro definitions that are used */ + /* by the rest of the engine. Most of the macros here are automatically */ + /* determined at compile time, and you should not need to change it to */ + /* port FreeType, except to compile the library with a non-ANSI */ + /* compiler. */ + /* */ + /* Note however that if some specific modifications are needed, we */ + /* advise you to place a modified copy in your build directory. */ + /* */ + /* The build directory is usually `freetype/builds/', and */ + /* contains system-specific files that are always included first when */ + /* building the library. */ + /* */ + /* This ANSI version should stay in `include/freetype/config'. */ + /* */ + /*************************************************************************/ + +#ifndef __FTCONFIG_H__ +#define __FTCONFIG_H__ + +#include +#include FT_CONFIG_OPTIONS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ + /* */ + /* These macros can be toggled to suit a specific system. The current */ + /* ones are defaults used to compile FreeType in an ANSI C environment */ + /* (16bit compilers are also supported). Copy this file to your own */ + /* `freetype/builds/' directory, and edit it to port the engine. */ + /* */ + /*************************************************************************/ + + + /* There are systems (like the Texas Instruments 'C54x) where a `char' */ + /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ + /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ + /* is probably unexpected. */ + /* */ + /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ + /* `char' type. */ + +#ifndef FT_CHAR_BIT +#define FT_CHAR_BIT CHAR_BIT +#endif + + + /* The size of an `int' type. */ +#if FT_UINT_MAX == 0xFFFFUL +#define FT_SIZEOF_INT (16 / FT_CHAR_BIT) +#elif FT_UINT_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_INT (32 / FT_CHAR_BIT) +#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_INT (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `int' type!" +#endif + + /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ + /* DM642) is recognized but avoided. */ +#if FT_ULONG_MAX == 0xFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL +#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) +#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL +#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) +#else +#error "Unsupported size of `long' type!" +#endif + + + /* FT_UNUSED is a macro used to indicate that a given parameter is not */ + /* used -- this is only used to get rid of unpleasant compiler warnings */ +#ifndef FT_UNUSED +#define FT_UNUSED( arg ) ( (arg) = (arg) ) +#endif + + + /*************************************************************************/ + /* */ + /* AUTOMATIC CONFIGURATION MACROS */ + /* */ + /* These macros are computed from the ones defined above. Don't touch */ + /* their definition, unless you know precisely what you are doing. No */ + /* porter should need to mess with them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Mac support */ + /* */ + /* This is the only necessary change, so it is defined here instead */ + /* providing a new configuration file. */ + /* */ +#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ + ( defined( __MWERKS__ ) && defined( macintosh ) ) + /* no Carbon frameworks for 64bit 10.4.x */ + /* AvailabilityMacros.h is available since Mac OS X 10.2, */ + /* so guess the system version by maximum errno before inclusion */ +#include +#ifdef ECANCELED /* defined since 10.2 */ +#include "AvailabilityMacros.h" +#endif +#if defined( __LP64__ ) && \ + ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) +#define DARWIN_NO_CARBON 1 +#else +#define FT_MACINTOSH 1 +#endif + +#elif defined( __SC__ ) || defined( __MRC__ ) + /* Classic MacOS compilers */ +#include "ConditionalMacros.h" +#if TARGET_OS_MAC +#define FT_MACINTOSH 1 +#endif + +#endif + + + /*************************************************************************/ + /* */ + /*
*/ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ + /* */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ + /* */ + typedef unsigned short FT_UInt16; + + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + /* */ + +#endif + +#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) + + typedef signed int FT_Int32; + typedef unsigned int FT_UInt32; + +#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) + + typedef signed long FT_Int32; + typedef unsigned long FT_UInt32; + +#else +#error "no 32bit type found -- please check your configuration files" +#endif + + + /* look up an integer type that is at least 32 bits */ +#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) + + typedef int FT_Fast; + typedef unsigned int FT_UFast; + +#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT) + + typedef long FT_Fast; + typedef unsigned long FT_UFast; + +#endif + + + /* determine whether we have a 64-bit int type for platforms without */ + /* Autoconf */ +#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) + + /* FT_LONG64 must be defined if a 64-bit type is available */ +#define FT_LONG64 +#define FT_INT64 long + +#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __BORLANDC__ ) /* Borland C++ */ + + /* XXXX: We should probably check the value of __BORLANDC__ in order */ + /* to test the compiler version. */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __WATCOMC__ ) /* Watcom C++ */ + + /* Watcom doesn't provide 64-bit data types */ + +#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ + +#define FT_LONG64 +#define FT_INT64 long long int + +#elif defined( __GNUC__ ) + + /* GCC provides the `long long' type */ +#define FT_LONG64 +#define FT_INT64 long long int + +#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ + + + /*************************************************************************/ + /* */ + /* A 64-bit data type will create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ + /* is defined. You can however ignore this rule by defining the */ + /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#ifdef __STDC__ + + /* undefine the 64-bit macros in strict ANSI compilation mode */ +#undef FT_LONG64 +#undef FT_INT64 + +#endif /* __STDC__ */ + +#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ + + +#define FT_BEGIN_STMNT do { +#define FT_END_STMNT } while ( 0 ) +#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT + + +#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER + /* Provide assembler fragments for performance-critical functions. */ + /* These must be defined `static __inline__' with GCC. */ + +#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm + + /* documentation is in freetype.h */ + + static __inline FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + __asm + { + smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ + mov a, t, asr #31 /* a = (hi >> 31) */ + add a, a, #0x8000 /* a += 0x8000 */ + adds t2, t2, a /* t2 += a */ + adc t, t, #0 /* t += carry */ + mov a, t2, lsr #16 /* a = t2 >> 16 */ + orr a, a, t, lsl #16 /* a |= t << 16 */ + } + return a; + } + +#endif /* __CC_ARM || __ARMCC__ */ + + +#ifdef __GNUC__ + +#if defined( __arm__ ) && !defined( __thumb__ ) && \ + !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + __asm__ __volatile__ ( + "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ + "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ + "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ + "adds %1, %1, %0\n\t" /* %1 += %0 */ + "adc %2, %2, #0\n\t" /* %2 += carry */ + "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ + "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ + : "=r"(a), "=&r"(t2), "=&r"(t) + : "r"(a), "r"(b) ); + return a; + } + +#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ + +#if defined( __i386__ ) +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + + __asm__ __volatile__ ( + "imul %%edx\n" + "movl %%edx, %%ecx\n" + "sarl $31, %%ecx\n" + "addl $0x8000, %%ecx\n" + "addl %%ecx, %%eax\n" + "adcl $0, %%edx\n" + "shrl $16, %%eax\n" + "shll $16, %%edx\n" + "addl %%edx, %%eax\n" + : "=a"(result), "=d"(b) + : "a"(a), "d"(b) + : "%ecx", "cc" ); + return result; + } + +#endif /* i386 */ + +#endif /* __GNUC__ */ + + +#ifdef _MSC_VER /* Visual C++ */ + +#ifdef _M_IX86 + +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + __asm + { + mov eax, a + mov edx, b + imul edx + mov ecx, edx + sar ecx, 31 + add ecx, 8000h + add eax, ecx + adc edx, 0 + shr eax, 16 + shl edx, 16 + add eax, edx + mov result, eax + } + return result; + } + +#endif /* _M_IX86 */ + +#endif /* _MSC_VER */ + +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + + +#ifdef FT_CONFIG_OPTION_INLINE_MULFIX +#ifdef FT_MULFIX_ASSEMBLER +#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER +#endif +#endif + + +#ifdef FT_MAKE_OPTION_SINGLE_OBJECT + +#define FT_LOCAL( x ) static x +#define FT_LOCAL_DEF( x ) static x + +#else + +#ifdef __cplusplus +#define FT_LOCAL( x ) extern "C" x +#define FT_LOCAL_DEF( x ) extern "C" x +#else +#define FT_LOCAL( x ) extern x +#define FT_LOCAL_DEF( x ) x +#endif + +#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ + + +#ifndef FT_BASE + +#ifdef __cplusplus +#define FT_BASE( x ) extern "C" x +#else +#define FT_BASE( x ) extern x +#endif + +#endif /* !FT_BASE */ + + +#ifndef FT_BASE_DEF + +#ifdef __cplusplus +#define FT_BASE_DEF( x ) x +#else +#define FT_BASE_DEF( x ) x +#endif + +#endif /* !FT_BASE_DEF */ + + +#ifndef FT_EXPORT + +#ifdef __cplusplus +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif /* !FT_EXPORT */ + + +#ifndef FT_EXPORT_DEF + +#ifdef __cplusplus +#define FT_EXPORT_DEF( x ) extern "C" x +#else +#define FT_EXPORT_DEF( x ) extern x +#endif + +#endif /* !FT_EXPORT_DEF */ + + +#ifndef FT_EXPORT_VAR + +#ifdef __cplusplus +#define FT_EXPORT_VAR( x ) extern "C" x +#else +#define FT_EXPORT_VAR( x ) extern x +#endif + +#endif /* !FT_EXPORT_VAR */ + + /* The following macros are needed to compile the library with a */ + /* C++ compiler and with 16bit compilers. */ + /* */ + + /* This is special. Within C++, you must specify `extern "C"' for */ + /* functions which are used via function pointers, and you also */ + /* must do that for structures which contain function pointers to */ + /* assure C linkage -- it's not possible to have (local) anonymous */ + /* functions which are accessed by (global) function pointers. */ + /* */ + /* */ + /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* */ + /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ + /* contains pointers to callback functions. */ + /* */ + /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ + /* that contains pointers to callback functions. */ + /* */ + /* */ + /* Some 16bit compilers have to redefine these macros to insert */ + /* the infamous `_cdecl' or `__fastcall' declarations. */ + /* */ +#ifndef FT_CALLBACK_DEF +#ifdef __cplusplus +#define FT_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_CALLBACK_DEF( x ) static x +#endif +#endif /* FT_CALLBACK_DEF */ + +#ifndef FT_CALLBACK_TABLE +#ifdef __cplusplus +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" +#else +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF /* nothing */ +#endif +#endif /* FT_CALLBACK_TABLE */ + + +FT_END_HEADER + + +#endif /* __FTCONFIG_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftheader.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftheader.h new file mode 100644 index 0000000..2a7b8c4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftheader.h @@ -0,0 +1,793 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __FT_HEADER_H__ +#define __FT_HEADER_H__ + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_BEGIN_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*@***********************************************************************/ + /* */ + /* */ + /* FT_END_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /*
*/ + /* header_file_macros */ + /* */ + /* */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType~2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3~naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that it allows for more flexibility in the */ + /* way FreeType~2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + + /* configuration files */ + + /************************************************************************* + * + * @macro: + * FT_CONFIG_CONFIG_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 configuration data. + * + */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_STANDARD_LIBRARY_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 interface to the standard C library functions. + * + */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_OPTIONS_H + * + * @description: + * A macro used in #include statements to name the file containing + * FreeType~2 project-specific configuration options. + * + */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> +#endif + + + /************************************************************************* + * + * @macro: + * FT_CONFIG_MODULES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 modules that are statically linked to new library + * instances in @FT_Init_FreeType. + * + */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> +#endif + + /* */ + + /* public headers */ + + /************************************************************************* + * + * @macro: + * FT_FREETYPE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * base FreeType~2 API. + * + */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /************************************************************************* + * + * @macro: + * FT_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 error codes (and messages). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_ERRORS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list of FreeType~2 module error offsets (and messages). + * + */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /************************************************************************* + * + * @macro: + * FT_SYSTEM_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 interface to low-level operations (i.e., memory management + * and stream i/o). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /************************************************************************* + * + * @macro: + * FT_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing type + * definitions related to glyph images (i.e., bitmaps, outlines, + * scan-converter parameters). + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * basic data types defined by FreeType~2. + * + * It is included by @FT_FREETYPE_H. + * + */ +#define FT_TYPES_H <freetype/fttypes.h> + + + /************************************************************************* + * + * @macro: + * FT_LIST_H + * + * @description: + * A macro used in #include statements to name the file containing the + * list management API of FreeType~2. + * + * (Most applications will never need to include this file.) + * + */ +#define FT_LIST_H <freetype/ftlist.h> + + + /************************************************************************* + * + * @macro: + * FT_OUTLINE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * scalable outline management API of FreeType~2. + * + */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /************************************************************************* + * + * @macro: + * FT_SIZES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API which manages multiple @FT_Size objects per face. + * + */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /************************************************************************* + * + * @macro: + * FT_MODULE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * module management API of FreeType~2. + * + */ +#define FT_MODULE_H <freetype/ftmodapi.h> + + + /************************************************************************* + * + * @macro: + * FT_RENDER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * renderer module management API of FreeType~2. + * + */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /************************************************************************* + * + * @macro: + * FT_TYPE1_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the Type~1 format. + * + */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_IDS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * enumeration values which identify name strings, languages, encodings, + * etc. This file really contains a _large_ set of constant macro + * definitions, taken from the TrueType and OpenType specifications. + * + */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TABLES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * types and API specific to the TrueType (as well as OpenType) format. + * + */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_TAGS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of TrueType four-byte `tags' which identify blocks in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /************************************************************************* + * + * @macro: + * FT_BDF_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which accesses BDF-specific strings from a + * face. + * + */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /************************************************************************* + * + * @macro: + * FT_CID_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which access CID font information from a + * face. + * + */ +#define FT_CID_H <freetype/ftcid.h> + + + /************************************************************************* + * + * @macro: + * FT_GZIP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports gzip-compressed files. + * + */ +#define FT_GZIP_H <freetype/ftgzip.h> + + + /************************************************************************* + * + * @macro: + * FT_LZW_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports LZW-compressed files. + * + */ +#define FT_LZW_H <freetype/ftlzw.h> + + + /************************************************************************* + * + * @macro: + * FT_BZIP2_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports bzip2-compressed files. + * + */ +#define FT_BZIP2_H <freetype/ftbzip2.h> + + + /************************************************************************* + * + * @macro: + * FT_WINFONTS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports Windows FNT files. + * + */ +#define FT_WINFONTS_H <freetype/ftwinfnt.h> + + + /************************************************************************* + * + * @macro: + * FT_GLYPH_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional glyph management component. + * + */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /************************************************************************* + * + * @macro: + * FT_BITMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional bitmap conversion component. + * + */ +#define FT_BITMAP_H <freetype/ftbitmap.h> + + + /************************************************************************* + * + * @macro: + * FT_BBOX_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional exact bounding box computation routines. + * + */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * API of the optional FreeType~2 cache sub-system. + * + */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /************************************************************************* + * + * @macro: + * FT_CACHE_IMAGE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `glyph image' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for @FT_Glyph elements. You can also + * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to + * store small glyph bitmaps, as it will use less memory. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * glyph image-related cache declarations. + * + */ +#define FT_CACHE_IMAGE_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_SMALL_BITMAPS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `small bitmaps' API of the FreeType~2 cache sub-system. + * + * It is used to define a cache for small glyph bitmaps in a relatively + * memory-efficient way. You can also use the API defined in + * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, + * including scalable outlines. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * small bitmaps-related cache declarations. + * + */ +#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_CACHE_CHARMAP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * `charmap' API of the FreeType~2 cache sub-system. + * + * This macro is deprecated. Simply include @FT_CACHE_H to have all + * charmap-based cache declarations. + * + */ +#define FT_CACHE_CHARMAP_H FT_CACHE_H + + + /************************************************************************* + * + * @macro: + * FT_MAC_H + * + * @description: + * A macro used in #include statements to name the file containing the + * Macintosh-specific FreeType~2 API. The latter is used to access + * fonts embedded in resource forks. + * + * This header file must be explicitly included by client applications + * compiled on the Mac (note that the base API still works though). + * + */ +#define FT_MAC_H <freetype/ftmac.h> + + + /************************************************************************* + * + * @macro: + * FT_MULTIPLE_MASTERS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional multiple-masters management API of FreeType~2. + * + */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /************************************************************************* + * + * @macro: + * FT_SFNT_NAMES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which accesses embedded `name' strings in + * SFNT-based font formats (i.e., TrueType and OpenType). + * + */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + + /************************************************************************* + * + * @macro: + * FT_OPENTYPE_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, + * GPOS, GSUB, JSTF). + * + */ +#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> + + + /************************************************************************* + * + * @macro: + * FT_GX_VALIDATE_H + * + * @description: + * A macro used in #include statements to name the file containing the + * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, + * mort, morx, bsln, just, kern, opbd, trak, prop). + * + */ +#define FT_GX_VALIDATE_H <freetype/ftgxval.h> + + + /************************************************************************* + * + * @macro: + * FT_PFR_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which accesses PFR-specific data. + * + */ +#define FT_PFR_H <freetype/ftpfr.h> + + + /************************************************************************* + * + * @macro: + * FT_STROKER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions to stroke outline paths. + */ +#define FT_STROKER_H <freetype/ftstroke.h> + + + /************************************************************************* + * + * @macro: + * FT_SYNTHESIS_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs artificial obliquing and emboldening. + */ +#define FT_SYNTHESIS_H <freetype/ftsynth.h> + + + /************************************************************************* + * + * @macro: + * FT_XFREE86_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which provides functions specific to the XFree86 and + * X.Org X11 servers. + */ +#define FT_XFREE86_H <freetype/ftxf86.h> + + + /************************************************************************* + * + * @macro: + * FT_TRIGONOMETRY_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs trigonometric computations (e.g., + * cosines and arc tangents). + */ +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> + + + /************************************************************************* + * + * @macro: + * FT_LCD_FILTER_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> + + + /************************************************************************* + * + * @macro: + * FT_UNPATENTED_HINTING_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> + + + /************************************************************************* + * + * @macro: + * FT_INCREMENTAL_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which performs color filtering for subpixel rendering. + */ +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + + + /************************************************************************* + * + * @macro: + * FT_GASP_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns entries from the TrueType GASP table. + */ +#define FT_GASP_H <freetype/ftgasp.h> + + + /************************************************************************* + * + * @macro: + * FT_ADVANCES_H + * + * @description: + * A macro used in #include statements to name the file containing the + * FreeType~2 API which returns individual and ranged glyph advances. + */ +#define FT_ADVANCES_H <freetype/ftadvanc.h> + + + /* */ + +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> + + + /* The internals of the cache sub-system are no longer exposed. We */ + /* default to FT_CACHE_H at the moment just in case, but we know of */ + /* no rogue client that uses them. */ + /* */ +#define FT_CACHE_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> +#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> + + +#define FT_INCREMENTAL_H <freetype/ftincrem.h> + +#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> + + + /* + * Include internal headers definitions from <freetype/internal/...> + * only when building the library. + */ +#ifdef FT2_BUILD_LIBRARY +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H +#endif /* FT2_BUILD_LIBRARY */ + + +#endif /* __FT2_BUILD_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftmodule.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftmodule.h new file mode 100644 index 0000000..76d271a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftmodule.h @@ -0,0 +1,32 @@ +/* + * This file registers the FreeType modules compiled into the library. + * + * If you use GNU make, this file IS NOT USED! Instead, it is created in + * the objects directory (normally `<topdir>/objs/') based on information + * from `<topdir>/modules.cfg'. + * + * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile + * FreeType without GNU make. + * + */ + +FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) +FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) + +/* EOF */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftoption.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftoption.h new file mode 100644 index 0000000..041e24a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftoption.h @@ -0,0 +1,805 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOPTION_H__ +#define __FTOPTION_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory `builds/<system>' by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <freetype/config/ftheader.h> */ + /* */ + /* will use `$BUILD/myftoptions.h' instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <freetype/config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Uncomment the line below if you want to activate sub-pixel rendering */ + /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ + /* */ + /* Note that this feature is covered by several Microsoft patents */ + /* and should not be activated in any default build of the library. */ + /* */ + /* This macro has no impact on the FreeType API, only on its */ + /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ + /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ + /* the original size in case this macro isn't defined; however, each */ + /* triplet of subpixels has R=G=B. */ + /* */ + /* This is done to allow FreeType clients to run unmodified, forcing */ + /* them to display normal gray-level anti-aliased glyphs. */ + /* */ +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file `ftconfig.h' either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ +#undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* If this macro is defined, do not try to use an assembler version of */ + /* performance-critical functions (e.g. FT_MulFix). You should only do */ + /* that to verify that the assembler function works properly, or to */ + /* execute benchmark tests of the various implementations. */ +/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ + + + /*************************************************************************/ + /* */ + /* If this macro is defined, try to use an inlined assembler version of */ + /* the `FT_MulFix' function, which is a `hotspot' when loading and */ + /* hinting glyphs, and which should be executed as fast as possible. */ + /* */ + /* Note that if your compiler or CPU is not supported, this will default */ + /* to the standard and portable implementation found in `ftcalc.c'. */ + /* */ +#define FT_CONFIG_OPTION_INLINE_MULFIX + + + /*************************************************************************/ + /* */ + /* LZW-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `compress' program. This is mostly used to parse many of the PCF */ + /* files that come with various X11 distributions. The implementation */ + /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ + /* (see src/lzw/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_LZW + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this `feature'. See also */ + /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ + /* */ +#define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's `ftgzip' component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* Bzip2-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `bzip2' program. This is mostly used to parse many of the PCF */ + /* files that come with XFree86. The implementation uses `libbz2' to */ + /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ + /* Contrary to gzip, bzip2 currently is not included and need to use */ + /* the system available bzip2 implementation. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_BZIP2 */ + + + /*************************************************************************/ + /* */ + /* Define to disable the use of file stream functions and types, FILE, */ + /* fopen() etc. Enables the use of smaller system libraries on embedded */ + /* systems that have multiple system libraries, some with or without */ + /* file stream support, in the cases where file stream support is not */ + /* necessary such as memory loading of font files. */ + /* */ +/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_EXPORT(x) extern x */ +/* #define FT_EXPORT_DEF(x) x */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `psnames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `psnames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthesize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthesize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ +#define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Guessing methods to access embedded resource forks */ + /* */ + /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ + /* GNU/Linux). */ + /* */ + /* Resource forks which include fonts data are stored sometimes in */ + /* locations which users or developers don't expected. In some cases, */ + /* resource forks start with some offset from the head of a file. In */ + /* other cases, the actual resource fork is stored in file different */ + /* from what the user specifies. If this option is activated, */ + /* FreeType tries to guess whether such offsets or different file */ + /* names must be used. */ + /* */ + /* Note that normal, direct access of resource forks is controlled via */ + /* the FT_CONFIG_OPTION_MAC_FONTS option. */ + /* */ +#ifdef FT_CONFIG_OPTION_MAC_FONTS +#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK +#endif + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This is required by clients supporting document formats which */ + /* supply font data incrementally as the document is parsed, such */ + /* as the Ghostscript interpreter for the PostScript language. */ + /* */ +#define FT_CONFIG_OPTION_INCREMENTAL + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ + /* This must be greater than 4KByte if you use FreeType to rasterize */ + /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ + /* allocation of the render pool. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_LEVEL_ERROR */ +/* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Autofitter debugging */ + /* */ + /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ + /* control the autofitter behaviour for debugging purposes with global */ + /* boolean variables (consequently, you should *never* enable this */ + /* while compiling in `release' mode): */ + /* */ + /* _af_debug_disable_horz_hints */ + /* _af_debug_disable_vert_hints */ + /* _af_debug_disable_blue_hints */ + /* */ + /* Additionally, the following functions provide dumps of various */ + /* internal autofit structures to stdout (using `printf'): */ + /* */ + /* af_glyph_hints_dump_points */ + /* af_glyph_hints_dump_segments */ + /* af_glyph_hints_dump_edges */ + /* */ + /* As an argument, they use another global variable: */ + /* */ + /* _af_debug_hints */ + /* */ + /* Please have a look at the `ftgrid' demo program to see how those */ + /* variables and macros should be used. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_AUTOFIT */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Position Independent Code */ + /* */ + /* If this macro is set (which is _not_ the default), FreeType2 will */ + /* avoid creating constants that require address fixups. Instead the */ + /* constants will be moved into a struct and additional intialization */ + /* code will be used. */ + /* */ + /* Setting this macro is needed for systems that prohibit address */ + /* fixups, such as BREW. */ + /* */ +/* #define FT_CONFIG_OPTION_PIC */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `freetype/ftsnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ + /* of the TrueType bytecode interpreter is used that doesn't implement */ + /* any of the patented opcodes and algorithms. The patents related to */ + /* TrueType hinting have expired worldwide since May 2010; this option */ + /* is now deprecated. */ + /* */ + /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ + /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ + /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ + /* */ + /* This macro is only useful for a small number of font files (mostly */ + /* for Asian scripts) that require bytecode interpretation to properly */ + /* load glyphs. For all other fonts, this produces unpleasant results, */ + /* thus the unpatented interpreter is never used to load glyphs from */ + /* TrueType fonts unless one of the following two options is used. */ + /* */ + /* - The unpatented interpreter is explicitly activated by the user */ + /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ + /* when opening the FT_Face. */ + /* */ + /* - FreeType detects that the FT_Face corresponds to one of the */ + /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */ + /* contains a hard-coded list of font names and other matching */ + /* parameters (see function `tt_face_init' in file */ + /* `src/truetype/ttobjs.c'). */ + /* */ + /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */ + /* */ + /* { */ + /* FT_Parameter parameter; */ + /* FT_Open_Args open_args; */ + /* */ + /* */ + /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */ + /* */ + /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ + /* open_args.pathname = my_font_pathname; */ + /* open_args.num_params = 1; */ + /* open_args.params = ¶meter; */ + /* */ + /* error = FT_Open_Face( library, &open_args, index, &face ); */ + /* ... */ + /* } */ + /* */ +/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ + /* bytecode interpreter with a huge switch statement, rather than a call */ + /* table. This results in smaller and faster code for a number of */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scaling */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://www.microsoft.com/typography/otspec/glyf.htm */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ + /* support for Apple's distortable font technology (fvar, gvar, cvar, */ + /* and avar tables). This has many similarities to Type 1 Multiple */ + /* Masters support. */ + /* */ +#define TT_CONFIG_OPTION_GX_VAR_SUPPORT + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ + /* an embedded `BDF ' table within SFNT-based bitmap formats. */ + /* */ +#define TT_CONFIG_OPTION_BDF + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ + /* support. */ + /* */ +#define AF_CONFIG_OPTION_CJK + + /*************************************************************************/ + /* */ + /* Compile autofit module with Indic script support. */ + /* */ +#define AF_CONFIG_OPTION_INDIC + + /*************************************************************************/ + /* */ + /* Compile autofit module with warp hinting. The idea of the warping */ + /* code is to slightly scale and shift a glyph within a single dimension */ + /* so that as much of its segments are aligned (more or less) on the */ + /* grid. To find out the optimal scaling and shifting value, various */ + /* parameter combinations are tried and scored. */ + /* */ + /* This experimental option is only active if the render mode is */ + /* FT_RENDER_MODE_LIGHT. */ + /* */ +/* #define AF_CONFIG_OPTION_USE_WARPER */ + + /* */ + + + /* + * Define this variable if you want to keep the layout of internal + * structures that was used prior to FreeType 2.2. This also compiles in + * a few obsolete functions to avoid linking problems on typical Unix + * distributions. + * + * For embedded systems or building a new distribution from scratch, it + * is recommended to disable the macro since it reduces the library's code + * size and activates a few memory-saving optimizations as well. + */ +#define FT_CONFIG_OPTION_OLD_INTERNALS + + + /* + * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), + * we restrict the number of charmaps in a font. The current API of + * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API + * takes charcode only. To determine the passed value is for cmap_index + * or charcode, the possible cmap_index is restricted not to exceed + * the minimum possible charcode by a rogue client. It is also very + * unlikely that a rogue client is interested in Unicode values 0 to 15. + * + * NOTE: The original threshold was 4 deduced from popular number of + * cmap subtables in UCS-4 TrueType fonts, but now it is not + * irregular for OpenType fonts to have more than 4 subtables, + * because variation selector subtables are available for Apple + * and Microsoft platforms. + */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_MAX_CHARMAP_CACHEABLE 15 +#endif + + + /* + * This macro is defined if either unpatented or native TrueType + * hinting is requested by the definitions above. + */ +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER +#undef TT_CONFIG_OPTION_UNPATENTED_HINTING +#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING +#define TT_USE_BYTECODE_INTERPRETER +#endif + +FT_END_HEADER + + +#endif /* __FTOPTION_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftstdlib.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftstdlib.h new file mode 100644 index 0000000..11d5d0e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/config/ftstdlib.h @@ -0,0 +1,174 @@ +/***************************************************************************/ +/* */ +/* ftstdlib.h */ +/* */ +/* ANSI-specific library and header configuration file (specification */ +/* only). */ +/* */ +/* Copyright 2002-2007, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to group all #includes to the ANSI C library that */ + /* FreeType normally requires. It also defines macros to rename the */ + /* standard functions within the FreeType source code. */ + /* */ + /* Load a file which defines __FTSTDLIB_H__ before this one to override */ + /* it. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSTDLIB_H__ +#define __FTSTDLIB_H__ + + +#include <stddef.h> + +#define ft_ptrdiff_t ptrdiff_t + + + /**********************************************************************/ + /* */ + /* integer limits */ + /* */ + /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ + /* of `int' and `long' in bytes at compile-time. So far, this works */ + /* for all platforms the library has been tested on. */ + /* */ + /* Note that on the extremely rare platforms that do not provide */ + /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ + /* old Crays where `int' is 36 bits), we do not make any guarantee */ + /* about the correct behaviour of FT2 with all fonts. */ + /* */ + /* In these case, `ftconfig.h' will refuse to compile anyway with a */ + /* message like `couldn't find 32-bit type' or something similar. */ + /* */ + /**********************************************************************/ + + +#include <limits.h> + +#define FT_CHAR_BIT CHAR_BIT +#define FT_USHORT_MAX USHRT_MAX +#define FT_INT_MAX INT_MAX +#define FT_INT_MIN INT_MIN +#define FT_UINT_MAX UINT_MAX +#define FT_ULONG_MAX ULONG_MAX + + + /**********************************************************************/ + /* */ + /* character and string processing */ + /* */ + /**********************************************************************/ + + +#include <string.h> + +#define ft_memchr memchr +#define ft_memcmp memcmp +#define ft_memcpy memcpy +#define ft_memmove memmove +#define ft_memset memset +#define ft_strcat strcat +#define ft_strcmp strcmp +#define ft_strcpy strcpy +#define ft_strlen strlen +#define ft_strncmp strncmp +#define ft_strncpy strncpy +#define ft_strrchr strrchr +#define ft_strstr strstr + + + /**********************************************************************/ + /* */ + /* file handling */ + /* */ + /**********************************************************************/ + + +#include <stdio.h> + +#define FT_FILE FILE +#define ft_fclose fclose +#define ft_fopen fopen +#define ft_fread fread +#define ft_fseek fseek +#define ft_ftell ftell +#define ft_sprintf sprintf + + + /**********************************************************************/ + /* */ + /* sorting */ + /* */ + /**********************************************************************/ + + +#include <stdlib.h> + +#define ft_qsort qsort + + + /**********************************************************************/ + /* */ + /* memory allocation */ + /* */ + /**********************************************************************/ + + +#define ft_scalloc calloc +#define ft_sfree free +#define ft_smalloc malloc +#define ft_srealloc realloc + + + /**********************************************************************/ + /* */ + /* miscellaneous */ + /* */ + /**********************************************************************/ + + +#define ft_atol atol +#define ft_labs labs + + + /**********************************************************************/ + /* */ + /* execution control */ + /* */ + /**********************************************************************/ + + +#include <setjmp.h> + +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ + /* jmp_buf is defined as a macro */ + /* on certain platforms */ + +#define ft_longjmp longjmp +#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */ + + + /* the following is only used for debugging purposes, i.e., if */ + /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ + +#include <stdarg.h> + + +#endif /* __FTSTDLIB_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/freetype.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/freetype.h new file mode 100644 index 0000000..f1f55f0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/freetype.h @@ -0,0 +1,3921 @@ +/***************************************************************************/ +/* */ +/* freetype.h */ +/* */ +/* FreeType high-level API and common types (specification only). */ +/* */ +/* Copyright 1996-2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FT_FREETYPE_H +#error "`ft2build.h' hasn't been included yet!" +#error "Please always use macros to include FreeType header files." +#error "Example:" +#error " #include <ft2build.h>" +#error " #include FT_FREETYPE_H" +#endif + + +#ifndef __FREETYPE_H__ +#define __FREETYPE_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_ERRORS_H +#include FT_TYPES_H + + +FT_BEGIN_HEADER + + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* user_allocation */ + /* */ + /* <Title> */ + /* User allocation */ + /* */ + /* <Abstract> */ + /* How client applications should allocate FreeType data structures. */ + /* */ + /* <Description> */ + /* FreeType assumes that structures allocated by the user and passed */ + /* as arguments are zeroed out except for the actual data. In other */ + /* words, it is recommended to use `calloc' (or variants of it) */ + /* instead of `malloc' for allocation. */ + /* */ + /*************************************************************************/ + + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S I C T Y P E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* base_interface */ + /* */ + /* <Title> */ + /* Base Interface */ + /* */ + /* <Abstract> */ + /* The FreeType~2 base font interface. */ + /* */ + /* <Description> */ + /* This section describes the public high-level API of FreeType~2. */ + /* */ + /* <Order> */ + /* FT_Library */ + /* FT_Face */ + /* FT_Size */ + /* FT_GlyphSlot */ + /* FT_CharMap */ + /* FT_Encoding */ + /* */ + /* FT_FaceRec */ + /* */ + /* FT_FACE_FLAG_SCALABLE */ + /* FT_FACE_FLAG_FIXED_SIZES */ + /* FT_FACE_FLAG_FIXED_WIDTH */ + /* FT_FACE_FLAG_HORIZONTAL */ + /* FT_FACE_FLAG_VERTICAL */ + /* FT_FACE_FLAG_SFNT */ + /* FT_FACE_FLAG_KERNING */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS */ + /* FT_FACE_FLAG_GLYPH_NAMES */ + /* FT_FACE_FLAG_EXTERNAL_STREAM */ + /* FT_FACE_FLAG_FAST_GLYPHS */ + /* FT_FACE_FLAG_HINTER */ + /* */ + /* FT_STYLE_FLAG_BOLD */ + /* FT_STYLE_FLAG_ITALIC */ + /* */ + /* FT_SizeRec */ + /* FT_Size_Metrics */ + /* */ + /* FT_GlyphSlotRec */ + /* FT_Glyph_Metrics */ + /* FT_SubGlyph */ + /* */ + /* FT_Bitmap_Size */ + /* */ + /* FT_Init_FreeType */ + /* FT_Done_FreeType */ + /* */ + /* FT_New_Face */ + /* FT_Done_Face */ + /* FT_New_Memory_Face */ + /* FT_Open_Face */ + /* FT_Open_Args */ + /* FT_Parameter */ + /* FT_Attach_File */ + /* FT_Attach_Stream */ + /* */ + /* FT_Set_Char_Size */ + /* FT_Set_Pixel_Sizes */ + /* FT_Request_Size */ + /* FT_Select_Size */ + /* FT_Size_Request_Type */ + /* FT_Size_Request */ + /* FT_Set_Transform */ + /* FT_Load_Glyph */ + /* FT_Get_Char_Index */ + /* FT_Get_Name_Index */ + /* FT_Load_Char */ + /* */ + /* FT_OPEN_MEMORY */ + /* FT_OPEN_STREAM */ + /* FT_OPEN_PATHNAME */ + /* FT_OPEN_DRIVER */ + /* FT_OPEN_PARAMS */ + /* */ + /* FT_LOAD_DEFAULT */ + /* FT_LOAD_RENDER */ + /* FT_LOAD_MONOCHROME */ + /* FT_LOAD_LINEAR_DESIGN */ + /* FT_LOAD_NO_SCALE */ + /* FT_LOAD_NO_HINTING */ + /* FT_LOAD_NO_BITMAP */ + /* FT_LOAD_CROP_BITMAP */ + /* */ + /* FT_LOAD_VERTICAL_LAYOUT */ + /* FT_LOAD_IGNORE_TRANSFORM */ + /* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */ + /* FT_LOAD_FORCE_AUTOHINT */ + /* FT_LOAD_NO_RECURSE */ + /* FT_LOAD_PEDANTIC */ + /* */ + /* FT_LOAD_TARGET_NORMAL */ + /* FT_LOAD_TARGET_LIGHT */ + /* FT_LOAD_TARGET_MONO */ + /* FT_LOAD_TARGET_LCD */ + /* FT_LOAD_TARGET_LCD_V */ + /* */ + /* FT_Render_Glyph */ + /* FT_Render_Mode */ + /* FT_Get_Kerning */ + /* FT_Kerning_Mode */ + /* FT_Get_Track_Kerning */ + /* FT_Get_Glyph_Name */ + /* FT_Get_Postscript_Name */ + /* */ + /* FT_CharMapRec */ + /* FT_Select_Charmap */ + /* FT_Set_Charmap */ + /* FT_Get_Charmap_Index */ + /* */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */ + /* FT_FSTYPE_EDITABLE_EMBEDDING */ + /* FT_FSTYPE_NO_SUBSETTING */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */ + /* */ + /* FT_Get_FSType_Flags */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Glyph_Metrics */ + /* */ + /* <Description> */ + /* A structure used to model the metrics of a single glyph. The */ + /* values are expressed in 26.6 fractional pixel format; if the flag */ + /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ + /* are expressed in font units instead. */ + /* */ + /* <Fields> */ + /* width :: */ + /* The glyph's width. */ + /* */ + /* height :: */ + /* The glyph's height. */ + /* */ + /* horiBearingX :: */ + /* Left side bearing for horizontal layout. */ + /* */ + /* horiBearingY :: */ + /* Top side bearing for horizontal layout. */ + /* */ + /* horiAdvance :: */ + /* Advance width for horizontal layout. */ + /* */ + /* vertBearingX :: */ + /* Left side bearing for vertical layout. */ + /* */ + /* vertBearingY :: */ + /* Top side bearing for vertical layout. Larger positive values */ + /* mean further below the vertical glyph origin. */ + /* */ + /* vertAdvance :: */ + /* Advance height for vertical layout. Positive values mean the */ + /* glyph has a positive advance downward. */ + /* */ + /* <Note> */ + /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ + /* dimensions of the hinted glyph (in case hinting is applicable). */ + /* */ + typedef struct FT_Glyph_Metrics_ + { + FT_Pos width; + FT_Pos height; + + FT_Pos horiBearingX; + FT_Pos horiBearingY; + FT_Pos horiAdvance; + + FT_Pos vertBearingX; + FT_Pos vertBearingY; + FT_Pos vertAdvance; + + } FT_Glyph_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap_Size */ + /* */ + /* <Description> */ + /* This structure models the metrics of a bitmap strike (i.e., a set */ + /* of glyphs for a given point size and resolution) in a bitmap font. */ + /* It is used for the `available_sizes' field of @FT_Face. */ + /* */ + /* <Fields> */ + /* height :: The vertical distance, in pixels, between two */ + /* consecutive baselines. It is always positive. */ + /* */ + /* width :: The average width, in pixels, of all glyphs in the */ + /* strike. */ + /* */ + /* size :: The nominal size of the strike in 26.6 fractional */ + /* points. This field is not very useful. */ + /* */ + /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ + /* pixels. */ + /* */ + /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ + /* pixels. */ + /* */ + /* <Note> */ + /* Windows FNT: */ + /* The nominal size given in a FNT font is not reliable. Thus when */ + /* the driver finds it incorrect, it sets `size' to some calculated */ + /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ + /* height given in the font, respectively. */ + /* */ + /* TrueType embedded bitmaps: */ + /* `size', `width', and `height' values are not contained in the */ + /* bitmap strike itself. They are computed from the global font */ + /* parameters. */ + /* */ + typedef struct FT_Bitmap_Size_ + { + FT_Short height; + FT_Short width; + + FT_Pos size; + + FT_Pos x_ppem; + FT_Pos y_ppem; + + } FT_Bitmap_Size; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Library */ + /* */ + /* <Description> */ + /* A handle to a FreeType library instance. Each `library' is */ + /* completely independent from the others; it is the `root' of a set */ + /* of objects like fonts, faces, sizes, etc. */ + /* */ + /* It also embeds a memory manager (see @FT_Memory), as well as a */ + /* scan-line converter object (see @FT_Raster). */ + /* */ + /* For multi-threading applications each thread should have its own */ + /* FT_Library object. */ + /* */ + /* <Note> */ + /* Library objects are normally created by @FT_Init_FreeType, and */ + /* destroyed with @FT_Done_FreeType. */ + /* */ + typedef struct FT_LibraryRec_ *FT_Library; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Module */ + /* */ + /* <Description> */ + /* A handle to a given FreeType module object. Each module can be a */ + /* font driver, a renderer, or anything else that provides services */ + /* to the formers. */ + /* */ + typedef struct FT_ModuleRec_* FT_Module; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Driver */ + /* */ + /* <Description> */ + /* A handle to a given FreeType font driver object. Each font driver */ + /* is a special module capable of creating faces from font files. */ + /* */ + typedef struct FT_DriverRec_* FT_Driver; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Renderer */ + /* */ + /* <Description> */ + /* A handle to a given FreeType renderer. A renderer is a special */ + /* module in charge of converting a glyph image to a bitmap, when */ + /* necessary. Each renderer supports a given glyph image format, and */ + /* one or more target surface depths. */ + /* */ + typedef struct FT_RendererRec_* FT_Renderer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face */ + /* */ + /* <Description> */ + /* A handle to a given typographic face object. A face object models */ + /* a given typeface, in a given style. */ + /* */ + /* <Note> */ + /* Each face object also owns a single @FT_GlyphSlot object, as well */ + /* as one or more @FT_Size objects. */ + /* */ + /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ + /* a given filepathname or a custom input stream. */ + /* */ + /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ + /* */ + /* <Also> */ + /* See @FT_FaceRec for the publicly accessible fields of a given face */ + /* object. */ + /* */ + typedef struct FT_FaceRec_* FT_Face; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size */ + /* */ + /* <Description> */ + /* A handle to an object used to model a face scaled to a given */ + /* character size. */ + /* */ + /* <Note> */ + /* Each @FT_Face has an _active_ @FT_Size object that is used by */ + /* functions like @FT_Load_Glyph to determine the scaling */ + /* transformation which is used to load and hint glyphs and metrics. */ + /* */ + /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ + /* @FT_Request_Size or even @FT_Select_Size to change the content */ + /* (i.e., the scaling values) of the active @FT_Size. */ + /* */ + /* You can use @FT_New_Size to create additional size objects for a */ + /* given @FT_Face, but they won't be used by other functions until */ + /* you activate it through @FT_Activate_Size. Only one size can be */ + /* activated at any given time per face. */ + /* */ + /* <Also> */ + /* See @FT_SizeRec for the publicly accessible fields of a given size */ + /* object. */ + /* */ + typedef struct FT_SizeRec_* FT_Size; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_GlyphSlot */ + /* */ + /* <Description> */ + /* A handle to a given `glyph slot'. A slot is a container where it */ + /* is possible to load any of the glyphs contained in its parent */ + /* face. */ + /* */ + /* In other words, each time you call @FT_Load_Glyph or */ + /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ + /* i.e., the glyph's metrics, its image (bitmap or outline), and */ + /* other control information. */ + /* */ + /* <Also> */ + /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ + /* */ + typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_CharMap */ + /* */ + /* <Description> */ + /* A handle to a given character map. A charmap is used to translate */ + /* character codes in a given encoding into glyph indexes for its */ + /* parent's face. Some font formats may provide several charmaps per */ + /* font. */ + /* */ + /* Each face object owns zero or more charmaps, but only one of them */ + /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ + /* */ + /* The list of available charmaps in a face is available through the */ + /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ + /* */ + /* The currently active charmap is available as `face->charmap'. */ + /* You should call @FT_Set_Charmap to change it. */ + /* */ + /* <Note> */ + /* When a new face is created (either through @FT_New_Face or */ + /* @FT_Open_Face), the library looks for a Unicode charmap within */ + /* the list and automatically activates it. */ + /* */ + /* <Also> */ + /* See @FT_CharMapRec for the publicly accessible fields of a given */ + /* character map. */ + /* */ + typedef struct FT_CharMapRec_* FT_CharMap; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_ENC_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags into an unsigned long. It is */ + /* used to define `encoding' identifiers (see @FT_Encoding). */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_ENC_TAG( value, a, b, c, d ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ + +#ifndef FT_ENC_TAG +#define FT_ENC_TAG( value, a, b, c, d ) \ + value = ( ( (FT_UInt32)(a) << 24 ) | \ + ( (FT_UInt32)(b) << 16 ) | \ + ( (FT_UInt32)(c) << 8 ) | \ + (FT_UInt32)(d) ) + +#endif /* FT_ENC_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Encoding */ + /* */ + /* <Description> */ + /* An enumeration used to specify character sets supported by */ + /* charmaps. Used in the @FT_Select_Charmap API function. */ + /* */ + /* <Note> */ + /* Despite the name, this enumeration lists specific character */ + /* repertories (i.e., charsets), and not text encoding methods (e.g., */ + /* UTF-8, UTF-16, etc.). */ + /* */ + /* Other encodings might be defined in the future. */ + /* */ + /* <Values> */ + /* FT_ENCODING_NONE :: */ + /* The encoding value~0 is reserved. */ + /* */ + /* FT_ENCODING_UNICODE :: */ + /* Corresponds to the Unicode character set. This value covers */ + /* all versions of the Unicode repertoire, including ASCII and */ + /* Latin-1. Most fonts include a Unicode charmap, but not all */ + /* of them. */ + /* */ + /* For example, if you want to access Unicode value U+1F028 (and */ + /* the font contains it), use value 0x1F028 as the input value for */ + /* @FT_Get_Char_Index. */ + /* */ + /* FT_ENCODING_MS_SYMBOL :: */ + /* Corresponds to the Microsoft Symbol encoding, used to encode */ + /* mathematical symbols in the 32..255 character code range. For */ + /* more information, see `http://www.ceviz.net/symbol.htm'. */ + /* */ + /* FT_ENCODING_SJIS :: */ + /* Corresponds to Japanese SJIS encoding. More info at */ + /* at `http://langsupport.japanreference.com/encoding.shtml'. */ + /* See note on multi-byte encodings below. */ + /* */ + /* FT_ENCODING_GB2312 :: */ + /* Corresponds to an encoding system for Simplified Chinese as used */ + /* used in mainland China. */ + /* */ + /* FT_ENCODING_BIG5 :: */ + /* Corresponds to an encoding system for Traditional Chinese as */ + /* used in Taiwan and Hong Kong. */ + /* */ + /* FT_ENCODING_WANSUNG :: */ + /* Corresponds to the Korean encoding system known as Wansung. */ + /* For more information see */ + /* `http://www.microsoft.com/typography/unicode/949.txt'. */ + /* */ + /* FT_ENCODING_JOHAB :: */ + /* The Korean standard character set (KS~C 5601-1992), which */ + /* corresponds to MS Windows code page 1361. This character set */ + /* includes all possible Hangeul character combinations. */ + /* */ + /* FT_ENCODING_ADOBE_LATIN_1 :: */ + /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ + /* PostScript font. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_ADOBE_STANDARD :: */ + /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_EXPERT :: */ + /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ + /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ + /* codes. */ + /* */ + /* FT_ENCODING_ADOBE_CUSTOM :: */ + /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ + /* */ + /* FT_ENCODING_APPLE_ROMAN :: */ + /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ + /* and OpenType fonts contain a charmap for this encoding, since */ + /* older versions of Mac OS are able to use it. */ + /* */ + /* FT_ENCODING_OLD_LATIN_2 :: */ + /* This value is deprecated and was never used nor reported by */ + /* FreeType. Don't use or test for it. */ + /* */ + /* FT_ENCODING_MS_SJIS :: */ + /* Same as FT_ENCODING_SJIS. Deprecated. */ + /* */ + /* FT_ENCODING_MS_GB2312 :: */ + /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* */ + /* FT_ENCODING_MS_BIG5 :: */ + /* Same as FT_ENCODING_BIG5. Deprecated. */ + /* */ + /* FT_ENCODING_MS_WANSUNG :: */ + /* Same as FT_ENCODING_WANSUNG. Deprecated. */ + /* */ + /* FT_ENCODING_MS_JOHAB :: */ + /* Same as FT_ENCODING_JOHAB. Deprecated. */ + /* */ + /* <Note> */ + /* By default, FreeType automatically synthesizes a Unicode charmap */ + /* for PostScript fonts, using their glyph names dictionaries. */ + /* However, it also reports the encodings defined explicitly in the */ + /* font file, for the cases when they are needed, with the Adobe */ + /* values as well. */ + /* */ + /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ + /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ + /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ + /* which encoding is really present. If, for example, the */ + /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ + /* the font is encoded in KOI8-R. */ + /* */ + /* FT_ENCODING_NONE is always set (with a single exception) by the */ + /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ + /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ + /* which encoding is really present. For example, */ + /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ + /* Russian). */ + /* */ + /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ + /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ + /* FT_ENCODING_APPLE_ROMAN). */ + /* */ + /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ + /* @FT_Get_CMap_Language_ID to query the Mac language ID which may */ + /* be needed to be able to distinguish Apple encoding variants. See */ + /* */ + /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */ + /* */ + /* to get an idea how to do that. Basically, if the language ID */ + /* is~0, don't use it, otherwise subtract 1 from the language ID. */ + /* Then examine `encoding_id'. If, for example, `encoding_id' is */ + /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ + /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ + /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* variant the Arabic encoding. */ + /* */ + typedef enum FT_Encoding_ + { + FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), + + FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), + FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), + + FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), + FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), + FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), + FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), + + /* for backwards compatibility */ + FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, + FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, + FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, + FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, + + FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), + FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), + + FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), + + FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) + + } FT_Encoding; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_encoding_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated; use the corresponding @FT_Encoding */ + /* values instead. */ + /* */ +#define ft_encoding_none FT_ENCODING_NONE +#define ft_encoding_unicode FT_ENCODING_UNICODE +#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL +#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 +#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB + +#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD +#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT +#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM +#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_CharMapRec */ + /* */ + /* <Description> */ + /* The base charmap structure. */ + /* */ + /* <Fields> */ + /* face :: A handle to the parent face object. */ + /* */ + /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ + /* this with @FT_Select_Charmap. */ + /* */ + /* platform_id :: An ID number describing the platform for the */ + /* following encoding ID. This comes directly from */ + /* the TrueType specification and should be emulated */ + /* for other formats. */ + /* */ + /* encoding_id :: A platform specific encoding number. This also */ + /* comes from the TrueType specification and should be */ + /* emulated similarly. */ + /* */ + typedef struct FT_CharMapRec_ + { + FT_Face face; + FT_Encoding encoding; + FT_UShort platform_id; + FT_UShort encoding_id; + + } FT_CharMapRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* B A S E O B J E C T C L A S S E S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Face_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ + /* model private data of a given @FT_Face object. */ + /* */ + /* This structure might change between releases of FreeType~2 and is */ + /* not generally available to client applications. */ + /* */ + typedef struct FT_Face_InternalRec_* FT_Face_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_FaceRec */ + /* */ + /* <Description> */ + /* FreeType root face class structure. A face object models a */ + /* typeface in a font file. */ + /* */ + /* <Fields> */ + /* num_faces :: The number of faces in the font file. Some */ + /* font formats can have multiple faces in */ + /* a font file. */ + /* */ + /* face_index :: The index of the face in the font file. It */ + /* is set to~0 if there is only one face in */ + /* the font file. */ + /* */ + /* face_flags :: A set of bit flags that give important */ + /* information about the face; see */ + /* @FT_FACE_FLAG_XXX for the details. */ + /* */ + /* style_flags :: A set of bit flags indicating the style of */ + /* the face; see @FT_STYLE_FLAG_XXX for the */ + /* details. */ + /* */ + /* num_glyphs :: The number of glyphs in the face. If the */ + /* face is scalable and has sbits (see */ + /* `num_fixed_sizes'), it is set to the number */ + /* of outline glyphs. */ + /* */ + /* For CID-keyed fonts, this value gives the */ + /* highest CID used in the font. */ + /* */ + /* family_name :: The face's family name. This is an ASCII */ + /* string, usually in English, which describes */ + /* the typeface's family (like `Times New */ + /* Roman', `Bodoni', `Garamond', etc). This */ + /* is a least common denominator used to list */ + /* fonts. Some formats (TrueType & OpenType) */ + /* provide localized and Unicode versions of */ + /* this string. Applications should use the */ + /* format specific interface to access them. */ + /* Can be NULL (e.g., in fonts embedded in a */ + /* PDF file). */ + /* */ + /* style_name :: The face's style name. This is an ASCII */ + /* string, usually in English, which describes */ + /* the typeface's style (like `Italic', */ + /* `Bold', `Condensed', etc). Not all font */ + /* formats provide a style name, so this field */ + /* is optional, and can be set to NULL. As */ + /* for `family_name', some formats provide */ + /* localized and Unicode versions of this */ + /* string. Applications should use the format */ + /* specific interface to access them. */ + /* */ + /* num_fixed_sizes :: The number of bitmap strikes in the face. */ + /* Even if the face is scalable, there might */ + /* still be bitmap strikes, which are called */ + /* `sbits' in that case. */ + /* */ + /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ + /* strikes in the face. It is set to NULL if */ + /* there is no bitmap strike. */ + /* */ + /* num_charmaps :: The number of charmaps in the face. */ + /* */ + /* charmaps :: An array of the charmaps of the face. */ + /* */ + /* generic :: A field reserved for client uses. See the */ + /* @FT_Generic type description. */ + /* */ + /* bbox :: The font bounding box. Coordinates are */ + /* expressed in font units (see */ + /* `units_per_EM'). The box is large enough */ + /* to contain any glyph from the font. Thus, */ + /* `bbox.yMax' can be seen as the `maximal */ + /* ascender', and `bbox.yMin' as the `minimal */ + /* descender'. Only relevant for scalable */ + /* formats. */ + /* */ + /* Note that the bounding box might be off by */ + /* (at least) one pixel for hinted fonts. See */ + /* @FT_Size_Metrics for further discussion. */ + /* */ + /* units_per_EM :: The number of font units per EM square for */ + /* this face. This is typically 2048 for */ + /* TrueType fonts, and 1000 for Type~1 fonts. */ + /* Only relevant for scalable formats. */ + /* */ + /* ascender :: The typographic ascender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMax'. Only relevant for scalable */ + /* formats. */ + /* */ + /* descender :: The typographic descender of the face, */ + /* expressed in font units. For font formats */ + /* not having this information, it is set to */ + /* `bbox.yMin'. Note that this field is */ + /* usually negative. Only relevant for */ + /* scalable formats. */ + /* */ + /* height :: The height is the vertical distance */ + /* between two consecutive baselines, */ + /* expressed in font units. It is always */ + /* positive. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_width :: The maximal advance width, in font units, */ + /* for all glyphs in this face. This can be */ + /* used to make word wrapping computations */ + /* faster. Only relevant for scalable */ + /* formats. */ + /* */ + /* max_advance_height :: The maximal advance height, in font units, */ + /* for all glyphs in this face. This is only */ + /* relevant for vertical layouts, and is set */ + /* to `height' for fonts that do not provide */ + /* vertical metrics. Only relevant for */ + /* scalable formats. */ + /* */ + /* underline_position :: The position, in font units, of the */ + /* underline line for this face. It is the */ + /* center of the underlining stem. Only */ + /* relevant for scalable formats. */ + /* */ + /* underline_thickness :: The thickness, in font units, of the */ + /* underline for this face. Only relevant for */ + /* scalable formats. */ + /* */ + /* glyph :: The face's associated glyph slot(s). */ + /* */ + /* size :: The current active size for this face. */ + /* */ + /* charmap :: The current active charmap for this face. */ + /* */ + /* <Note> */ + /* Fields may be changed after a call to @FT_Attach_File or */ + /* @FT_Attach_Stream. */ + /* */ + typedef struct FT_FaceRec_ + { + FT_Long num_faces; + FT_Long face_index; + + FT_Long face_flags; + FT_Long style_flags; + + FT_Long num_glyphs; + + FT_String* family_name; + FT_String* style_name; + + FT_Int num_fixed_sizes; + FT_Bitmap_Size* available_sizes; + + FT_Int num_charmaps; + FT_CharMap* charmaps; + + FT_Generic generic; + + /*# The following member variables (down to `underline_thickness') */ + /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ + /*# for bitmap fonts. */ + FT_BBox bbox; + + FT_UShort units_per_EM; + FT_Short ascender; + FT_Short descender; + FT_Short height; + + FT_Short max_advance_width; + FT_Short max_advance_height; + + FT_Short underline_position; + FT_Short underline_thickness; + + FT_GlyphSlot glyph; + FT_Size size; + FT_CharMap charmap; + + /*@private begin */ + + FT_Driver driver; + FT_Memory memory; + FT_Stream stream; + + FT_ListRec sizes_list; + + FT_Generic autohint; + void* extensions; + + FT_Face_Internal internal; + + /*@private end */ + + } FT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FACE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `face_flags' field of the */ + /* @FT_FaceRec structure. They inform client applications of */ + /* properties of the corresponding face. */ + /* */ + /* <Values> */ + /* FT_FACE_FLAG_SCALABLE :: */ + /* Indicates that the face contains outline glyphs. This doesn't */ + /* prevent bitmap strikes, i.e., a face can have both this and */ + /* and @FT_FACE_FLAG_FIXED_SIZES set. */ + /* */ + /* FT_FACE_FLAG_FIXED_SIZES :: */ + /* Indicates that the face contains bitmap strikes. See also the */ + /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ + /* */ + /* FT_FACE_FLAG_FIXED_WIDTH :: */ + /* Indicates that the face contains fixed-width characters (like */ + /* Courier, Lucido, MonoType, etc.). */ + /* */ + /* FT_FACE_FLAG_SFNT :: */ + /* Indicates that the face uses the `sfnt' storage scheme. For */ + /* now, this means TrueType and OpenType. */ + /* */ + /* FT_FACE_FLAG_HORIZONTAL :: */ + /* Indicates that the face contains horizontal glyph metrics. This */ + /* should be set for all common formats. */ + /* */ + /* FT_FACE_FLAG_VERTICAL :: */ + /* Indicates that the face contains vertical glyph metrics. This */ + /* is only available in some formats, not all of them. */ + /* */ + /* FT_FACE_FLAG_KERNING :: */ + /* Indicates that the face contains kerning information. If set, */ + /* the kerning distance can be retrieved through the function */ + /* @FT_Get_Kerning. Otherwise the function always return the */ + /* vector (0,0). Note that FreeType doesn't handle kerning data */ + /* from the `GPOS' table (as present in some OpenType fonts). */ + /* */ + /* FT_FACE_FLAG_FAST_GLYPHS :: */ + /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ + /* */ + /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ + /* Indicates that the font contains multiple masters and is capable */ + /* of interpolating between them. See the multiple-masters */ + /* specific API for details. */ + /* */ + /* FT_FACE_FLAG_GLYPH_NAMES :: */ + /* Indicates that the font contains glyph names that can be */ + /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ + /* fonts contain broken glyph name tables. Use the function */ + /* @FT_Has_PS_Glyph_Names when needed. */ + /* */ + /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ + /* Used internally by FreeType to indicate that a face's stream was */ + /* provided by the client application and should not be destroyed */ + /* when @FT_Done_Face is called. Don't read or test this flag. */ + /* */ + /* FT_FACE_FLAG_HINTER :: */ + /* Set if the font driver has a hinting machine of its own. For */ + /* example, with TrueType fonts, it makes sense to use data from */ + /* the SFNT `gasp' table only if the native TrueType hinting engine */ + /* (with the bytecode interpreter) is available and active. */ + /* */ + /* FT_FACE_FLAG_CID_KEYED :: */ + /* Set if the font is CID-keyed. In that case, the font is not */ + /* accessed by glyph indices but by CID values. For subsetted */ + /* CID-keyed fonts this has the consequence that not all index */ + /* values are a valid argument to FT_Load_Glyph. Only the CID */ + /* values for which corresponding glyphs in the subsetted font */ + /* exist make FT_Load_Glyph return successfully; in all other cases */ + /* you get an `FT_Err_Invalid_Argument' error. */ + /* */ + /* Note that CID-keyed fonts which are in an SFNT wrapper don't */ + /* have this flag set since the glyphs are accessed in the normal */ + /* way (using contiguous indices); the `CID-ness' isn't visible to */ + /* the application. */ + /* */ + /* FT_FACE_FLAG_TRICKY :: */ + /* Set if the font is `tricky', this is, it always needs the */ + /* font format's native hinting engine to get a reasonable result. */ + /* A typical example is the Chinese font `mingli.ttf' which uses */ + /* TrueType bytecode instructions to move and scale all of its */ + /* subglyphs. */ + /* */ + /* It is not possible to autohint such fonts using */ + /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ + /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ + /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ + /* probably never want this except for demonstration purposes. */ + /* */ + /* Currently, there are about a dozen TrueType fonts in the list of */ + /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ + /* */ +#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) +#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) +#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) +#define FT_FACE_FLAG_SFNT ( 1L << 3 ) +#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) +#define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) +#define FT_FACE_FLAG_KERNING ( 1L << 6 ) +#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) +#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) +#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) +#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) +#define FT_FACE_FLAG_HINTER ( 1L << 11 ) +#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) +#define FT_FACE_FLAG_TRICKY ( 1L << 13 ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_HORIZONTAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * horizontal metrics (this is true for all font formats though). + * + * @also: + * @FT_HAS_VERTICAL can be used to check for vertical metrics. + * + */ +#define FT_HAS_HORIZONTAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_HORIZONTAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_VERTICAL( face ) + * + * @description: + * A macro that returns true whenever a face object contains vertical + * metrics. + * + */ +#define FT_HAS_VERTICAL( face ) \ + ( face->face_flags & FT_FACE_FLAG_VERTICAL ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_KERNING( face ) + * + * @description: + * A macro that returns true whenever a face object contains kerning + * data that can be accessed with @FT_Get_Kerning. + * + */ +#define FT_HAS_KERNING( face ) \ + ( face->face_flags & FT_FACE_FLAG_KERNING ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SCALABLE( face ) + * + * @description: + * A macro that returns true whenever a face object contains a scalable + * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, + * and PFR font formats. + * + */ +#define FT_IS_SCALABLE( face ) \ + ( face->face_flags & FT_FACE_FLAG_SCALABLE ) + + + /************************************************************************* + * + * @macro: + * FT_IS_SFNT( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font + * whose format is based on the SFNT storage scheme. This usually + * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded + * bitmap fonts. + * + * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and + * @FT_TRUETYPE_TABLES_H are available. + * + */ +#define FT_IS_SFNT( face ) \ + ( face->face_flags & FT_FACE_FLAG_SFNT ) + + + /************************************************************************* + * + * @macro: + * FT_IS_FIXED_WIDTH( face ) + * + * @description: + * A macro that returns true whenever a face object contains a font face + * that contains fixed-width (or `monospace', `fixed-pitch', etc.) + * glyphs. + * + */ +#define FT_IS_FIXED_WIDTH( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FIXED_SIZES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * embedded bitmaps. See the `available_sizes' field of the + * @FT_FaceRec structure. + * + */ +#define FT_HAS_FIXED_SIZES( face ) \ + ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_FAST_GLYPHS( face ) + * + * @description: + * Deprecated. + * + */ +#define FT_HAS_FAST_GLYPHS( face ) 0 + + + /************************************************************************* + * + * @macro: + * FT_HAS_GLYPH_NAMES( face ) + * + * @description: + * A macro that returns true whenever a face object contains some glyph + * names that can be accessed through @FT_Get_Glyph_Name. + * + */ +#define FT_HAS_GLYPH_NAMES( face ) \ + ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) + + + /************************************************************************* + * + * @macro: + * FT_HAS_MULTIPLE_MASTERS( face ) + * + * @description: + * A macro that returns true whenever a face object contains some + * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H + * are then available to choose the exact design you want. + * + */ +#define FT_HAS_MULTIPLE_MASTERS( face ) \ + ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) + + + /************************************************************************* + * + * @macro: + * FT_IS_CID_KEYED( face ) + * + * @description: + * A macro that returns true whenever a face object contains a CID-keyed + * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more + * details. + * + * If this macro is true, all functions defined in @FT_CID_H are + * available. + * + */ +#define FT_IS_CID_KEYED( face ) \ + ( face->face_flags & FT_FACE_FLAG_CID_KEYED ) + + + /************************************************************************* + * + * @macro: + * FT_IS_TRICKY( face ) + * + * @description: + * A macro that returns true whenever a face represents a `tricky' font. + * See the discussion of @FT_FACE_FLAG_TRICKY for more details. + * + */ +#define FT_IS_TRICKY( face ) \ + ( face->face_flags & FT_FACE_FLAG_TRICKY ) + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_STYLE_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit-flags used to indicate the style of a given face. */ + /* These are used in the `style_flags' field of @FT_FaceRec. */ + /* */ + /* <Values> */ + /* FT_STYLE_FLAG_ITALIC :: */ + /* Indicates that a given face style is italic or oblique. */ + /* */ + /* FT_STYLE_FLAG_BOLD :: */ + /* Indicates that a given face is bold. */ + /* */ + /* <Note> */ + /* The style information as provided by FreeType is very basic. More */ + /* details are beyond the scope and should be done on a higher level */ + /* (for example, by analyzing various fields of the `OS/2' table in */ + /* SFNT based fonts). */ + /* */ +#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) +#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Size_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ + /* model private data of a given @FT_Size object. */ + /* */ + typedef struct FT_Size_InternalRec_* FT_Size_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Metrics */ + /* */ + /* <Description> */ + /* The size metrics structure gives the metrics of a size object. */ + /* */ + /* <Fields> */ + /* x_ppem :: The width of the scaled EM square in pixels, hence */ + /* the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal width'. */ + /* */ + /* y_ppem :: The height of the scaled EM square in pixels, */ + /* hence the term `ppem' (pixels per EM). It is also */ + /* referred to as `nominal height'. */ + /* */ + /* x_scale :: A 16.16 fractional scaling value used to convert */ + /* horizontal metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* y_scale :: A 16.16 fractional scaling value used to convert */ + /* vertical metrics from font units to 26.6 */ + /* fractional pixels. Only relevant for scalable */ + /* font formats. */ + /* */ + /* ascender :: The ascender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* descender :: The descender in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* height :: The height in 26.6 fractional pixels. See */ + /* @FT_FaceRec for the details. */ + /* */ + /* max_advance :: The maximal advance width in 26.6 fractional */ + /* pixels. See @FT_FaceRec for the details. */ + /* */ + /* <Note> */ + /* The scaling values, if relevant, are determined first during a */ + /* size changing operation. The remaining fields are then set by the */ + /* driver. For scalable formats, they are usually set to scaled */ + /* values of the corresponding fields in @FT_FaceRec. */ + /* */ + /* Note that due to glyph hinting, these values might not be exact */ + /* for certain fonts. Thus they must be treated as unreliable */ + /* with an error margin of at least one pixel! */ + /* */ + /* Indeed, the only way to get the exact metrics is to render _all_ */ + /* glyphs. As this would be a definite performance hit, it is up to */ + /* client applications to perform such computations. */ + /* */ + /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ + /* */ + typedef struct FT_Size_Metrics_ + { + FT_UShort x_ppem; /* horizontal pixels per EM */ + FT_UShort y_ppem; /* vertical pixels per EM */ + + FT_Fixed x_scale; /* scaling values used to convert font */ + FT_Fixed y_scale; /* units to 26.6 fractional pixels */ + + FT_Pos ascender; /* ascender in 26.6 frac. pixels */ + FT_Pos descender; /* descender in 26.6 frac. pixels */ + FT_Pos height; /* text height in 26.6 frac. pixels */ + FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ + + } FT_Size_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SizeRec */ + /* */ + /* <Description> */ + /* FreeType root size class structure. A size object models a face */ + /* object at a given size. */ + /* */ + /* <Fields> */ + /* face :: Handle to the parent face object. */ + /* */ + /* generic :: A typeless pointer, which is unused by the FreeType */ + /* library or any of its drivers. It can be used by */ + /* client applications to link their own data to each size */ + /* object. */ + /* */ + /* metrics :: Metrics for this size object. This field is read-only. */ + /* */ + typedef struct FT_SizeRec_ + { + FT_Face face; /* parent face object */ + FT_Generic generic; /* generic pointer for client uses */ + FT_Size_Metrics metrics; /* size metrics */ + FT_Size_Internal internal; + + } FT_SizeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SubGlyph */ + /* */ + /* <Description> */ + /* The subglyph structure is an internal object used to describe */ + /* subglyphs (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The subglyph implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + /* You can however retrieve subglyph information with */ + /* @FT_Get_SubGlyph_Info. */ + /* */ + typedef struct FT_SubGlyphRec_* FT_SubGlyph; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Slot_Internal */ + /* */ + /* <Description> */ + /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ + /* model private data of a given @FT_GlyphSlot object. */ + /* */ + typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphSlotRec */ + /* */ + /* <Description> */ + /* FreeType root glyph slot class structure. A glyph slot is a */ + /* container where individual glyphs can be loaded, be they in */ + /* outline or bitmap format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library instance */ + /* this slot belongs to. */ + /* */ + /* face :: A handle to the parent face object. */ + /* */ + /* next :: In some cases (like some font tools), several */ + /* glyph slots per face object can be a good */ + /* thing. As this is rare, the glyph slots are */ + /* listed through a direct, single-linked list */ + /* using its `next' field. */ + /* */ + /* generic :: A typeless pointer which is unused by the */ + /* FreeType library or any of its drivers. It */ + /* can be used by client applications to link */ + /* their own data to each glyph slot object. */ + /* */ + /* metrics :: The metrics of the last loaded glyph in the */ + /* slot. The returned values depend on the last */ + /* load flags (see the @FT_Load_Glyph API */ + /* function) and can be expressed either in 26.6 */ + /* fractional pixels or font units. */ + /* */ + /* Note that even when the glyph image is */ + /* transformed, the metrics are not. */ + /* */ + /* linearHoriAdvance :: The advance width of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* linearVertAdvance :: The advance height of the unhinted glyph. */ + /* Its value is expressed in 16.16 fractional */ + /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ + /* when loading the glyph. This field can be */ + /* important to perform correct WYSIWYG layout. */ + /* Only relevant for outline glyphs. */ + /* */ + /* advance :: This shorthand is, depending on */ + /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ + /* advance width for the glyph (in 26.6 */ + /* fractional pixel format). As specified with */ + /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ + /* `horiAdvance' or the `vertAdvance' value of */ + /* `metrics' field. */ + /* */ + /* format :: This field indicates the format of the image */ + /* contained in the glyph slot. Typically */ + /* @FT_GLYPH_FORMAT_BITMAP, */ + /* @FT_GLYPH_FORMAT_OUTLINE, or */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ + /* possible. */ + /* */ + /* bitmap :: This field is used as a bitmap descriptor */ + /* when the slot format is */ + /* @FT_GLYPH_FORMAT_BITMAP. Note that the */ + /* address and content of the bitmap buffer can */ + /* change between calls of @FT_Load_Glyph and a */ + /* few other functions. */ + /* */ + /* bitmap_left :: This is the bitmap's left bearing expressed */ + /* in integer pixels. Of course, this is only */ + /* valid if the format is */ + /* @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* bitmap_top :: This is the bitmap's top bearing expressed in */ + /* integer pixels. Remember that this is the */ + /* distance from the baseline to the top-most */ + /* glyph scanline, upwards y~coordinates being */ + /* *positive*. */ + /* */ + /* outline :: The outline descriptor for the current glyph */ + /* image if its format is */ + /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ + /* loaded, `outline' can be transformed, */ + /* distorted, embolded, etc. However, it must */ + /* not be freed. */ + /* */ + /* num_subglyphs :: The number of subglyphs in a composite glyph. */ + /* This field is only valid for the composite */ + /* glyph format that should normally only be */ + /* loaded with the @FT_LOAD_NO_RECURSE flag. */ + /* For now this is internal to FreeType. */ + /* */ + /* subglyphs :: An array of subglyph descriptors for */ + /* composite glyphs. There are `num_subglyphs' */ + /* elements in there. Currently internal to */ + /* FreeType. */ + /* */ + /* control_data :: Certain font drivers can also return the */ + /* control data for a given glyph image (e.g. */ + /* TrueType bytecode, Type~1 charstrings, etc.). */ + /* This field is a pointer to such data. */ + /* */ + /* control_len :: This is the length in bytes of the control */ + /* data. */ + /* */ + /* other :: Really wicked formats can use this pointer to */ + /* present their own glyph image to client */ + /* applications. Note that the application */ + /* needs to know about the image format. */ + /* */ + /* lsb_delta :: The difference between hinted and unhinted */ + /* left side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* rsb_delta :: The difference between hinted and unhinted */ + /* right side bearing while autohinting is */ + /* active. Zero otherwise. */ + /* */ + /* <Note> */ + /* If @FT_Load_Glyph is called with default flags (see */ + /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ + /* its native format (e.g., an outline glyph for TrueType and Type~1 */ + /* formats). */ + /* */ + /* This image can later be converted into a bitmap by calling */ + /* @FT_Render_Glyph. This function finds the current renderer for */ + /* the native image's format, then invokes it. */ + /* */ + /* The renderer is in charge of transforming the native image through */ + /* the slot's face transformation fields, then converting it into a */ + /* bitmap that is returned in `slot->bitmap'. */ + /* */ + /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ + /* to specify the position of the bitmap relative to the current pen */ + /* position (e.g., coordinates (0,0) on the baseline). Of course, */ + /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ + /* */ + /* <Note> */ + /* Here a small pseudo code fragment which shows how to use */ + /* `lsb_delta' and `rsb_delta': */ + /* */ + /* { */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* <compute kern between current and previous glyph and add it to */ + /* `origin_x'> */ + /* */ + /* <load glyph with `FT_Load_Glyph'> */ + /* */ + /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ + /* origin_x -= 64; */ + /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ + /* origin_x += 64; */ + /* */ + /* prev_rsb_delta = face->glyph->rsb_delta; */ + /* */ + /* <save glyph image, or render glyph, or ...> */ + /* */ + /* origin_x += face->glyph->advance.x; */ + /* endfor */ + /* } */ + /* */ + typedef struct FT_GlyphSlotRec_ + { + FT_Library library; + FT_Face face; + FT_GlyphSlot next; + FT_UInt reserved; /* retained for binary compatibility */ + FT_Generic generic; + + FT_Glyph_Metrics metrics; + FT_Fixed linearHoriAdvance; + FT_Fixed linearVertAdvance; + FT_Vector advance; + + FT_Glyph_Format format; + + FT_Bitmap bitmap; + FT_Int bitmap_left; + FT_Int bitmap_top; + + FT_Outline outline; + + FT_UInt num_subglyphs; + FT_SubGlyph subglyphs; + + void* control_data; + long control_len; + + FT_Pos lsb_delta; + FT_Pos rsb_delta; + + void* other; + + FT_Slot_Internal internal; + + } FT_GlyphSlotRec; + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* F U N C T I O N S */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Init_FreeType */ + /* */ + /* <Description> */ + /* Initialize a new FreeType library object. The set of modules */ + /* that are registered by this function is determined at build time. */ + /* */ + /* <Output> */ + /* alibrary :: A handle to a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case you want to provide your own memory allocating routines, */ + /* use @FT_New_Library instead, followed by a call to */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Init_FreeType( FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_FreeType */ + /* */ + /* <Description> */ + /* Destroy a given FreeType library object and all of its children, */ + /* including resources, drivers, faces, sizes, etc. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_FreeType( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OPEN_XXX */ + /* */ + /* <Description> */ + /* A list of bit-field constants used within the `flags' field of the */ + /* @FT_Open_Args structure. */ + /* */ + /* <Values> */ + /* FT_OPEN_MEMORY :: This is a memory-based stream. */ + /* */ + /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ + /* */ + /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ + /* name. */ + /* */ + /* FT_OPEN_DRIVER :: Use the `driver' field. */ + /* */ + /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ + /* */ + /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */ + /* */ + /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */ + /* */ + /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */ + /* */ + /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */ + /* */ + /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */ + /* */ + /* <Note> */ + /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ + /* flags are mutually exclusive. */ + /* */ +#define FT_OPEN_MEMORY 0x1 +#define FT_OPEN_STREAM 0x2 +#define FT_OPEN_PATHNAME 0x4 +#define FT_OPEN_DRIVER 0x8 +#define FT_OPEN_PARAMS 0x10 + +#define ft_open_memory FT_OPEN_MEMORY /* deprecated */ +#define ft_open_stream FT_OPEN_STREAM /* deprecated */ +#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */ +#define ft_open_driver FT_OPEN_DRIVER /* deprecated */ +#define ft_open_params FT_OPEN_PARAMS /* deprecated */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Parameter */ + /* */ + /* <Description> */ + /* A simple structure used to pass more or less generic parameters to */ + /* @FT_Open_Face. */ + /* */ + /* <Fields> */ + /* tag :: A four-byte identification tag. */ + /* */ + /* data :: A pointer to the parameter data. */ + /* */ + /* <Note> */ + /* The ID and function of parameters are driver-specific. See the */ + /* various FT_PARAM_TAG_XXX flags for more information. */ + /* */ + typedef struct FT_Parameter_ + { + FT_ULong tag; + FT_Pointer data; + + } FT_Parameter; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Open_Args */ + /* */ + /* <Description> */ + /* A structure used to indicate how to open a new font file or */ + /* stream. A pointer to such a structure can be used as a parameter */ + /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ + /* */ + /* <Fields> */ + /* flags :: A set of bit flags indicating how to use the */ + /* structure. */ + /* */ + /* memory_base :: The first byte of the file in memory. */ + /* */ + /* memory_size :: The size in bytes of the file in memory. */ + /* */ + /* pathname :: A pointer to an 8-bit file pathname. */ + /* */ + /* stream :: A handle to a source stream object. */ + /* */ + /* driver :: This field is exclusively used by @FT_Open_Face; */ + /* it simply specifies the font driver to use to open */ + /* the face. If set to~0, FreeType tries to load the */ + /* face with each one of the drivers in its list. */ + /* */ + /* num_params :: The number of extra parameters. */ + /* */ + /* params :: Extra parameters passed to the font driver when */ + /* opening a new face. */ + /* */ + /* <Note> */ + /* The stream type is determined by the contents of `flags' which */ + /* are tested in the following order by @FT_Open_Face: */ + /* */ + /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */ + /* memory file of `memory_size' bytes, located at `memory_address'. */ + /* The data are are not copied, and the client is responsible for */ + /* releasing and destroying them _after_ the corresponding call to */ + /* @FT_Done_Face. */ + /* */ + /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */ + /* custom input stream `stream' is used. */ + /* */ + /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */ + /* is a normal file and use `pathname' to open it. */ + /* */ + /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to */ + /* open the file with the driver whose handler is in `driver'. */ + /* */ + /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */ + /* `num_params' and `params' is used. They are ignored otherwise. */ + /* */ + /* Ideally, both the `pathname' and `params' fields should be tagged */ + /* as `const'; this is missing for API backwards compatibility. In */ + /* other words, applications should treat them as read-only. */ + /* */ + typedef struct FT_Open_Args_ + { + FT_UInt flags; + const FT_Byte* memory_base; + FT_Long memory_size; + FT_String* pathname; + FT_Stream stream; + FT_Module driver; + FT_Int num_params; + FT_Parameter* params; + + } FT_Open_Args; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font by its pathname. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* pathname :: A path to the font file. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face( FT_Library library, + const char* filepathname, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory_Face */ + /* */ + /* <Description> */ + /* This function calls @FT_Open_Face to open a font which has been */ + /* loaded into memory. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* file_base :: A pointer to the beginning of the font data. */ + /* */ + /* file_size :: The size of the memory chunk used by the font data. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See @FT_Open_Face for more details. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You must not deallocate the memory before calling @FT_Done_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Memory_Face( FT_Library library, + const FT_Byte* file_base, + FT_Long file_size, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Open_Face */ + /* */ + /* <Description> */ + /* Create a face object from a given resource described by */ + /* @FT_Open_Args. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* args :: A pointer to an `FT_Open_Args' structure which must */ + /* be filled by the caller. */ + /* */ + /* face_index :: The index of the face within the font. The first */ + /* face has index~0. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. If `face_index' is */ + /* greater than or equal to zero, it must be non-NULL. */ + /* See note below. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Unlike FreeType 1.x, this function automatically creates a glyph */ + /* slot for the face object which can be accessed directly through */ + /* `face->glyph'. */ + /* */ + /* FT_Open_Face can be used to quickly check whether the font */ + /* format of a given font resource is supported by FreeType. If the */ + /* `face_index' field is negative, the function's return value is~0 */ + /* if the font format is recognized, or non-zero otherwise; */ + /* the function returns a more or less empty face handle in `*aface' */ + /* (if `aface' isn't NULL). The only useful field in this special */ + /* case is `face->num_faces' which gives the number of faces within */ + /* the font file. After examination, the returned @FT_Face structure */ + /* should be deallocated with a call to @FT_Done_Face. */ + /* */ + /* Each new face object created with this function also owns a */ + /* default @FT_Size object, accessible as `face->size'. */ + /* */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Open_Face( FT_Library library, + const FT_Open_Args* args, + FT_Long face_index, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_File */ + /* */ + /* <Description> */ + /* This function calls @FT_Attach_Stream to attach a file. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* filepathname :: The pathname. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_File( FT_Face face, + const char* filepathname ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Attach_Stream */ + /* */ + /* <Description> */ + /* `Attach' data to a face object. Normally, this is used to read */ + /* additional information for the face object. For example, you can */ + /* attach an AFM file that comes with a Type~1 font to get the */ + /* kerning values and other metrics. */ + /* */ + /* <InOut> */ + /* face :: The target face object. */ + /* */ + /* <Input> */ + /* parameters :: A pointer to @FT_Open_Args which must be filled by */ + /* the caller. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The meaning of the `attach' (i.e., what really happens when the */ + /* new file is read) is not fixed by FreeType itself. It really */ + /* depends on the font format (and thus the font driver). */ + /* */ + /* Client applications are expected to know what they are doing */ + /* when invoking this function. Most drivers simply do not implement */ + /* file attachments. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Attach_Stream( FT_Face face, + FT_Open_Args* parameters ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Face */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Face structure */ + /* is created. This function increments the counter. @FT_Done_Face */ + /* then only destroys a face if the counter is~1, otherwise it simply */ + /* decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures which */ + /* reference @FT_Face objects. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Face */ + /* */ + /* <Description> */ + /* Discard a given face object, as well as all of its child slots and */ + /* sizes. */ + /* */ + /* <Input> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Face. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Face( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Size */ + /* */ + /* <Description> */ + /* Select a bitmap strike. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* strike_index :: The index of the bitmap strike in the */ + /* `available_sizes' field of @FT_FaceRec structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Size( FT_Face face, + FT_Int strike_index ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Size_Request_Type */ + /* */ + /* <Description> */ + /* An enumeration type that lists the supported size request types. */ + /* */ + /* <Values> */ + /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ + /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ + /* used to determine both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ + /* The real dimension. The sum of the the `ascender' and (minus */ + /* of) the `descender' fields of @FT_FaceRec are used to determine */ + /* both scaling values. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_BBOX :: */ + /* The font bounding box. The width and height of the `bbox' field */ + /* of @FT_FaceRec are used to determine the horizontal and vertical */ + /* scaling value, respectively. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_CELL :: */ + /* The `max_advance_width' field of @FT_FaceRec is used to */ + /* determine the horizontal scaling value; the vertical scaling */ + /* value is determined the same way as */ + /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ + /* values are set to the smaller one. This type is useful if you */ + /* want to specify the font size for, say, a window of a given */ + /* dimension and 80x24 cells. */ + /* */ + /* FT_SIZE_REQUEST_TYPE_SCALES :: */ + /* Specify the scaling values directly. */ + /* */ + /* <Note> */ + /* The above descriptions only apply to scalable formats. For bitmap */ + /* formats, the behaviour is up to the driver. */ + /* */ + /* See the note section of @FT_Size_Metrics if you wonder how size */ + /* requesting relates to scaling values. */ + /* */ + typedef enum FT_Size_Request_Type_ + { + FT_SIZE_REQUEST_TYPE_NOMINAL, + FT_SIZE_REQUEST_TYPE_REAL_DIM, + FT_SIZE_REQUEST_TYPE_BBOX, + FT_SIZE_REQUEST_TYPE_CELL, + FT_SIZE_REQUEST_TYPE_SCALES, + + FT_SIZE_REQUEST_TYPE_MAX + + } FT_Size_Request_Type; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_RequestRec */ + /* */ + /* <Description> */ + /* A structure used to model a size request. */ + /* */ + /* <Fields> */ + /* type :: See @FT_Size_Request_Type. */ + /* */ + /* width :: The desired width. */ + /* */ + /* height :: The desired height. */ + /* */ + /* horiResolution :: The horizontal resolution. If set to zero, */ + /* `width' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* vertResolution :: The vertical resolution. If set to zero, */ + /* `height' is treated as a 26.6 fractional pixel */ + /* value. */ + /* */ + /* <Note> */ + /* If `width' is zero, then the horizontal scaling value is set equal */ + /* to the vertical scaling value, and vice versa. */ + /* */ + typedef struct FT_Size_RequestRec_ + { + FT_Size_Request_Type type; + FT_Long width; + FT_Long height; + FT_UInt horiResolution; + FT_UInt vertResolution; + + } FT_Size_RequestRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_Request */ + /* */ + /* <Description> */ + /* A handle to a size request structure. */ + /* */ + typedef struct FT_Size_RequestRec_ *FT_Size_Request; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Request_Size */ + /* */ + /* <Description> */ + /* Resize the scale of the active @FT_Size object in a face. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* req :: A pointer to a @FT_Size_RequestRec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Although drivers may select the bitmap strike matching the */ + /* request, you should not rely on this if you intend to select a */ + /* particular bitmap strike. Use @FT_Select_Size instead in that */ + /* case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Request_Size( FT_Face face, + FT_Size_Request req ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Char_Size */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in points). */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object. */ + /* */ + /* <Input> */ + /* char_width :: The nominal width, in 26.6 fractional points. */ + /* */ + /* char_height :: The nominal height, in 26.6 fractional points. */ + /* */ + /* horz_resolution :: The horizontal resolution in dpi. */ + /* */ + /* vert_resolution :: The vertical resolution in dpi. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If either the character width or height is zero, it is set equal */ + /* to the other value. */ + /* */ + /* If either the horizontal or vertical resolution is zero, it is set */ + /* equal to the other value. */ + /* */ + /* A character width or height smaller than 1pt is set to 1pt; if */ + /* both resolution values are zero, they are set to 72dpi. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Char_Size( FT_Face face, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Pixel_Sizes */ + /* */ + /* <Description> */ + /* This function calls @FT_Request_Size to request the nominal size */ + /* (in pixels). */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Input> */ + /* pixel_width :: The nominal width, in pixels. */ + /* */ + /* pixel_height :: The nominal height, in pixels. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Pixel_Sizes( FT_Face face, + FT_UInt pixel_width, + FT_UInt pixel_height ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Glyph */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object. */ + /* */ + /* <InOut> */ + /* face :: A handle to the target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* glyph_index :: The index of the glyph in the font file. For */ + /* CID-keyed fonts (either in PS or in CFF format) */ + /* this argument specifies the CID value. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The loaded glyph may be transformed. See @FT_Set_Transform for */ + /* the details. */ + /* */ + /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ + /* returned for invalid CID values (this is, for CID values which */ + /* don't have a corresponding glyph in the font). See the discussion */ + /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Glyph( FT_Face face, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Load_Char */ + /* */ + /* <Description> */ + /* A function used to load a single glyph into the glyph slot of a */ + /* face object, according to its character code. */ + /* */ + /* <InOut> */ + /* face :: A handle to a target face object where the glyph */ + /* is loaded. */ + /* */ + /* <Input> */ + /* char_code :: The glyph's character code, according to the */ + /* current charmap used in the face. */ + /* */ + /* load_flags :: A flag indicating what to load for this glyph. The */ + /* @FT_LOAD_XXX constants can be used to control the */ + /* glyph loading process (e.g., whether the outline */ + /* should be scaled, whether to load bitmaps or not, */ + /* whether to hint the outline, etc). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Load_Char( FT_Face face, + FT_ULong char_code, + FT_Int32 load_flags ); + + + /************************************************************************* + * + * @enum: + * FT_LOAD_XXX + * + * @description: + * A list of bit-field constants used with @FT_Load_Glyph to indicate + * what kind of operations to perform during glyph loading. + * + * @values: + * FT_LOAD_DEFAULT :: + * Corresponding to~0, this value is used as the default glyph load + * operation. In this case, the following happens: + * + * 1. FreeType looks for a bitmap for the glyph corresponding to the + * face's current size. If one is found, the function returns. + * The bitmap data can be accessed from the glyph slot (see note + * below). + * + * 2. If no embedded bitmap is searched or found, FreeType looks for a + * scalable outline. If one is found, it is loaded from the font + * file, scaled to device pixels, then `hinted' to the pixel grid + * in order to optimize it. The outline data can be accessed from + * the glyph slot (see note below). + * + * Note that by default, the glyph loader doesn't render outlines into + * bitmaps. The following flags are used to modify this default + * behaviour to more specific and useful cases. + * + * FT_LOAD_NO_SCALE :: + * Don't scale the outline glyph loaded, but keep it in font units. + * + * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and + * unsets @FT_LOAD_RENDER. + * + * FT_LOAD_NO_HINTING :: + * Disable hinting. This generally generates `blurrier' bitmap glyph + * when the glyph is rendered in any of the anti-aliased modes. See + * also the note below. + * + * This flag is implied by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_RENDER :: + * Call @FT_Render_Glyph after the glyph is loaded. By default, the + * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be + * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. + * + * This flag is unset by @FT_LOAD_NO_SCALE. + * + * FT_LOAD_NO_BITMAP :: + * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this + * flag. + * + * @FT_LOAD_NO_SCALE always sets this flag. + * + * FT_LOAD_VERTICAL_LAYOUT :: + * Load the glyph for vertical text layout. _Don't_ use it as it is + * problematic currently. + * + * FT_LOAD_FORCE_AUTOHINT :: + * Indicates that the auto-hinter is preferred over the font's native + * hinter. See also the note below. + * + * FT_LOAD_CROP_BITMAP :: + * Indicates that the font driver should crop the loaded bitmap glyph + * (i.e., remove all space around its black bits). Not all drivers + * implement this. + * + * FT_LOAD_PEDANTIC :: + * Indicates that the font driver should perform pedantic verifications + * during glyph loading. This is mostly used to detect broken glyphs + * in fonts. By default, FreeType tries to handle broken fonts also. + * + * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: + * Ignored. Deprecated. + * + * FT_LOAD_NO_RECURSE :: + * This flag is only used internally. It merely indicates that the + * font driver should not load composite glyphs recursively. Instead, + * it should set the `num_subglyph' and `subglyphs' values of the + * glyph slot accordingly, and set `glyph->format' to + * @FT_GLYPH_FORMAT_COMPOSITE. + * + * The description of sub-glyphs is not available to client + * applications for now. + * + * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. + * + * FT_LOAD_IGNORE_TRANSFORM :: + * Indicates that the transform matrix set by @FT_Set_Transform should + * be ignored. + * + * FT_LOAD_MONOCHROME :: + * This flag is used with @FT_LOAD_RENDER to indicate that you want to + * render an outline glyph to a 1-bit monochrome bitmap glyph, with + * 8~pixels packed into each byte of the bitmap data. + * + * Note that this has no effect on the hinting algorithm used. You + * should rather use @FT_LOAD_TARGET_MONO so that the + * monochrome-optimized hinting algorithm is used. + * + * FT_LOAD_LINEAR_DESIGN :: + * Indicates that the `linearHoriAdvance' and `linearVertAdvance' + * fields of @FT_GlyphSlotRec should be kept in font units. See + * @FT_GlyphSlotRec for details. + * + * FT_LOAD_NO_AUTOHINT :: + * Disable auto-hinter. See also the note below. + * + * @note: + * By default, hinting is enabled and the font's native hinter (see + * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can + * disable hinting by setting @FT_LOAD_NO_HINTING or change the + * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set + * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be + * used at all. + * + * See the description of @FT_FACE_FLAG_TRICKY for a special exception + * (affecting only a handful of Asian fonts). + * + * Besides deciding which hinter to use, you can also decide which + * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. + * + */ +#define FT_LOAD_DEFAULT 0x0 +#define FT_LOAD_NO_SCALE 0x1 +#define FT_LOAD_NO_HINTING 0x2 +#define FT_LOAD_RENDER 0x4 +#define FT_LOAD_NO_BITMAP 0x8 +#define FT_LOAD_VERTICAL_LAYOUT 0x10 +#define FT_LOAD_FORCE_AUTOHINT 0x20 +#define FT_LOAD_CROP_BITMAP 0x40 +#define FT_LOAD_PEDANTIC 0x80 +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200 +#define FT_LOAD_NO_RECURSE 0x400 +#define FT_LOAD_IGNORE_TRANSFORM 0x800 +#define FT_LOAD_MONOCHROME 0x1000 +#define FT_LOAD_LINEAR_DESIGN 0x2000 +#define FT_LOAD_NO_AUTOHINT 0x8000U + + /* */ + + /* used internally only by certain font drivers! */ +#define FT_LOAD_ADVANCE_ONLY 0x100 +#define FT_LOAD_SBITS_ONLY 0x4000 + + + /************************************************************************** + * + * @enum: + * FT_LOAD_TARGET_XXX + * + * @description: + * A list of values that are used to select a specific hinting algorithm + * to use by the hinter. You should OR one of these values to your + * `load_flags' when calling @FT_Load_Glyph. + * + * Note that font's native hinters may ignore the hinting algorithm you + * have specified (e.g., the TrueType bytecode interpreter). You can set + * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. + * + * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it + * always implies @FT_LOAD_FORCE_AUTOHINT. + * + * @values: + * FT_LOAD_TARGET_NORMAL :: + * This corresponds to the default hinting algorithm, optimized for + * standard gray-level rendering. For monochrome output, use + * @FT_LOAD_TARGET_MONO instead. + * + * FT_LOAD_TARGET_LIGHT :: + * A lighter hinting algorithm for non-monochrome modes. Many + * generated glyphs are more fuzzy but better resemble its original + * shape. A bit like rendering on Mac OS~X. + * + * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT. + * + * FT_LOAD_TARGET_MONO :: + * Strong hinting algorithm that should only be used for monochrome + * output. The result is probably unpleasant if the glyph is rendered + * in non-monochrome modes. + * + * FT_LOAD_TARGET_LCD :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally + * decimated LCD displays. + * + * FT_LOAD_TARGET_LCD_V :: + * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically + * decimated LCD displays. + * + * @note: + * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your + * `load_flags'. They can't be ORed. + * + * If @FT_LOAD_RENDER is also set, the glyph is rendered in the + * corresponding mode (i.e., the mode which matches the used algorithm + * best) unless @FT_LOAD_MONOCHROME is set. + * + * You can use a hinting algorithm that doesn't correspond to the same + * rendering mode. As an example, it is possible to use the `light' + * hinting algorithm and have the results rendered in horizontal LCD + * pixel mode, with code like + * + * { + * FT_Load_Glyph( face, glyph_index, + * load_flags | FT_LOAD_TARGET_LIGHT ); + * + * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); + * } + * + */ +#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) + +#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) +#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) +#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) +#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) +#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) + + + /************************************************************************** + * + * @macro: + * FT_LOAD_TARGET_MODE + * + * @description: + * Return the @FT_Render_Mode corresponding to a given + * @FT_LOAD_TARGET_XXX value. + * + */ +#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Transform */ + /* */ + /* <Description> */ + /* A function used to set the transformation that is applied to glyph */ + /* images when they are loaded into a glyph slot through */ + /* @FT_Load_Glyph. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ + /* the identity matrix. */ + /* delta :: A pointer to the translation vector. Use~0 for the null */ + /* vector. */ + /* */ + /* <Note> */ + /* The transformation is only applied to scalable image formats after */ + /* the glyph has been loaded. It means that hinting is unaltered by */ + /* the transformation and is performed on the character size given in */ + /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ + /* */ + /* Note that this also transforms the `face.glyph.advance' field, but */ + /* *not* the values in `face.glyph.metrics'. */ + /* */ + FT_EXPORT( void ) + FT_Set_Transform( FT_Face face, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Render_Mode */ + /* */ + /* <Description> */ + /* An enumeration type that lists the render modes supported by */ + /* FreeType~2. Each mode corresponds to a specific type of scanline */ + /* conversion performed on the outline. */ + /* */ + /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ + /* field in the @FT_GlyphSlotRec structure gives the format of the */ + /* returned bitmap. */ + /* */ + /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */ + /* */ + /* <Values> */ + /* FT_RENDER_MODE_NORMAL :: */ + /* This is the default render mode; it corresponds to 8-bit */ + /* anti-aliased bitmaps. */ + /* */ + /* FT_RENDER_MODE_LIGHT :: */ + /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ + /* defined as a separate value because render modes are also used */ + /* indirectly to define hinting algorithm selectors. See */ + /* @FT_LOAD_TARGET_XXX for details. */ + /* */ + /* FT_RENDER_MODE_MONO :: */ + /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ + /* opacity). */ + /* */ + /* FT_RENDER_MODE_LCD :: */ + /* This mode corresponds to horizontal RGB and BGR sub-pixel */ + /* displays like LCD screens. It produces 8-bit bitmaps that are */ + /* 3~times the width of the original glyph outline in pixels, and */ + /* which use the @FT_PIXEL_MODE_LCD mode. */ + /* */ + /* FT_RENDER_MODE_LCD_V :: */ + /* This mode corresponds to vertical RGB and BGR sub-pixel displays */ + /* (like PDA screens, rotated LCD displays, etc.). It produces */ + /* 8-bit bitmaps that are 3~times the height of the original */ + /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ + /* */ + /* <Note> */ + /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ + /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ + /* (not active in the default builds). It is up to the caller to */ + /* either call @FT_Library_SetLcdFilter (if available) or do the */ + /* filtering itself. */ + /* */ + /* The selected render mode only affects vector glyphs of a font. */ + /* Embedded bitmaps often have a different pixel mode like */ + /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ + /* them into 8-bit pixmaps. */ + /* */ + typedef enum FT_Render_Mode_ + { + FT_RENDER_MODE_NORMAL = 0, + FT_RENDER_MODE_LIGHT, + FT_RENDER_MODE_MONO, + FT_RENDER_MODE_LCD, + FT_RENDER_MODE_LCD_V, + + FT_RENDER_MODE_MAX + + } FT_Render_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_render_mode_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated. Use the corresponding */ + /* @FT_Render_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */ + /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */ + /* */ +#define ft_render_mode_normal FT_RENDER_MODE_NORMAL +#define ft_render_mode_mono FT_RENDER_MODE_MONO + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Render_Glyph */ + /* */ + /* <Description> */ + /* Convert a given glyph image to a bitmap. It does so by inspecting */ + /* the glyph image format, finding the relevant renderer, and */ + /* invoking it. */ + /* */ + /* <InOut> */ + /* slot :: A handle to the glyph slot containing the image to */ + /* convert. */ + /* */ + /* <Input> */ + /* render_mode :: This is the render mode used to render the glyph */ + /* image into a bitmap. See @FT_Render_Mode for a */ + /* list of possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Render_Glyph( FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Kerning_Mode */ + /* */ + /* <Description> */ + /* An enumeration used to specify which kerning values to return in */ + /* @FT_Get_Kerning. */ + /* */ + /* <Values> */ + /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */ + /* distances (value is~0). */ + /* */ + /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */ + /* distances. */ + /* */ + /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ + /* units. */ + /* */ + typedef enum FT_Kerning_Mode_ + { + FT_KERNING_DEFAULT = 0, + FT_KERNING_UNFITTED, + FT_KERNING_UNSCALED + + } FT_Kerning_Mode; + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_default */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */ + /* instead. */ + /* */ +#define ft_kerning_default FT_KERNING_DEFAULT + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_unfitted */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */ + /* instead. */ + /* */ +#define ft_kerning_unfitted FT_KERNING_UNFITTED + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* ft_kerning_unscaled */ + /* */ + /* <Description> */ + /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */ + /* instead. */ + /* */ +#define ft_kerning_unscaled FT_KERNING_UNSCALED + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Kerning */ + /* */ + /* <Description> */ + /* Return the kerning vector between two glyphs of a same face. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* left_glyph :: The index of the left glyph in the kern pair. */ + /* */ + /* right_glyph :: The index of the right glyph in the kern pair. */ + /* */ + /* kern_mode :: See @FT_Kerning_Mode for more information. */ + /* Determines the scale and dimension of the returned */ + /* kerning vector. */ + /* */ + /* <Output> */ + /* akerning :: The kerning vector. This is either in font units */ + /* or in pixels (26.6 format) for scalable formats, */ + /* and in pixels for fixed-sizes formats. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* Only horizontal layouts (left-to-right & right-to-left) are */ + /* supported by this method. Other layouts, or more sophisticated */ + /* kernings, are out of the scope of this API function -- they can be */ + /* implemented through format-specific interfaces. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Kerning( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_UInt kern_mode, + FT_Vector *akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Track_Kerning */ + /* */ + /* <Description> */ + /* Return the track kerning for a given face object at a given size. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* point_size :: The point size in 16.16 fractional points. */ + /* */ + /* degree :: The degree of tightness. */ + /* */ + /* <Output> */ + /* akerning :: The kerning in 16.16 fractional points. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Track_Kerning( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII name of a given glyph in a face. This only */ + /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ + /* */ + /* <Input> */ + /* face :: A handle to a source face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* buffer_max :: The maximal number of bytes available in the */ + /* buffer. */ + /* */ + /* <Output> */ + /* buffer :: A pointer to a target buffer where the name is */ + /* copied to. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error is returned if the face doesn't provide glyph names or if */ + /* the glyph index is invalid. In all cases of failure, the first */ + /* byte of `buffer' is set to~0 to indicate an empty name. */ + /* */ + /* The glyph name is truncated to fit within the buffer if it is too */ + /* long. The returned string is always zero-terminated. */ + /* */ + /* Be aware that FreeType reorders glyph indices internally so that */ + /* glyph index~0 always corresponds to the `missing glyph' (called */ + /* `.notdef'). */ + /* */ + /* This function is not compiled within the library if the config */ + /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */ + /* `include/freetype/config/ftoptions.h'. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph_Name( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Postscript_Name */ + /* */ + /* <Description> */ + /* Retrieve the ASCII PostScript name of a given face, if available. */ + /* This only works with PostScript and TrueType fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to the face's PostScript name. NULL if unavailable. */ + /* */ + /* <Note> */ + /* The returned pointer is owned by the face and is destroyed with */ + /* it. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_Postscript_Name( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Select_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap by its encoding tag (as listed in */ + /* `freetype.h'). */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* encoding :: A handle to the selected encoding. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if no charmap in the face */ + /* corresponds to the encoding queried here. */ + /* */ + /* Because many fonts contain more than a single cmap for Unicode */ + /* encoding, this function has some special code to select the one */ + /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */ + /* is preferred to a UCS-2 cmap). It is thus preferable to */ + /* @FT_Set_Charmap in this case. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Select_Charmap( FT_Face face, + FT_Encoding encoding ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Charmap */ + /* */ + /* <Description> */ + /* Select a given charmap for character code to glyph index mapping. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Input> */ + /* charmap :: A handle to the selected charmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function returns an error if the charmap is not part of */ + /* the face (i.e., if it is not listed in the `face->charmaps' */ + /* table). */ + /* */ + /* It also fails if a type~14 charmap is selected. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Charmap( FT_Face face, + FT_CharMap charmap ); + + + /************************************************************************* + * + * @function: + * FT_Get_Charmap_Index + * + * @description: + * Retrieve index of a given charmap. + * + * @input: + * charmap :: + * A handle to a charmap. + * + * @return: + * The index into the array of character maps within the face to which + * `charmap' belongs. If an error occurs, -1 is returned. + * + */ + FT_EXPORT( FT_Int ) + FT_Get_Charmap_Index( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Char_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code. This function */ + /* uses a charmap object to do the mapping. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* charcode :: The character code. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Char_Index( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_First_Char */ + /* */ + /* <Description> */ + /* This function is used to return the first character code in the */ + /* current charmap of a given face. It also returns the */ + /* corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of first character code. 0~if charmap is */ + /* empty. */ + /* */ + /* <Return> */ + /* The charmap's first character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_Next_Char to be able to */ + /* parse all character codes available in a given charmap. The code */ + /* should look like this: */ + /* */ + /* { */ + /* FT_ULong charcode; */ + /* FT_UInt gindex; */ + /* */ + /* */ + /* charcode = FT_Get_First_Char( face, &gindex ); */ + /* while ( gindex != 0 ) */ + /* { */ + /* ... do something with (charcode,gindex) pair ... */ + /* */ + /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ + /* } */ + /* } */ + /* */ + /* Note that `*agindex' is set to~0 if the charmap is empty. The */ + /* result itself can be~0 in two cases: if the charmap is empty or */ + /* if the value~0 is the first valid character code. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_First_Char( FT_Face face, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Next_Char */ + /* */ + /* <Description> */ + /* This function is used to return the next character code in the */ + /* current charmap of a given face following the value `char_code', */ + /* as well as the corresponding glyph index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* char_code :: The starting character code. */ + /* */ + /* <Output> */ + /* agindex :: Glyph index of next character code. 0~if charmap */ + /* is empty. */ + /* */ + /* <Return> */ + /* The charmap's next character code. */ + /* */ + /* <Note> */ + /* You should use this function with @FT_Get_First_Char to walk */ + /* over all character codes available in a given charmap. See the */ + /* note for this function for a simple code example. */ + /* */ + /* Note that `*agindex' is set to~0 when there are no more codes in */ + /* the charmap. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_Next_Char( FT_Face face, + FT_ULong char_code, + FT_UInt *agindex ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Name_Index */ + /* */ + /* <Description> */ + /* Return the glyph index of a given glyph name. This function uses */ + /* driver specific objects to do the translation. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* glyph_name :: The glyph name. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means `undefined character code'. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Name_Index( FT_Face face, + FT_String* glyph_name ); + + + /************************************************************************* + * + * @macro: + * FT_SUBGLYPH_FLAG_XXX + * + * @description: + * A list of constants used to describe subglyphs. Please refer to the + * TrueType specification for the meaning of the various flags. + * + * @values: + * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: + * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: + * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: + * FT_SUBGLYPH_FLAG_SCALE :: + * FT_SUBGLYPH_FLAG_XY_SCALE :: + * FT_SUBGLYPH_FLAG_2X2 :: + * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: + * + */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 + + + /************************************************************************* + * + * @func: + * FT_Get_SubGlyph_Info + * + * @description: + * Retrieve a description of a given subglyph. Only use it if + * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is + * returned otherwise. + * + * @input: + * glyph :: + * The source glyph slot. + * + * sub_index :: + * The index of the subglyph. Must be less than + * `glyph->num_subglyphs'. + * + * @output: + * p_index :: + * The glyph index of the subglyph. + * + * p_flags :: + * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. + * + * p_arg1 :: + * The subglyph's first argument (if any). + * + * p_arg2 :: + * The subglyph's second argument (if any). + * + * p_transform :: + * The subglyph transformation (if any). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be + * interpreted depending on the flags returned in `*p_flags'. See the + * TrueType specification for details. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, + FT_UInt sub_index, + FT_Int *p_index, + FT_UInt *p_flags, + FT_Int *p_arg1, + FT_Int *p_arg2, + FT_Matrix *p_transform ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_FSTYPE_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the `fsType' field of the OS/2 table */ + /* in a TrueType or OpenType font and the `FSType' entry in a */ + /* PostScript font. These bit flags are returned by */ + /* @FT_Get_FSType_Flags; they inform client applications of embedding */ + /* and subsetting restrictions associated with a font. */ + /* */ + /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ + /* more details. */ + /* */ + /* <Values> */ + /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ + /* Fonts with no fsType bit set may be embedded and permanently */ + /* installed on the remote system by an application. */ + /* */ + /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ + /* Fonts that have only this bit set must not be modified, embedded */ + /* or exchanged in any manner without first obtaining permission of */ + /* the font software copyright owner. */ + /* */ + /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ + /* If this bit is set, the font may be embedded and temporarily */ + /* loaded on the remote system. Documents containing Preview & */ + /* Print fonts must be opened `read-only'; no edits can be applied */ + /* to the document. */ + /* */ + /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ + /* If this bit is set, the font may be embedded but must only be */ + /* installed temporarily on other systems. In contrast to Preview */ + /* & Print fonts, documents containing editable fonts may be opened */ + /* for reading, editing is permitted, and changes may be saved. */ + /* */ + /* FT_FSTYPE_NO_SUBSETTING :: */ + /* If this bit is set, the font may not be subsetted prior to */ + /* embedding. */ + /* */ + /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ + /* If this bit is set, only bitmaps contained in the font may be */ + /* embedded; no outline data may be embedded. If there are no */ + /* bitmaps available in the font, then the font is unembeddable. */ + /* */ + /* <Note> */ + /* While the fsType flags can indicate that a font may be embedded, a */ + /* license with the font vendor may be separately required to use the */ + /* font in this way. */ + /* */ +#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 +#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 +#define FT_FSTYPE_NO_SUBSETTING 0x0100 +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_FSType_Flags */ + /* */ + /* <Description> */ + /* Return the fsType flags for a font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* <Return> */ + /* The fsType flags, @FT_FSTYPE_XXX. */ + /* */ + /* <Note> */ + /* Use this function rather than directly reading the `fs_type' field */ + /* in the @PS_FontInfoRec structure which is only guaranteed to */ + /* return the correct results for Type~1 fonts. */ + /* */ + /* <Since> */ + /* 2.3.8 */ + /* */ + FT_EXPORT( FT_UShort ) + FT_Get_FSType_Flags( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_variants */ + /* */ + /* <Title> */ + /* Glyph Variants */ + /* */ + /* <Abstract> */ + /* The FreeType~2 interface to Unicode Ideographic Variation */ + /* Sequences (IVS), using the SFNT cmap format~14. */ + /* */ + /* <Description> */ + /* Many CJK characters have variant forms. They are a sort of grey */ + /* area somewhere between being totally irrelevant and semantically */ + /* distinct; for this reason, the Unicode consortium decided to */ + /* introduce Ideographic Variation Sequences (IVS), consisting of a */ + /* Unicode base character and one of 240 variant selectors */ + /* (U+E0100-U+E01EF), instead of further extending the already huge */ + /* code range for CJK characters. */ + /* */ + /* An IVS is registered and unique; for further details please refer */ + /* to Unicode Technical Report #37, the Ideographic Variation */ + /* Database. To date (October 2007), the character with the most */ + /* variants is U+908A, having 8~such IVS. */ + /* */ + /* Adobe and MS decided to support IVS with a new cmap subtable */ + /* (format~14). It is an odd subtable because it is not a mapping of */ + /* input code points to glyphs, but contains lists of all variants */ + /* supported by the font. */ + /* */ + /* A variant may be either `default' or `non-default'. A default */ + /* variant is the one you will get for that code point if you look it */ + /* up in the standard Unicode cmap. A non-default variant is a */ + /* different glyph. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIndex */ + /* */ + /* <Description> */ + /* Return the glyph index of a given character code as modified by */ + /* the variation selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character code point in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode code point of the variation selector. */ + /* */ + /* <Return> */ + /* The glyph index. 0~means either `undefined character code', or */ + /* `undefined selector code', or `no variation selector cmap */ + /* subtable', or `current CharMap is not Unicode'. */ + /* */ + /* <Note> */ + /* If you use FreeType to manipulate the contents of font files */ + /* directly, be aware that the glyph index returned by this function */ + /* doesn't always correspond to the internal indices used within */ + /* the file. This is done to ensure that value~0 always corresponds */ + /* to the `missing glyph'. */ + /* */ + /* This function is only meaningful if */ + /* a) the font has a variation selector cmap sub table, */ + /* and */ + /* b) the current charmap has a Unicode encoding. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Face_GetCharVariantIndex( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharVariantIsDefault */ + /* */ + /* <Description> */ + /* Check whether this variant of this Unicode character is the one to */ + /* be found in the `cmap'. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* variantSelector :: */ + /* The Unicode codepoint of the variation selector. */ + /* */ + /* <Return> */ + /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ + /* variation selector cmap, or -1 if it is not a variant. */ + /* */ + /* <Note> */ + /* This function is only meaningful if the font has a variation */ + /* selector cmap subtable. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_Int ) + FT_Face_GetCharVariantIsDefault( FT_Face face, + FT_ULong charcode, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantSelectors */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* in the font. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* <Return> */ + /* A pointer to an array of selector code points, or NULL if there is */ + /* no valid variant selector cmap subtable. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantSelectors( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetVariantsOfChar */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode variant selectors found */ + /* for the specified character code. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* charcode :: */ + /* The character codepoint in Unicode. */ + /* */ + /* <Return> */ + /* A pointer to an array of variant selector code points which are */ + /* active for the given character, or NULL if the corresponding list */ + /* is empty. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetVariantsOfChar( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_GetCharsOfVariant */ + /* */ + /* <Description> */ + /* Return a zero-terminated list of Unicode character codes found for */ + /* the specified variant selector. */ + /* */ + /* <Input> */ + /* face :: */ + /* A handle to the source face object. */ + /* */ + /* variantSelector :: */ + /* The variant selector code point in Unicode. */ + /* */ + /* <Return> */ + /* A list of all the code points which are specified by this selector */ + /* (both default and non-default codes are returned) or NULL if there */ + /* is no valid cmap or the variant selector is invalid. */ + /* */ + /* <Note> */ + /* The last item in the array is~0; the array is owned by the */ + /* @FT_Face object but can be overwritten or released on the next */ + /* call to a FreeType function. */ + /* */ + /* <Since> */ + /* 2.3.6 */ + /* */ + FT_EXPORT( FT_UInt32* ) + FT_Face_GetCharsOfVariant( FT_Face face, + FT_ULong variantSelector ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /* <Title> */ + /* Computations */ + /* */ + /* <Abstract> */ + /* Crunching fixed numbers and vectors. */ + /* */ + /* <Description> */ + /* This section contains various functions used to perform */ + /* computations on 16.16 fixed-float numbers or 2d vectors. */ + /* */ + /* <Order> */ + /* FT_MulDiv */ + /* FT_MulFix */ + /* FT_DivFix */ + /* FT_RoundFix */ + /* FT_CeilFix */ + /* FT_FloorFix */ + /* FT_Vector_Transform */ + /* FT_Matrix_Multiply */ + /* FT_Matrix_Invert */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation `(a*b)/c' */ + /* with maximal accuracy (it uses a 64-bit intermediate integer */ + /* whenever necessary). */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulDiv( FT_Long a, + FT_Long b, + FT_Long c ); + + + /* */ + + /* The following #if 0 ... #endif is for the documentation formatter, */ + /* hiding the internal `FT_MULFIX_INLINED' macro. */ + +#if 0 + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */ + /* used to multiply a given value by a 16.16 fixed float factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*b)/0x10000'. */ + /* */ + /* <Note> */ + /* This function has been optimized for the case where the absolute */ + /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ + /* As this happens mainly when scaling from notional units to */ + /* fractional pixels in FreeType, it resulted in noticeable speed */ + /* improvements between versions 2.x and 1.x. */ + /* */ + /* As a conclusion, always try to place a 16.16 factor as the */ + /* _second_ argument of this function; this can make a great */ + /* difference. */ + /* */ + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); + + /* */ +#endif + +#ifdef FT_MULFIX_INLINED +#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) +#else + FT_EXPORT( FT_Long ) + FT_MulFix( FT_Long a, + FT_Long b ); +#endif + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_DivFix */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation */ + /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */ + /* used to divide a given value by a 16.16 fixed float factor. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. Use a 16.16 factor here whenever */ + /* possible (see note below). */ + /* */ + /* <Return> */ + /* The result of `(a*0x10000)/b'. */ + /* */ + /* <Note> */ + /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */ + /* 32~bits, then the division is computed directly. Otherwise, we */ + /* use a specialized version of @FT_MulDiv. */ + /* */ + FT_EXPORT( FT_Long ) + FT_DivFix( FT_Long a, + FT_Long b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_RoundFix */ + /* */ + /* <Description> */ + /* A very simple function used to round a 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number to be rounded. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x8000) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_RoundFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_CeilFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the ceiling function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the ceiling function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `(a + 0x10000 - 1) & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_CeilFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FloorFix */ + /* */ + /* <Description> */ + /* A very simple function used to compute the floor function of a */ + /* 16.16 fixed number. */ + /* */ + /* <Input> */ + /* a :: The number for which the floor function is to be computed. */ + /* */ + /* <Return> */ + /* The result of `a & -0x10000'. */ + /* */ + FT_EXPORT( FT_Fixed ) + FT_FloorFix( FT_Fixed a ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Vector_Transform */ + /* */ + /* <Description> */ + /* Transform a single vector through a 2x2 matrix. */ + /* */ + /* <InOut> */ + /* vector :: The target vector to transform. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the source 2x2 matrix. */ + /* */ + /* <Note> */ + /* The result is undefined if either `vector' or `matrix' is invalid. */ + /* */ + FT_EXPORT( void ) + FT_Vector_Transform( FT_Vector* vec, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* version */ + /* */ + /* <Title> */ + /* FreeType Version */ + /* */ + /* <Abstract> */ + /* Functions and macros related to FreeType versions. */ + /* */ + /* <Description> */ + /* Note that those functions and macros are of limited use because */ + /* even a new release of FreeType with only documentation changes */ + /* increases the version number. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FREETYPE_XXX + * + * @description: + * These three macros identify the FreeType source code version. + * Use @FT_Library_Version to access them at runtime. + * + * @values: + * FREETYPE_MAJOR :: The major version number. + * FREETYPE_MINOR :: The minor version number. + * FREETYPE_PATCH :: The patch level. + * + * @note: + * The version number of FreeType if built as a dynamic link library + * with the `libtool' package is _not_ controlled by these three + * macros. + * + */ +#define FREETYPE_MAJOR 2 +#define FREETYPE_MINOR 4 +#define FREETYPE_PATCH 8 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Library_Version */ + /* */ + /* <Description> */ + /* Return the version of the FreeType library being used. This is */ + /* useful when dynamically linking to the library, since one cannot */ + /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ + /* @FREETYPE_PATCH. */ + /* */ + /* <Input> */ + /* library :: A source library handle. */ + /* */ + /* <Output> */ + /* amajor :: The major version number. */ + /* */ + /* aminor :: The minor version number. */ + /* */ + /* apatch :: The patch version number. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' argument is because */ + /* certain programs implement library initialization in a custom way */ + /* that doesn't use @FT_Init_FreeType. */ + /* */ + /* In such cases, the library version might not be available before */ + /* the library object has been created. */ + /* */ + FT_EXPORT( void ) + FT_Library_Version( FT_Library library, + FT_Int *amajor, + FT_Int *aminor, + FT_Int *apatch ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_CheckTrueTypePatents */ + /* */ + /* <Description> */ + /* Parse all bytecode instructions of a TrueType font file to check */ + /* whether any of the patented opcodes are used. This is only useful */ + /* if you want to be able to use the unpatented hinter with */ + /* fonts that do *not* use these opcodes. */ + /* */ + /* Note that this function parses *all* glyph instructions in the */ + /* font file, which may be slow. */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* <Return> */ + /* 1~if this is a TrueType font that uses one of the patented */ + /* opcodes, 0~otherwise. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_CheckTrueTypePatents( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* <Description> */ + /* Enable or disable the unpatented hinter for a given face. */ + /* Only enable it if you have determined that the face doesn't */ + /* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */ + /* */ + /* <Input> */ + /* face :: A face handle. */ + /* */ + /* value :: New boolean setting. */ + /* */ + /* <Return> */ + /* The old setting value. This will always be false if this is not */ + /* an SFNT font, or if the unpatented hinter is not compiled in this */ + /* instance of the library. */ + /* */ + /* <Note> */ + /* Since May 2010, TrueType hinting is no longer patented. */ + /* */ + /* <Since> */ + /* 2.3.5 */ + /* */ + FT_EXPORT( FT_Bool ) + FT_Face_SetUnpatentedHinting( FT_Face face, + FT_Bool value ); + + /* */ + + +FT_END_HEADER + +#endif /* __FREETYPE_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftadvanc.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftadvanc.h new file mode 100644 index 0000000..b2451be --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftadvanc.h @@ -0,0 +1,179 @@ +/***************************************************************************/ +/* */ +/* ftadvanc.h */ +/* */ +/* Quick computation of advance widths (specification only). */ +/* */ +/* Copyright 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTADVANC_H__ +#define __FTADVANC_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * quick_advance + * + * @title: + * Quick retrieval of advance values + * + * @abstract: + * Retrieve horizontal and vertical advance values without processing + * glyph outlines, if possible. + * + * @description: + * This section contains functions to quickly extract advance values + * without handling glyph outlines, if possible. + */ + + + /*************************************************************************/ + /* */ + /* <Const> */ + /* FT_ADVANCE_FLAG_FAST_ONLY */ + /* */ + /* <Description> */ + /* A bit-flag to be OR-ed with the `flags' parameter of the */ + /* @FT_Get_Advance and @FT_Get_Advances functions. */ + /* */ + /* If set, it indicates that you want these functions to fail if the */ + /* corresponding hinting mode or font driver doesn't allow for very */ + /* quick advance computation. */ + /* */ + /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */ + /* or light-hinted can have their advance width computed very */ + /* quickly. */ + /* */ + /* Normal and bytecode hinted modes, which require loading, scaling, */ + /* and hinting of the glyph outline, are extremely slow by */ + /* comparison. */ + /* */ +#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advance */ + /* */ + /* <Description> */ + /* Retrieve the advance value of a given glyph outline in an */ + /* @FT_Face. By default, the unhinted advance is returned in font */ + /* units. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph, used to determine what kind */ + /* of advances you need. */ + /* <Output> */ + /* padvance :: The advance value, in either font units or 16.16 */ + /* format. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ + /* vertical advance corresponding to a vertical layout. */ + /* Otherwise, it is the horizontal advance in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* A scaled advance is returned in 16.16 format but isn't transformed */ + /* by the affine transformation specified by @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advance( FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags, + FT_Fixed *padvance ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Advances */ + /* */ + /* <Description> */ + /* Retrieve the advance values of several glyph outlines in an */ + /* @FT_Face. By default, the unhinted advances are returned in font */ + /* units. */ + /* */ + /* <Input> */ + /* face :: The source @FT_Face handle. */ + /* */ + /* start :: The first glyph index. */ + /* */ + /* count :: The number of advance values you want to retrieve. */ + /* */ + /* load_flags :: A set of bit flags similar to those used when */ + /* calling @FT_Load_Glyph. */ + /* */ + /* <Output> */ + /* padvance :: The advances, in either font units or 16.16 format. */ + /* This array must contain at least `count' elements. */ + /* */ + /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ + /* vertical advances corresponding to a vertical layout. */ + /* Otherwise, they are the horizontal advances in a */ + /* horizontal layout. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ + /* if the corresponding font backend doesn't have a quick way to */ + /* retrieve the advances. */ + /* */ + /* Scaled advances are returned in 16.16 format but aren't */ + /* transformed by the affine transformation specified by */ + /* @FT_Set_Transform. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Advances( FT_Face face, + FT_UInt start, + FT_UInt count, + FT_Int32 load_flags, + FT_Fixed *padvances ); + +/* */ + + +FT_END_HEADER + +#endif /* __FTADVANC_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbbox.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbbox.h new file mode 100644 index 0000000..9766919 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbbox.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftbbox.h */ +/* */ +/* FreeType exact bbox computation (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This component has a _single_ role: to compute exact outline bounding */ + /* boxes. */ + /* */ + /* It is separated from the rest of the engine for various technical */ + /* reasons. It may well be integrated in `ftoutln' later. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTBBOX_H__ +#define __FTBBOX_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_BBox */ + /* */ + /* <Description> */ + /* Compute the exact bounding box of an outline. This is slower */ + /* than computing the control box. However, it uses an advanced */ + /* algorithm which returns _very_ quickly when the two boxes */ + /* coincide. Otherwise, the outline Bézier arcs are traversed to */ + /* extract their extrema. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline. */ + /* */ + /* <Output> */ + /* abbox :: The outline's exact bounding box. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ + /* reasonable values for the BBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the BBox */ + /* which can be eventually converted back to font units. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_BBox( FT_Outline* outline, + FT_BBox *abbox ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTBBOX_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbdf.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbdf.h new file mode 100644 index 0000000..4f8baf8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbdf.h @@ -0,0 +1,209 @@ +/***************************************************************************/ +/* */ +/* ftbdf.h */ +/* */ +/* FreeType API for accessing BDF-specific strings (specification). */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBDF_H__ +#define __FTBDF_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bdf_fonts */ + /* */ + /* <Title> */ + /* BDF and PCF Files */ + /* */ + /* <Abstract> */ + /* BDF and PCF specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions specific to BDF */ + /* and PCF fonts. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_PropertyType + * + * @description: + * A list of BDF property types. + * + * @values: + * BDF_PROPERTY_TYPE_NONE :: + * Value~0 is used to indicate a missing property. + * + * BDF_PROPERTY_TYPE_ATOM :: + * Property is a string atom. + * + * BDF_PROPERTY_TYPE_INTEGER :: + * Property is a 32-bit signed integer. + * + * BDF_PROPERTY_TYPE_CARDINAL :: + * Property is a 32-bit unsigned integer. + */ + typedef enum BDF_PropertyType_ + { + BDF_PROPERTY_TYPE_NONE = 0, + BDF_PROPERTY_TYPE_ATOM = 1, + BDF_PROPERTY_TYPE_INTEGER = 2, + BDF_PROPERTY_TYPE_CARDINAL = 3 + + } BDF_PropertyType; + + + /********************************************************************** + * + * @type: + * BDF_Property + * + * @description: + * A handle to a @BDF_PropertyRec structure to model a given + * BDF/PCF property. + */ + typedef struct BDF_PropertyRec_* BDF_Property; + + + /********************************************************************** + * + * @struct: + * BDF_PropertyRec + * + * @description: + * This structure models a given BDF/PCF property. + * + * @fields: + * type :: + * The property type. + * + * u.atom :: + * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. + * + * u.integer :: + * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. + * + * u.cardinal :: + * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. + */ + typedef struct BDF_PropertyRec_ + { + BDF_PropertyType type; + union { + const char* atom; + FT_Int32 integer; + FT_UInt32 cardinal; + + } u; + + } BDF_PropertyRec; + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Charset_ID + * + * @description: + * Retrieve a BDF font character set identity, according to + * the BDF specification. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * acharset_encoding :: + * Charset encoding, as a C~string, owned by the face. + * + * acharset_registry :: + * Charset registry, as a C~string, owned by the face. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with BDF faces, returning an error otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Charset_ID( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + + /********************************************************************** + * + * @function: + * FT_Get_BDF_Property + * + * @description: + * Retrieve a BDF property from a BDF or PCF font file. + * + * @input: + * face :: A handle to the input face. + * + * name :: The property name. + * + * @output: + * aproperty :: The property. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function works with BDF _and_ PCF fonts. It returns an error + * otherwise. It also returns an error if the property is not in the + * font. + * + * A `property' is a either key-value pair within the STARTPROPERTIES + * ... ENDPROPERTIES block of a BDF font or a key-value pair from the + * `info->props' array within a `FontRec' structure of a PCF font. + * + * Integer properties are always stored as `signed' within PCF fonts; + * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value + * for BDF fonts only. + * + * In case of error, `aproperty->type' is always set to + * @BDF_PROPERTY_TYPE_NONE. + */ + FT_EXPORT( FT_Error ) + FT_Get_BDF_Property( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + /* */ + +FT_END_HEADER + +#endif /* __FTBDF_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbitmap.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbitmap.h new file mode 100644 index 0000000..9274236 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbitmap.h @@ -0,0 +1,227 @@ +/***************************************************************************/ +/* */ +/* ftbitmap.h */ +/* */ +/* FreeType utility functions for bitmaps (specification). */ +/* */ +/* Copyright 2004, 2005, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBITMAP_H__ +#define __FTBITMAP_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bitmap_handling */ + /* */ + /* <Title> */ + /* Bitmap Handling */ + /* */ + /* <Abstract> */ + /* Handling FT_Bitmap objects. */ + /* */ + /* <Description> */ + /* This section contains functions for converting FT_Bitmap objects. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_New */ + /* */ + /* <Description> */ + /* Initialize a pointer to an @FT_Bitmap structure. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the bitmap structure. */ + /* */ + FT_EXPORT( void ) + FT_Bitmap_New( FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Copy */ + /* */ + /* <Description> */ + /* Copy a bitmap into another one. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: A handle to the source bitmap. */ + /* */ + /* <Output> */ + /* target :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Copy( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Embolden */ + /* */ + /* <Description> */ + /* Embolden a bitmap. The new bitmap will be about `xStrength' */ + /* pixels wider and `yStrength' pixels higher. The left and bottom */ + /* borders are kept unchanged. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* xStrength :: How strong the glyph is emboldened horizontally. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* yStrength :: How strong the glyph is emboldened vertically. */ + /* Expressed in 26.6 pixel format. */ + /* */ + /* <InOut> */ + /* bitmap :: A handle to the target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The current implementation restricts `xStrength' to be less than */ + /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ + /* */ + /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ + /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Embolden( FT_Library library, + FT_Bitmap* bitmap, + FT_Pos xStrength, + FT_Pos yStrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Convert */ + /* */ + /* <Description> */ + /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */ + /* bitmap object with depth 8bpp, making the number of used bytes per */ + /* line (a.k.a. the `pitch') a multiple of `alignment'. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* source :: The source bitmap. */ + /* */ + /* alignment :: The pitch of the bitmap is a multiple of this */ + /* parameter. Common values are 1, 2, or 4. */ + /* */ + /* <Output> */ + /* target :: The target bitmap. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* It is possible to call @FT_Bitmap_Convert multiple times without */ + /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ + /* */ + /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ + /* */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Convert( FT_Library library, + const FT_Bitmap *source, + FT_Bitmap *target, + FT_Int alignment ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GlyphSlot_Own_Bitmap */ + /* */ + /* <Description> */ + /* Make sure that a glyph slot owns `slot->bitmap'. */ + /* */ + /* <Input> */ + /* slot :: The glyph slot. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function is to be used in combination with */ + /* @FT_Bitmap_Embolden. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Bitmap_Done */ + /* */ + /* <Description> */ + /* Destroy a bitmap object created with @FT_Bitmap_New. */ + /* */ + /* <Input> */ + /* library :: A handle to a library object. */ + /* */ + /* bitmap :: The bitmap object to be freed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `library' argument is taken to have access to FreeType's */ + /* memory handling functions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Bitmap_Done( FT_Library library, + FT_Bitmap *bitmap ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTBITMAP_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbzip2.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbzip2.h new file mode 100644 index 0000000..1bf81b1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftbzip2.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftbzip2.h */ +/* */ +/* Bzip2-compressed stream support. */ +/* */ +/* Copyright 2010 by */ +/* Joel Klinghed. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBZIP2_H__ +#define __FTBZIP2_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bzip2 */ + /* */ + /* <Title> */ + /* BZIP2 Streams */ + /* */ + /* <Abstract> */ + /* Using bzip2-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Bzip2-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenBzip2 + * + * @description: + * Open a new stream to parse bzip2-compressed font files. This is + * mainly used to support the compressed `*.pcf.bz2' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, bzip2 compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a bzip2 compressed stream + * from it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with bzip2 support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenBzip2( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTBZIP2_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcache.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcache.h new file mode 100644 index 0000000..6af5306 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcache.h @@ -0,0 +1,1140 @@ +/***************************************************************************/ +/* */ +/* ftcache.h */ +/* */ +/* FreeType Cache subsystem (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCACHE_H__ +#define __FTCACHE_H__ + + +#include <ft2build.h> +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************* + * + * <Section> + * cache_subsystem + * + * <Title> + * Cache Sub-System + * + * <Abstract> + * How to cache face, size, and glyph data with FreeType~2. + * + * <Description> + * This section describes the FreeType~2 cache sub-system, which is used + * to limit the number of concurrently opened @FT_Face and @FT_Size + * objects, as well as caching information like character maps and glyph + * images while limiting their maximum memory usage. + * + * Note that all types and functions begin with the `FTC_' prefix. + * + * The cache is highly portable and thus doesn't know anything about the + * fonts installed on your system, or how to access them. This implies + * the following scheme: + * + * First, available or installed font faces are uniquely identified by + * @FTC_FaceID values, provided to the cache by the client. Note that + * the cache only stores and compares these values, and doesn't try to + * interpret them in any way. + * + * Second, the cache calls, only when needed, a client-provided function + * to convert an @FTC_FaceID into a new @FT_Face object. The latter is + * then completely managed by the cache, including its termination + * through @FT_Done_Face. To monitor termination of face objects, the + * finalizer callback in the `generic' field of the @FT_Face object can + * be used, which might also be used to store the @FTC_FaceID of the + * face. + * + * Clients are free to map face IDs to anything else. The most simple + * usage is to associate them to a (pathname,face_index) pair that is + * used to call @FT_New_Face. However, more complex schemes are also + * possible. + * + * Note that for the cache to work correctly, the face ID values must be + * *persistent*, which means that the contents they point to should not + * change at runtime, or that their value should not become invalid. + * + * If this is unavoidable (e.g., when a font is uninstalled at runtime), + * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let + * the cache get rid of any references to the old @FTC_FaceID it may + * keep internally. Failure to do so will lead to incorrect behaviour + * or even crashes. + * + * To use the cache, start with calling @FTC_Manager_New to create a new + * @FTC_Manager object, which models a single cache instance. You can + * then look up @FT_Face and @FT_Size objects with + * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. + * + * If you want to use the charmap caching, call @FTC_CMapCache_New, then + * later use @FTC_CMapCache_Lookup to perform the equivalent of + * @FT_Get_Char_Index, only much faster. + * + * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then + * later use @FTC_ImageCache_Lookup to retrieve the corresponding + * @FT_Glyph objects from the cache. + * + * If you need lots of small bitmaps, it is much more memory efficient + * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This + * returns @FTC_SBitRec structures, which are used to store small + * bitmaps directly. (A small bitmap is one whose metrics and + * dimensions all fit into 8-bit integers). + * + * We hope to also provide a kerning cache in the near future. + * + * + * <Order> + * FTC_Manager + * FTC_FaceID + * FTC_Face_Requester + * + * FTC_Manager_New + * FTC_Manager_Reset + * FTC_Manager_Done + * FTC_Manager_LookupFace + * FTC_Manager_LookupSize + * FTC_Manager_RemoveFaceID + * + * FTC_Node + * FTC_Node_Unref + * + * FTC_ImageCache + * FTC_ImageCache_New + * FTC_ImageCache_Lookup + * + * FTC_SBit + * FTC_SBitCache + * FTC_SBitCache_New + * FTC_SBitCache_Lookup + * + * FTC_CMapCache + * FTC_CMapCache_New + * FTC_CMapCache_Lookup + * + *************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** BASIC TYPE DEFINITIONS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: FTC_FaceID + * + * @description: + * An opaque pointer type that is used to identity face objects. The + * contents of such objects is application-dependent. + * + * These pointers are typically used to point to a user-defined + * structure containing a font file path, and face index. + * + * @note: + * Never use NULL as a valid @FTC_FaceID. + * + * Face IDs are passed by the client to the cache manager, which calls, + * when needed, the @FTC_Face_Requester to translate them into new + * @FT_Face objects. + * + * If the content of a given face ID changes at runtime, or if the value + * becomes invalid (e.g., when uninstalling a font), you should + * immediately call @FTC_Manager_RemoveFaceID before any other cache + * function. + * + * Failure to do so will result in incorrect behaviour or even + * memory leaks and crashes. + */ + typedef FT_Pointer FTC_FaceID; + + + /************************************************************************ + * + * @functype: + * FTC_Face_Requester + * + * @description: + * A callback function provided by client applications. It is used by + * the cache manager to translate a given @FTC_FaceID into a new valid + * @FT_Face object, on demand. + * + * <Input> + * face_id :: + * The face ID to resolve. + * + * library :: + * A handle to a FreeType library object. + * + * req_data :: + * Application-provided request data (see note below). + * + * <Output> + * aface :: + * A new @FT_Face handle. + * + * <Return> + * FreeType error code. 0~means success. + * + * <Note> + * The third parameter `req_data' is the same as the one passed by the + * client when @FTC_Manager_New is called. + * + * The face requester should not perform funny things on the returned + * face object, like creating a new @FT_Size for it, or setting a + * transformation through @FT_Set_Transform! + */ + typedef FT_Error + (*FTC_Face_Requester)( FTC_FaceID face_id, + FT_Library library, + FT_Pointer request_data, + FT_Face* aface ); + + /* */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* these macros are incompatible with LLP64, should not be used */ + +#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) + +#define FTC_FACE_ID_HASH( i ) \ + ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ + ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** CACHE MANAGER OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Manager */ + /* */ + /* <Description> */ + /* This object corresponds to one instance of the cache-subsystem. */ + /* It is used to cache one or more @FT_Face objects, along with */ + /* corresponding @FT_Size objects. */ + /* */ + /* The manager intentionally limits the total number of opened */ + /* @FT_Face and @FT_Size objects to control memory usage. See the */ + /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ + /* */ + /* The manager is also used to cache `nodes' of various types while */ + /* limiting their total memory usage. */ + /* */ + /* All limitations are enforced by keeping lists of managed objects */ + /* in most-recently-used order, and flushing old nodes to make room */ + /* for new ones. */ + /* */ + typedef struct FTC_ManagerRec_* FTC_Manager; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_Node */ + /* */ + /* <Description> */ + /* An opaque handle to a cache node object. Each cache node is */ + /* reference-counted. A node with a count of~0 might be flushed */ + /* out of a full cache whenever a lookup request is performed. */ + /* */ + /* If you look up nodes, you have the ability to `acquire' them, */ + /* i.e., to increment their reference count. This will prevent the */ + /* node from being flushed out of the cache until you explicitly */ + /* `release' it (see @FTC_Node_Unref). */ + /* */ + /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ + /* */ + typedef struct FTC_NodeRec_* FTC_Node; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_New */ + /* */ + /* <Description> */ + /* Create a new cache manager. */ + /* */ + /* <Input> */ + /* library :: The parent FreeType library handle to use. */ + /* */ + /* max_faces :: Maximum number of opened @FT_Face objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ + /* this cache instance. Use~0 for defaults. */ + /* */ + /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ + /* Use~0 for defaults. Note that this value does not */ + /* account for managed @FT_Face and @FT_Size objects. */ + /* */ + /* requester :: An application-provided callback used to translate */ + /* face IDs into real @FT_Face objects. */ + /* */ + /* req_data :: A generic pointer that is passed to the requester */ + /* each time it is called (see @FTC_Face_Requester). */ + /* */ + /* <Output> */ + /* amanager :: A handle to a new manager object. 0~in case of */ + /* failure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_New( FT_Library library, + FT_UInt max_faces, + FT_UInt max_sizes, + FT_ULong max_bytes, + FTC_Face_Requester requester, + FT_Pointer req_data, + FTC_Manager *amanager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Reset */ + /* */ + /* <Description> */ + /* Empty a given cache manager. This simply gets rid of all the */ + /* currently cached @FT_Face and @FT_Size objects within the manager. */ + /* */ + /* <InOut> */ + /* manager :: A handle to the manager. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Reset( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_Done */ + /* */ + /* <Description> */ + /* Destroy a given manager after emptying it. */ + /* */ + /* <Input> */ + /* manager :: A handle to the target cache manager object. */ + /* */ + FT_EXPORT( void ) + FTC_Manager_Done( FTC_Manager manager ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupFace */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Face object that corresponds to a given face ID */ + /* through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* face_id :: The ID of the face object. */ + /* */ + /* <Output> */ + /* aface :: A handle to the face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Face object is always owned by the manager. You */ + /* should never try to discard it yourself. */ + /* */ + /* The @FT_Face object doesn't necessarily have a current size object */ + /* (i.e., face->size can be 0). If you need a specific `font size', */ + /* use @FTC_Manager_LookupSize instead. */ + /* */ + /* Never change the face's transformation matrix (i.e., never call */ + /* the @FT_Set_Transform function) on a returned face! If you need */ + /* to transform glyphs, do it yourself after glyph loading. */ + /* */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory was available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupFace( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_ScalerRec */ + /* */ + /* <Description> */ + /* A structure used to describe a given character size in either */ + /* pixels or points to the cache manager. See */ + /* @FTC_Manager_LookupSize. */ + /* */ + /* <Fields> */ + /* face_id :: The source face ID. */ + /* */ + /* width :: The character width. */ + /* */ + /* height :: The character height. */ + /* */ + /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ + /* interpreted as integer pixel character sizes. */ + /* Otherwise, they are expressed as 1/64th of points. */ + /* */ + /* x_res :: Only used when `pixel' is value~0 to indicate the */ + /* horizontal resolution in dpi. */ + /* */ + /* y_res :: Only used when `pixel' is value~0 to indicate the */ + /* vertical resolution in dpi. */ + /* */ + /* <Note> */ + /* This type is mainly used to retrieve @FT_Size objects through the */ + /* cache manager. */ + /* */ + typedef struct FTC_ScalerRec_ + { + FTC_FaceID face_id; + FT_UInt width; + FT_UInt height; + FT_Int pixel; + FT_UInt x_res; + FT_UInt y_res; + + } FTC_ScalerRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_Scaler */ + /* */ + /* <Description> */ + /* A handle to an @FTC_ScalerRec structure. */ + /* */ + typedef struct FTC_ScalerRec_* FTC_Scaler; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Manager_LookupSize */ + /* */ + /* <Description> */ + /* Retrieve the @FT_Size object that corresponds to a given */ + /* @FTC_ScalerRec pointer through a cache manager. */ + /* */ + /* <Input> */ + /* manager :: A handle to the cache manager. */ + /* */ + /* scaler :: A scaler handle. */ + /* */ + /* <Output> */ + /* asize :: A handle to the size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned @FT_Size object is always owned by the manager. You */ + /* should never try to discard it by yourself. */ + /* */ + /* You can access the parent @FT_Face object simply as `size->face' */ + /* if you need it. Note that this object is also owned by the */ + /* manager. */ + /* */ + /* <Note> */ + /* When you perform a lookup, out-of-memory errors are detected */ + /* _within_ the lookup and force incremental flushes of the cache */ + /* until enough memory is released for the lookup to succeed. */ + /* */ + /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ + /* already been completely flushed, and still no memory is available */ + /* for the operation. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_Manager_LookupSize( FTC_Manager manager, + FTC_Scaler scaler, + FT_Size *asize ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_Node_Unref */ + /* */ + /* <Description> */ + /* Decrement a cache node's internal reference count. When the count */ + /* reaches 0, it is not destroyed but becomes eligible for subsequent */ + /* cache flushes. */ + /* */ + /* <Input> */ + /* node :: The cache node handle. */ + /* */ + /* manager :: The cache manager handle. */ + /* */ + FT_EXPORT( void ) + FTC_Node_Unref( FTC_Node node, + FTC_Manager manager ); + + + /************************************************************************* + * + * @function: + * FTC_Manager_RemoveFaceID + * + * @description: + * A special function used to indicate to the cache manager that + * a given @FTC_FaceID is no longer valid, either because its + * content changed, or because it was deallocated or uninstalled. + * + * @input: + * manager :: + * The cache manager handle. + * + * face_id :: + * The @FTC_FaceID to be removed. + * + * @note: + * This function flushes all nodes from the cache corresponding to this + * `face_id', with the exception of nodes with a non-null reference + * count. + * + * Such nodes are however modified internally so as to never appear + * in later lookups with the same `face_id' value, and to be immediately + * destroyed when released by all their users. + * + */ + FT_EXPORT( void ) + FTC_Manager_RemoveFaceID( FTC_Manager manager, + FTC_FaceID face_id ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * FTC_CMapCache + * + * @description: + * An opaque handle used to model a charmap cache. This cache is to + * hold character codes -> glyph indices mappings. + * + */ + typedef struct FTC_CMapCacheRec_* FTC_CMapCache; + + + /************************************************************************* + * + * @function: + * FTC_CMapCache_New + * + * @description: + * Create a new charmap cache. + * + * @input: + * manager :: + * A handle to the cache manager. + * + * @output: + * acache :: + * A new cache handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Like all other caches, this one will be destroyed with the cache + * manager. + * + */ + FT_EXPORT( FT_Error ) + FTC_CMapCache_New( FTC_Manager manager, + FTC_CMapCache *acache ); + + + /************************************************************************ + * + * @function: + * FTC_CMapCache_Lookup + * + * @description: + * Translate a character code into a glyph index, using the charmap + * cache. + * + * @input: + * cache :: + * A charmap cache handle. + * + * face_id :: + * The source face ID. + * + * cmap_index :: + * The index of the charmap in the source face. Any negative value + * means to use the cache @FT_Face's default charmap. + * + * char_code :: + * The character code (in the corresponding charmap). + * + * @return: + * Glyph index. 0~means `no glyph'. + * + */ + FT_EXPORT( FT_UInt ) + FTC_CMapCache_Lookup( FTC_CMapCache cache, + FTC_FaceID face_id, + FT_Int cmap_index, + FT_UInt32 char_code ); + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cache_subsystem */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** IMAGE CACHE OBJECT *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /************************************************************************* + * + * @struct: + * FTC_ImageTypeRec + * + * @description: + * A structure used to model the type of images in a glyph cache. + * + * @fields: + * face_id :: + * The face ID. + * + * width :: + * The width in pixels. + * + * height :: + * The height in pixels. + * + * flags :: + * The load flags, as in @FT_Load_Glyph. + * + */ + typedef struct FTC_ImageTypeRec_ + { + FTC_FaceID face_id; + FT_Int width; + FT_Int height; + FT_Int32 flags; + + } FTC_ImageTypeRec; + + + /************************************************************************* + * + * @type: + * FTC_ImageType + * + * @description: + * A handle to an @FTC_ImageTypeRec structure. + * + */ + typedef struct FTC_ImageTypeRec_* FTC_ImageType; + + + /* */ + + +#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ + ( (d1)->face_id == (d2)->face_id && \ + (d1)->width == (d2)->width && \ + (d1)->flags == (d2)->flags ) + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* this macro is incompatible with LLP64, should not be used */ + +#define FTC_IMAGE_TYPE_HASH( d ) \ + (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ + ( (d)->width << 8 ) ^ (d)->height ^ \ + ( (d)->flags << 4 ) ) + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_ImageCache */ + /* */ + /* <Description> */ + /* A handle to an glyph image cache object. They are designed to */ + /* hold many distinct glyph images while not exceeding a certain */ + /* memory threshold. */ + /* */ + typedef struct FTC_ImageCacheRec_* FTC_ImageCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_New */ + /* */ + /* <Description> */ + /* Create a new glyph image cache. */ + /* */ + /* <Input> */ + /* manager :: The parent manager for the image cache. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new glyph image cache object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_New( FTC_Manager manager, + FTC_ImageCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_Lookup */ + /* */ + /* <Description> */ + /* Retrieve a given glyph image from a glyph image cache. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* type :: A pointer to a glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_Lookup( FTC_ImageCache cache, + FTC_ImageType type, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_ImageCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source glyph image cache. */ + /* */ + /* scaler :: A pointer to a scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* <Output> */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ + /* failure. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The returned glyph is owned and managed by the glyph image cache. */ + /* Never try to transform or discard it manually! You can however */ + /* create a copy with @FT_Glyph_Copy and modify the new one. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the glyph image, after increasing its reference */ + /* count. This ensures that the node (as well as the @FT_Glyph) will */ + /* always be kept in the cache until you call @FTC_Node_Unref to */ + /* `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the @FT_Glyph could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ + /* glyphs; you should always use the FreeType cache API instead. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_LookupScaler( FTC_ImageCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBit */ + /* */ + /* <Description> */ + /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ + /* structure for details. */ + /* */ + typedef struct FTC_SBitRec_* FTC_SBit; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FTC_SBitRec */ + /* */ + /* <Description> */ + /* A very compact structure used to describe a small glyph bitmap. */ + /* */ + /* <Fields> */ + /* width :: The bitmap width in pixels. */ + /* */ + /* height :: The bitmap height in pixels. */ + /* */ + /* left :: The horizontal distance from the pen position to the */ + /* left bitmap border (a.k.a. `left side bearing', or */ + /* `lsb'). */ + /* */ + /* top :: The vertical distance from the pen position (on the */ + /* baseline) to the upper bitmap border (a.k.a. `top */ + /* side bearing'). The distance is positive for upwards */ + /* y~coordinates. */ + /* */ + /* format :: The format of the glyph bitmap (monochrome or gray). */ + /* */ + /* max_grays :: Maximum gray level value (in the range 1 to~255). */ + /* */ + /* pitch :: The number of bytes per bitmap line. May be positive */ + /* or negative. */ + /* */ + /* xadvance :: The horizontal advance width in pixels. */ + /* */ + /* yadvance :: The vertical advance height in pixels. */ + /* */ + /* buffer :: A pointer to the bitmap pixels. */ + /* */ + typedef struct FTC_SBitRec_ + { + FT_Byte width; + FT_Byte height; + FT_Char left; + FT_Char top; + + FT_Byte format; + FT_Byte max_grays; + FT_Short pitch; + FT_Char xadvance; + FT_Char yadvance; + + FT_Byte* buffer; + + } FTC_SBitRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FTC_SBitCache */ + /* */ + /* <Description> */ + /* A handle to a small bitmap cache. These are special cache objects */ + /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ + /* much more efficient way than the traditional glyph image cache */ + /* implemented by @FTC_ImageCache. */ + /* */ + typedef struct FTC_SBitCacheRec_* FTC_SBitCache; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_New */ + /* */ + /* <Description> */ + /* Create a new cache to store small glyph bitmaps. */ + /* */ + /* <Input> */ + /* manager :: A handle to the source cache manager. */ + /* */ + /* <Output> */ + /* acache :: A handle to the new sbit cache. NULL in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_New( FTC_Manager manager, + FTC_SBitCache *acache ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_Lookup */ + /* */ + /* <Description> */ + /* Look up a given small glyph bitmap in a given sbit cache and */ + /* `lock' it to prevent its flushing from the cache until needed. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* type :: A pointer to the glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding cache */ + /* node after incrementing its reference count (see note */ + /* below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_Lookup( FTC_SBitCache cache, + FTC_ImageType type, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FTC_SBitCache_LookupScaler */ + /* */ + /* <Description> */ + /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ + /* to specify the face ID and its size. */ + /* */ + /* <Input> */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* scaler :: A pointer to the scaler descriptor. */ + /* */ + /* load_flags :: The corresponding load flags. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* <Output> */ + /* sbit :: A handle to a small bitmap descriptor. */ + /* */ + /* anode :: Used to return the address of of the corresponding */ + /* cache node after incrementing its reference count */ + /* (see note below). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The small bitmap descriptor and its bit buffer are owned by the */ + /* cache and should never be freed by the application. They might */ + /* as well disappear from memory on the next cache lookup, so don't */ + /* treat them as persistent data. */ + /* */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ + /* glyph bitmap. */ + /* */ + /* If `anode' is _not_ NULL, it receives the address of the cache */ + /* node containing the bitmap, after increasing its reference count. */ + /* This ensures that the node (as well as the image) will always be */ + /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ + /* */ + /* If `anode' is NULL, the cache node is left unchanged, which means */ + /* that the bitmap could be flushed out of the cache on the next */ + /* call to one of the caching sub-system APIs. Don't assume that it */ + /* is persistent! */ + /* */ + FT_EXPORT( FT_Error ) + FTC_SBitCache_LookupScaler( FTC_SBitCache cache, + FTC_Scaler scaler, + FT_ULong load_flags, + FT_UInt gindex, + FTC_SBit *sbit, + FTC_Node *anode ); + + + /* */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*@***********************************************************************/ + /* */ + /* <Struct> */ + /* FTC_FontRec */ + /* */ + /* <Description> */ + /* A simple structure used to describe a given `font' to the cache */ + /* manager. Note that a `font' is the combination of a given face */ + /* with a given character size. */ + /* */ + /* <Fields> */ + /* face_id :: The ID of the face to use. */ + /* */ + /* pix_width :: The character width in integer pixels. */ + /* */ + /* pix_height :: The character height in integer pixels. */ + /* */ + typedef struct FTC_FontRec_ + { + FTC_FaceID face_id; + FT_UShort pix_width; + FT_UShort pix_height; + + } FTC_FontRec; + + + /* */ + + +#define FTC_FONT_COMPARE( f1, f2 ) \ + ( (f1)->face_id == (f2)->face_id && \ + (f1)->pix_width == (f2)->pix_width && \ + (f1)->pix_height == (f2)->pix_height ) + + /* this macro is incompatible with LLP64, should not be used */ +#define FTC_FONT_HASH( f ) \ + (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ + ((f)->pix_width << 8) ^ \ + ((f)->pix_height) ) + + typedef FTC_FontRec* FTC_Font; + + + FT_EXPORT( FT_Error ) + FTC_Manager_Lookup_Face( FTC_Manager manager, + FTC_FaceID face_id, + FT_Face *aface ); + + FT_EXPORT( FT_Error ) + FTC_Manager_Lookup_Size( FTC_Manager manager, + FTC_Font font, + FT_Face *aface, + FT_Size *asize ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /* */ + +FT_END_HEADER + +#endif /* __FTCACHE_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftchapters.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftchapters.h new file mode 100644 index 0000000..6cdf54e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftchapters.h @@ -0,0 +1,104 @@ +/***************************************************************************/ +/* */ +/* This file defines the structure of the FreeType reference. */ +/* It is used by the python script which generates the HTML files. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* general_remarks */ +/* */ +/* <Title> */ +/* General Remarks */ +/* */ +/* <Sections> */ +/* user_allocation */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* core_api */ +/* */ +/* <Title> */ +/* Core API */ +/* */ +/* <Sections> */ +/* version */ +/* basic_types */ +/* base_interface */ +/* glyph_variants */ +/* glyph_management */ +/* mac_specific */ +/* sizes_management */ +/* header_file_macros */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* format_specific */ +/* */ +/* <Title> */ +/* Format-Specific API */ +/* */ +/* <Sections> */ +/* multiple_masters */ +/* truetype_tables */ +/* type1_tables */ +/* sfnt_names */ +/* bdf_fonts */ +/* cid_fonts */ +/* pfr_fonts */ +/* winfnt_fonts */ +/* font_formats */ +/* gasp_table */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* cache_subsystem */ +/* */ +/* <Title> */ +/* Cache Sub-System */ +/* */ +/* <Sections> */ +/* cache_subsystem */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ +/* support_api */ +/* */ +/* <Title> */ +/* Support API */ +/* */ +/* <Sections> */ +/* computations */ +/* list_processing */ +/* outline_processing */ +/* quick_advance */ +/* bitmap_handling */ +/* raster */ +/* glyph_stroker */ +/* system_interface */ +/* module_management */ +/* gzip */ +/* lzw */ +/* bzip2 */ +/* lcd_filtering */ +/* */ +/***************************************************************************/ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcid.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcid.h new file mode 100644 index 0000000..203a30c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftcid.h @@ -0,0 +1,166 @@ +/***************************************************************************/ +/* */ +/* ftcid.h */ +/* */ +/* FreeType API for accessing CID font information (specification). */ +/* */ +/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCID_H__ +#define __FTCID_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* cid_fonts */ + /* */ + /* <Title> */ + /* CID Fonts */ + /* */ + /* <Abstract> */ + /* CID-keyed font specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of CID-keyed font specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Registry_Ordering_Supplement + * + * @description: + * Retrieve the Registry/Ordering/Supplement triple (also known as the + * "R/O/S") from a CID-keyed font. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * registry :: + * The registry, as a C~string, owned by the face. + * + * ordering :: + * The ordering, as a C~string, owned by the face. + * + * supplement :: + * The supplement. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces, returning an error + * otherwise. + * + * @since: + * 2.3.6 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_Is_Internally_CID_Keyed + * + * @description: + * Retrieve the type of the input face, CID keyed or not. In + * constrast to the @FT_IS_CID_KEYED macro this function returns + * successfully also for CID-keyed fonts in an SNFT wrapper. + * + * @input: + * face :: + * A handle to the input face. + * + * @output: + * is_cid :: + * The type of the face as an @FT_Bool. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, + FT_Bool *is_cid ); + + + /********************************************************************** + * + * @function: + * FT_Get_CID_From_Glyph_Index + * + * @description: + * Retrieve the CID of the input glyph index. + * + * @input: + * face :: + * A handle to the input face. + * + * glyph_index :: + * The input glyph index. + * + * @output: + * cid :: + * The CID as an @FT_UInt. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with CID faces and OpenType fonts, + * returning an error otherwise. + * + * @since: + * 2.3.9 + */ + FT_EXPORT( FT_Error ) + FT_Get_CID_From_Glyph_Index( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + /* */ + +FT_END_HEADER + +#endif /* __FTCID_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrdef.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrdef.h new file mode 100644 index 0000000..d4e7287 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrdef.h @@ -0,0 +1,243 @@ +/***************************************************************************/ +/* */ +/* fterrdef.h */ +/* */ +/* FreeType error codes (specification). */ +/* */ +/* Copyright 2002, 2004, 2006, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST OF ERROR CODES/MESSAGES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + + /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */ + /* including this file. */ + + + /* generic errors */ + + FT_NOERRORDEF_( Ok, 0x00, \ + "no error" ) + + FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ + "cannot open resource" ) + FT_ERRORDEF_( Unknown_File_Format, 0x02, \ + "unknown file format" ) + FT_ERRORDEF_( Invalid_File_Format, 0x03, \ + "broken file" ) + FT_ERRORDEF_( Invalid_Version, 0x04, \ + "invalid FreeType version" ) + FT_ERRORDEF_( Lower_Module_Version, 0x05, \ + "module version is too low" ) + FT_ERRORDEF_( Invalid_Argument, 0x06, \ + "invalid argument" ) + FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ + "unimplemented feature" ) + FT_ERRORDEF_( Invalid_Table, 0x08, \ + "broken table" ) + FT_ERRORDEF_( Invalid_Offset, 0x09, \ + "broken offset within table" ) + FT_ERRORDEF_( Array_Too_Large, 0x0A, \ + "array allocation size too large" ) + + /* glyph/character errors */ + + FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ + "invalid glyph index" ) + FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ + "invalid character code" ) + FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ + "unsupported glyph image format" ) + FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ + "cannot render this glyph format" ) + FT_ERRORDEF_( Invalid_Outline, 0x14, \ + "invalid outline" ) + FT_ERRORDEF_( Invalid_Composite, 0x15, \ + "invalid composite glyph" ) + FT_ERRORDEF_( Too_Many_Hints, 0x16, \ + "too many hints" ) + FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ + "invalid pixel size" ) + + /* handle errors */ + + FT_ERRORDEF_( Invalid_Handle, 0x20, \ + "invalid object handle" ) + FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ + "invalid library handle" ) + FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ + "invalid module handle" ) + FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ + "invalid face handle" ) + FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ + "invalid size handle" ) + FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ + "invalid glyph slot handle" ) + FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ + "invalid charmap handle" ) + FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ + "invalid cache manager handle" ) + FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ + "invalid stream handle" ) + + /* driver errors */ + + FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ + "too many modules" ) + FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ + "too many extensions" ) + + /* memory errors */ + + FT_ERRORDEF_( Out_Of_Memory, 0x40, \ + "out of memory" ) + FT_ERRORDEF_( Unlisted_Object, 0x41, \ + "unlisted object" ) + + /* stream errors */ + + FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ + "cannot open stream" ) + FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ + "invalid stream seek" ) + FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ + "invalid stream skip" ) + FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ + "invalid stream read" ) + FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ + "invalid stream operation" ) + FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ + "invalid frame operation" ) + FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ + "nested frame access" ) + FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ + "invalid frame read" ) + + /* raster errors */ + + FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ + "raster uninitialized" ) + FT_ERRORDEF_( Raster_Corrupted, 0x61, \ + "raster corrupted" ) + FT_ERRORDEF_( Raster_Overflow, 0x62, \ + "raster overflow" ) + FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ + "negative height while rastering" ) + + /* cache errors */ + + FT_ERRORDEF_( Too_Many_Caches, 0x70, \ + "too many registered caches" ) + + /* TrueType and SFNT errors */ + + FT_ERRORDEF_( Invalid_Opcode, 0x80, \ + "invalid opcode" ) + FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ + "too few arguments" ) + FT_ERRORDEF_( Stack_Overflow, 0x82, \ + "stack overflow" ) + FT_ERRORDEF_( Code_Overflow, 0x83, \ + "code overflow" ) + FT_ERRORDEF_( Bad_Argument, 0x84, \ + "bad argument" ) + FT_ERRORDEF_( Divide_By_Zero, 0x85, \ + "division by zero" ) + FT_ERRORDEF_( Invalid_Reference, 0x86, \ + "invalid reference" ) + FT_ERRORDEF_( Debug_OpCode, 0x87, \ + "found debug opcode" ) + FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ + "found ENDF opcode in execution stream" ) + FT_ERRORDEF_( Nested_DEFS, 0x89, \ + "nested DEFS" ) + FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ + "invalid code range" ) + FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ + "execution context too long" ) + FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ + "too many function definitions" ) + FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ + "too many instruction definitions" ) + FT_ERRORDEF_( Table_Missing, 0x8E, \ + "SFNT font table missing" ) + FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ + "horizontal header (hhea) table missing" ) + FT_ERRORDEF_( Locations_Missing, 0x90, \ + "locations (loca) table missing" ) + FT_ERRORDEF_( Name_Table_Missing, 0x91, \ + "name table missing" ) + FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ + "character map (cmap) table missing" ) + FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ + "horizontal metrics (hmtx) table missing" ) + FT_ERRORDEF_( Post_Table_Missing, 0x94, \ + "PostScript (post) table missing" ) + FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ + "invalid horizontal metrics" ) + FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ + "invalid character map (cmap) format" ) + FT_ERRORDEF_( Invalid_PPem, 0x97, \ + "invalid ppem value" ) + FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ + "invalid vertical metrics" ) + FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ + "could not find context" ) + FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ + "invalid PostScript (post) table format" ) + FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ + "invalid PostScript (post) table" ) + + /* CFF, CID, and Type 1 errors */ + + FT_ERRORDEF_( Syntax_Error, 0xA0, \ + "opcode syntax error" ) + FT_ERRORDEF_( Stack_Underflow, 0xA1, \ + "argument stack underflow" ) + FT_ERRORDEF_( Ignore, 0xA2, \ + "ignore" ) + FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ + "no Unicode glyph name found" ) + + /* BDF errors */ + + FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ + "`STARTFONT' field missing" ) + FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ + "`FONT' field missing" ) + FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ + "`SIZE' field missing" ) + FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \ + "`FONTBOUNDINGBOX' field missing" ) + FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \ + "`CHARS' field missing" ) + FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \ + "`STARTCHAR' field missing" ) + FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \ + "`ENCODING' field missing" ) + FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \ + "`BBX' field missing" ) + FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \ + "`BBX' too big" ) + FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \ + "Font header corrupted or missing fields" ) + FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \ + "Font glyphs corrupted or missing fields" ) + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrors.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrors.h new file mode 100644 index 0000000..6600dad --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/fterrors.h @@ -0,0 +1,206 @@ +/***************************************************************************/ +/* */ +/* fterrors.h */ +/* */ +/* FreeType error code handling (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This special header file is used to define the handling of FT2 */ + /* enumeration constants. It can also be used to generate error message */ + /* strings with a small macro trick explained below. */ + /* */ + /* I - Error Formats */ + /* ----------------- */ + /* */ + /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ + /* defined in ftoption.h in order to make the higher byte indicate */ + /* the module where the error has happened (this is not compatible */ + /* with standard builds of FreeType 2). You can then use the macro */ + /* FT_ERROR_BASE macro to extract the generic error code from an */ + /* FT_Error value. */ + /* */ + /* */ + /* II - Error Message strings */ + /* -------------------------- */ + /* */ + /* The error definitions below are made through special macros that */ + /* allow client applications to build a table of error message strings */ + /* if they need it. The strings are not included in a normal build of */ + /* FreeType 2 to save space (most client applications do not use */ + /* them). */ + /* */ + /* To do so, you have to define the following macros before including */ + /* this file: */ + /* */ + /* FT_ERROR_START_LIST :: */ + /* This macro is called before anything else to define the start of */ + /* the error list. It is followed by several FT_ERROR_DEF calls */ + /* (see below). */ + /* */ + /* FT_ERROR_DEF( e, v, s ) :: */ + /* This macro is called to define one single error. */ + /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */ + /* `v' is the error numerical value. */ + /* `s' is the corresponding error string. */ + /* */ + /* FT_ERROR_END_LIST :: */ + /* This macro ends the list. */ + /* */ + /* Additionally, you have to undefine __FTERRORS_H__ before #including */ + /* this file. */ + /* */ + /* Here is a simple example: */ + /* */ + /* { */ + /* #undef __FTERRORS_H__ */ + /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ + /* #define FT_ERROR_START_LIST { */ + /* #define FT_ERROR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int err_code; */ + /* const char* err_msg; */ + /* } ft_errors[] = */ + /* */ + /* #include FT_ERRORS_H */ + /* } */ + /* */ + /*************************************************************************/ + + +#ifndef __FTERRORS_H__ +#define __FTERRORS_H__ + + + /* include module base error codes */ +#include FT_MODULE_ERRORS_H + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#undef FT_ERR_XCAT +#undef FT_ERR_CAT + +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) + + + /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ + /* By default, we use `FT_Err_'. */ + /* */ +#ifndef FT_ERR_PREFIX +#define FT_ERR_PREFIX FT_Err_ +#endif + + + /* FT_ERR_BASE is used as the base for module-specific errors. */ + /* */ +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS + +#ifndef FT_ERR_BASE +#define FT_ERR_BASE FT_Mod_Err_Base +#endif + +#else + +#undef FT_ERR_BASE +#define FT_ERR_BASE 0 + +#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ + + + /* If FT_ERRORDEF is not defined, we need to define a simple */ + /* enumeration type. */ + /* */ +#ifndef FT_ERRORDEF + +#define FT_ERRORDEF( e, v, s ) e = v, +#define FT_ERROR_START_LIST enum { +#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_ERRORDEF */ + + + /* this macro is used to define an error */ +#define FT_ERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) + + /* this is only used for <module>_Err_Ok, which must be 0! */ +#define FT_NOERRORDEF_( e, v, s ) \ + FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) + + +#ifdef FT_ERROR_START_LIST + FT_ERROR_START_LIST +#endif + + + /* now include the error codes */ +#include FT_ERROR_DEFINITIONS_H + + +#ifdef FT_ERROR_END_LIST + FT_ERROR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SIMPLE CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_ERROR_START_LIST +#undef FT_ERROR_END_LIST + +#undef FT_ERRORDEF +#undef FT_ERRORDEF_ +#undef FT_NOERRORDEF_ + +#undef FT_NEED_EXTERN_C +#undef FT_ERR_CONCAT +#undef FT_ERR_BASE + + /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ +#ifndef FT_KEEP_ERR_PREFIX +#undef FT_ERR_PREFIX +#endif + +#endif /* __FTERRORS_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgasp.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgasp.h new file mode 100644 index 0000000..5e978e5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgasp.h @@ -0,0 +1,128 @@ +/***************************************************************************/ +/* */ +/* ftgasp.h */ +/* */ +/* Access of TrueType's `gasp' table (specification). */ +/* */ +/* Copyright 2007, 2008, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef _FT_GASP_H_ +#define _FT_GASP_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + + /*************************************************************************** + * + * @section: + * gasp_table + * + * @title: + * Gasp Table + * + * @abstract: + * Retrieving TrueType `gasp' table entries. + * + * @description: + * The function @FT_Get_Gasp can be used to query a TrueType or OpenType + * font for specific entries in its `gasp' table, if any. This is + * mainly useful when implementing native TrueType hinting with the + * bytecode interpreter to duplicate the Windows text rendering results. + */ + + /************************************************************************* + * + * @enum: + * FT_GASP_XXX + * + * @description: + * A list of values and/or bit-flags returned by the @FT_Get_Gasp + * function. + * + * @values: + * FT_GASP_NO_TABLE :: + * This special value means that there is no GASP table in this face. + * It is up to the client to decide what to do. + * + * FT_GASP_DO_GRIDFIT :: + * Grid-fitting and hinting should be performed at the specified ppem. + * This *really* means TrueType bytecode interpretation. If this bit + * is not set, no hinting gets applied. + * + * FT_GASP_DO_GRAY :: + * Anti-aliased rendering should be performed at the specified ppem. + * If not set, do monochrome rendering. + * + * FT_GASP_SYMMETRIC_SMOOTHING :: + * If set, smoothing along multiple axes must be used with ClearType. + * + * FT_GASP_SYMMETRIC_GRIDFIT :: + * Grid-fitting must be used with ClearType's symmetric smoothing. + * + * @note: + * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be + * used for standard font rasterization only. Independently of that, + * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to + * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and + * `FT_GASP_DO_GRAY' are consequently ignored). + * + * `ClearType' is Microsoft's implementation of LCD rendering, partly + * protected by patents. + * + * @since: + * 2.3.0 + */ +#define FT_GASP_NO_TABLE -1 +#define FT_GASP_DO_GRIDFIT 0x01 +#define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_SMOOTHING 0x08 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 + + + /************************************************************************* + * + * @func: + * FT_Get_Gasp + * + * @description: + * Read the `gasp' table from a TrueType or OpenType font file and + * return the entry corresponding to a given character pixel size. + * + * @input: + * face :: The source face handle. + * ppem :: The vertical character pixel size. + * + * @return: + * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no + * `gasp' table in the face. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Int ) + FT_Get_Gasp( FT_Face face, + FT_UInt ppem ); + +/* */ + +#endif /* _FT_GASP_H_ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftglyph.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftglyph.h new file mode 100644 index 0000000..3de69f7 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftglyph.h @@ -0,0 +1,620 @@ +/***************************************************************************/ +/* */ +/* ftglyph.h */ +/* */ +/* FreeType convenience functions to handle glyphs (specification). */ +/* */ +/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of several convenience functions */ + /* that can be used by client applications to easily retrieve glyph */ + /* bitmaps and outlines from a given face. */ + /* */ + /* These functions should be optional if you are writing a font server */ + /* or text layout engine on top of FreeType. However, they are pretty */ + /* handy for many other simple uses of the library. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTGLYPH_H__ +#define __FTGLYPH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* glyph_management */ + /* */ + /* <Title> */ + /* Glyph Management */ + /* */ + /* <Abstract> */ + /* Generic interface to manage individual glyph data. */ + /* */ + /* <Description> */ + /* This section contains definitions used to manage glyph data */ + /* through generic FT_Glyph objects. Each of them can contain a */ + /* bitmap, a vector outline, or even images in other formats. */ + /* */ + /*************************************************************************/ + + + /* forward declaration to a private type */ + typedef struct FT_Glyph_Class_ FT_Glyph_Class; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Glyph */ + /* */ + /* <Description> */ + /* Handle to an object used to model generic glyph images. It is a */ + /* pointer to the @FT_GlyphRec structure and can contain a glyph */ + /* bitmap or pointer. */ + /* */ + /* <Note> */ + /* Glyph objects are not owned by the library. You must thus release */ + /* them manually (through @FT_Done_Glyph) _before_ calling */ + /* @FT_Done_FreeType. */ + /* */ + typedef struct FT_GlyphRec_* FT_Glyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphRec */ + /* */ + /* <Description> */ + /* The root glyph structure contains a given glyph image plus its */ + /* advance width in 16.16 fixed float format. */ + /* */ + /* <Fields> */ + /* library :: A handle to the FreeType library object. */ + /* */ + /* clazz :: A pointer to the glyph's class. Private. */ + /* */ + /* format :: The format of the glyph's image. */ + /* */ + /* advance :: A 16.16 vector that gives the glyph's advance width. */ + /* */ + typedef struct FT_GlyphRec_ + { + FT_Library library; + const FT_Glyph_Class* clazz; + FT_Glyph_Format format; + FT_Vector advance; + + } FT_GlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_BitmapGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model a bitmap glyph image. This is */ + /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ + /* */ + typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BitmapGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for bitmap glyph images. This really is a */ + /* `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* left :: The left-side bearing, i.e., the horizontal distance */ + /* from the current pen position to the left border of the */ + /* glyph bitmap. */ + /* */ + /* top :: The top-side bearing, i.e., the vertical distance from */ + /* the current pen position to the top border of the glyph */ + /* bitmap. This distance is positive for upwards~y! */ + /* */ + /* bitmap :: A descriptor for the bitmap. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ + /* the bitmap's contents easily. */ + /* */ + /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ + /* and is thus created and destroyed with it. */ + /* */ + typedef struct FT_BitmapGlyphRec_ + { + FT_GlyphRec root; + FT_Int left; + FT_Int top; + FT_Bitmap bitmap; + + } FT_BitmapGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_OutlineGlyph */ + /* */ + /* <Description> */ + /* A handle to an object used to model an outline glyph image. This */ + /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ + /* */ + typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_OutlineGlyphRec */ + /* */ + /* <Description> */ + /* A structure used for outline (vectorial) glyph images. This */ + /* really is a `sub-class' of @FT_GlyphRec. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Glyph fields. */ + /* */ + /* outline :: A descriptor for the outline. */ + /* */ + /* <Note> */ + /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ + /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ + /* the outline's content easily. */ + /* */ + /* As the outline is extracted from a glyph slot, its coordinates are */ + /* expressed normally in 26.6 pixels, unless the flag */ + /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ + /* */ + /* The outline's tables are always owned by the object and are */ + /* destroyed with it. */ + /* */ + typedef struct FT_OutlineGlyphRec_ + { + FT_GlyphRec root; + FT_Outline outline; + + } FT_OutlineGlyphRec; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Glyph */ + /* */ + /* <Description> */ + /* A function used to extract a glyph image from a slot. Note that */ + /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* slot :: A handle to the source glyph slot. */ + /* */ + /* <Output> */ + /* aglyph :: A handle to the glyph object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Glyph( FT_GlyphSlot slot, + FT_Glyph *aglyph ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Copy */ + /* */ + /* <Description> */ + /* A function used to copy a glyph image. Note that the created */ + /* @FT_Glyph object must be released with @FT_Done_Glyph. */ + /* */ + /* <Input> */ + /* source :: A handle to the source glyph object. */ + /* */ + /* <Output> */ + /* target :: A handle to the target glyph object. 0~in case of */ + /* error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Copy( FT_Glyph source, + FT_Glyph *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Transform */ + /* */ + /* <Description> */ + /* Transform a glyph image if its format is scalable. */ + /* */ + /* <InOut> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to a 2x2 matrix to apply. */ + /* */ + /* delta :: A pointer to a 2d vector to apply. Coordinates are */ + /* expressed in 1/64th of a pixel. */ + /* */ + /* <Return> */ + /* FreeType error code (if not 0, the glyph format is not scalable). */ + /* */ + /* <Note> */ + /* The 2x2 transformation matrix is also applied to the glyph's */ + /* advance vector. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_Transform( FT_Glyph glyph, + FT_Matrix* matrix, + FT_Vector* delta ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_BBox_Mode */ + /* */ + /* <Description> */ + /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ + /* */ + /* <Values> */ + /* FT_GLYPH_BBOX_UNSCALED :: */ + /* Return unscaled font units. */ + /* */ + /* FT_GLYPH_BBOX_SUBPIXELS :: */ + /* Return unfitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_GRIDFIT :: */ + /* Return grid-fitted 26.6 coordinates. */ + /* */ + /* FT_GLYPH_BBOX_TRUNCATE :: */ + /* Return coordinates in integer pixels. */ + /* */ + /* FT_GLYPH_BBOX_PIXELS :: */ + /* Return grid-fitted pixel coordinates. */ + /* */ + typedef enum FT_Glyph_BBox_Mode_ + { + FT_GLYPH_BBOX_UNSCALED = 0, + FT_GLYPH_BBOX_SUBPIXELS = 0, + FT_GLYPH_BBOX_GRIDFIT = 1, + FT_GLYPH_BBOX_TRUNCATE = 2, + FT_GLYPH_BBOX_PIXELS = 3 + + } FT_Glyph_BBox_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_glyph_bbox_xxx */ + /* */ + /* <Description> */ + /* These constants are deprecated. Use the corresponding */ + /* @FT_Glyph_BBox_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */ + /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */ + /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */ + /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */ + /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */ + /* */ +#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED +#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS +#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT +#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE +#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_Get_CBox */ + /* */ + /* <Description> */ + /* Return a glyph's `control box'. The control box encloses all the */ + /* outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* which contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the source glyph object. */ + /* */ + /* mode :: The mode which indicates how to interpret the returned */ + /* bounding box values. */ + /* */ + /* <Output> */ + /* acbox :: The glyph coordinate bounding box. Coordinates are */ + /* expressed in 1/64th of pixels if it is grid-fitted. */ + /* */ + /* <Note> */ + /* Coordinates are relative to the glyph origin, using the y~upwards */ + /* convention. */ + /* */ + /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ + /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ + /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ + /* is another name for this constant. */ + /* */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ + /* reasonable values for the CBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the CBox */ + /* which can be eventually converted back to font units. */ + /* */ + /* Note that the maximum coordinates are exclusive, which means that */ + /* one can compute the width and height of the glyph image (be it in */ + /* integer or 26.6 pixels) as: */ + /* */ + /* { */ + /* width = bbox.xMax - bbox.xMin; */ + /* height = bbox.yMax - bbox.yMin; */ + /* } */ + /* */ + /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ + /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ + /* which corresponds to: */ + /* */ + /* { */ + /* bbox.xMin = FLOOR(bbox.xMin); */ + /* bbox.yMin = FLOOR(bbox.yMin); */ + /* bbox.xMax = CEILING(bbox.xMax); */ + /* bbox.yMax = CEILING(bbox.yMax); */ + /* } */ + /* */ + /* To get the bbox in pixel coordinates, set `bbox_mode' to */ + /* @FT_GLYPH_BBOX_TRUNCATE. */ + /* */ + /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ + /* to @FT_GLYPH_BBOX_PIXELS. */ + /* */ + FT_EXPORT( void ) + FT_Glyph_Get_CBox( FT_Glyph glyph, + FT_UInt bbox_mode, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Glyph_To_Bitmap */ + /* */ + /* <Description> */ + /* Convert a given glyph object to a bitmap glyph object. */ + /* */ + /* <InOut> */ + /* the_glyph :: A pointer to a handle to the target glyph. */ + /* */ + /* <Input> */ + /* render_mode :: An enumeration that describes how the data is */ + /* rendered. */ + /* */ + /* origin :: A pointer to a vector used to translate the glyph */ + /* image before rendering. Can be~0 (if no */ + /* translation). The origin is expressed in */ + /* 26.6 pixels. */ + /* */ + /* destroy :: A boolean that indicates that the original glyph */ + /* image should be destroyed by this function. It is */ + /* never destroyed in case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does nothing if the glyph format isn't scalable. */ + /* */ + /* The glyph image is translated with the `origin' vector before */ + /* rendering. */ + /* */ + /* The first parameter is a pointer to an @FT_Glyph handle, that will */ + /* be _replaced_ by this function (with newly allocated data). */ + /* Typically, you would use (omitting error handling): */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyph; */ + /* FT_BitmapGlyph glyph_bitmap; */ + /* */ + /* */ + /* // load glyph */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ + /* */ + /* // extract glyph image */ + /* error = FT_Get_Glyph( face->glyph, &glyph ); */ + /* */ + /* // convert to a bitmap (default render mode + destroying old) */ + /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ + /* { */ + /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ + /* 0, 1 ); */ + /* if ( error ) // `glyph' unchanged */ + /* ... */ + /* } */ + /* */ + /* // access bitmap content by typecasting */ + /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ + /* */ + /* // do funny stuff with it, like blitting/drawing */ + /* ... */ + /* */ + /* // discard glyph image (bitmap or not) */ + /* FT_Done_Glyph( glyph ); */ + /* } */ + /* */ + /* */ + /* Here another example, again without error handling: */ + /* */ + /* */ + /* { */ + /* FT_Glyph glyphs[MAX_GLYPHS] */ + /* */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ + /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* { */ + /* FT_Glyph bitmap = glyphs[idx]; */ + /* */ + /* */ + /* ... */ + /* */ + /* // after this call, `bitmap' no longer points into */ + /* // the `glyphs' array (and the old value isn't destroyed) */ + /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ + /* */ + /* ... */ + /* */ + /* FT_Done_Glyph( bitmap ); */ + /* } */ + /* */ + /* ... */ + /* */ + /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ + /* FT_Done_Glyph( glyphs[idx] ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, + FT_Render_Mode render_mode, + FT_Vector* origin, + FT_Bool destroy ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Glyph */ + /* */ + /* <Description> */ + /* Destroy a given glyph. */ + /* */ + /* <Input> */ + /* glyph :: A handle to the target glyph object. */ + /* */ + FT_EXPORT( void ) + FT_Done_Glyph( FT_Glyph glyph ); + + /* */ + + + /* other helpful functions */ + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Multiply */ + /* */ + /* <Description> */ + /* Perform the matrix operation `b = a*b'. */ + /* */ + /* <Input> */ + /* a :: A pointer to matrix `a'. */ + /* */ + /* <InOut> */ + /* b :: A pointer to matrix `b'. */ + /* */ + /* <Note> */ + /* The result is undefined if either `a' or `b' is zero. */ + /* */ + FT_EXPORT( void ) + FT_Matrix_Multiply( const FT_Matrix* a, + FT_Matrix* b ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Matrix_Invert */ + /* */ + /* <Description> */ + /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ + /* */ + /* <InOut> */ + /* matrix :: A pointer to the target matrix. Remains untouched in */ + /* case of error. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Matrix_Invert( FT_Matrix* matrix ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTGLYPH_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgxval.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgxval.h new file mode 100644 index 0000000..497015c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgxval.h @@ -0,0 +1,358 @@ +/***************************************************************************/ +/* */ +/* ftgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004, 2005, 2006 by */ +/* Masatake YAMATO, Redhat K.K, */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGXVAL_H__ +#define __FTGXVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gx_validation */ + /* */ + /* <Title> */ + /* TrueTypeGX/AAT Validation */ + /* */ + /* <Abstract> */ + /* An API to validate TrueTypeGX/AAT tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ + /* trak, prop, lcar). */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* Warning: Use FT_VALIDATE_XXX to validate a table. */ + /* Following definitions are for gxvalid developers. */ + /* */ + /* */ + /*************************************************************************/ + +#define FT_VALIDATE_feat_INDEX 0 +#define FT_VALIDATE_mort_INDEX 1 +#define FT_VALIDATE_morx_INDEX 2 +#define FT_VALIDATE_bsln_INDEX 3 +#define FT_VALIDATE_just_INDEX 4 +#define FT_VALIDATE_kern_INDEX 5 +#define FT_VALIDATE_opbd_INDEX 6 +#define FT_VALIDATE_trak_INDEX 7 +#define FT_VALIDATE_prop_INDEX 8 +#define FT_VALIDATE_lcar_INDEX 9 +#define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX + + + /************************************************************************* + * + * @macro: + * FT_VALIDATE_GX_LENGTH + * + * @description: + * The number of tables checked in this module. Use it as a parameter + * for the `table-length' argument of function @FT_TrueTypeGX_Validate. + */ +#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1) + + /* */ + + /* Up to 0x1000 is used by otvalid. + Ox2xxx is reserved for feature OT extension. */ +#define FT_VALIDATE_GX_START 0x4000 +#define FT_VALIDATE_GX_BITFIELD( tag ) \ + ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_GXXXX + * + * @description: + * A list of bit-field constants used with @FT_TrueTypeGX_Validate to + * indicate which TrueTypeGX/AAT Type tables should be validated. + * + * @values: + * FT_VALIDATE_feat :: + * Validate `feat' table. + * + * FT_VALIDATE_mort :: + * Validate `mort' table. + * + * FT_VALIDATE_morx :: + * Validate `morx' table. + * + * FT_VALIDATE_bsln :: + * Validate `bsln' table. + * + * FT_VALIDATE_just :: + * Validate `just' table. + * + * FT_VALIDATE_kern :: + * Validate `kern' table. + * + * FT_VALIDATE_opbd :: + * Validate `opbd' table. + * + * FT_VALIDATE_trak :: + * Validate `trak' table. + * + * FT_VALIDATE_prop :: + * Validate `prop' table. + * + * FT_VALIDATE_lcar :: + * Validate `lcar' table. + * + * FT_VALIDATE_GX :: + * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, + * opbd, trak, prop and lcar). + * + */ + +#define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) +#define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) +#define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) +#define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) +#define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) +#define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) +#define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) +#define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) +#define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) +#define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) + +#define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ + FT_VALIDATE_mort | \ + FT_VALIDATE_morx | \ + FT_VALIDATE_bsln | \ + FT_VALIDATE_just | \ + FT_VALIDATE_kern | \ + FT_VALIDATE_opbd | \ + FT_VALIDATE_trak | \ + FT_VALIDATE_prop | \ + FT_VALIDATE_lcar ) + + + /* */ + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Validate + * + * @description: + * Validate various TrueTypeGX tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the tables to be validated. See + * @FT_VALIDATE_GXXXX for possible values. + * + * table_length :: + * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH + * should be passed. + * + * @output: + * tables :: + * The array where all validated sfnt tables are stored. + * The array itself must be allocated by a client. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with TrueTypeGX fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the buffers pointed to by + * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value + * indicates that the table either doesn't exist in the font, the + * application hasn't asked for validation, or the validator doesn't have + * the ability to validate the sfnt table. + */ + FT_EXPORT( FT_Error ) + FT_TrueTypeGX_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + /* */ + + /********************************************************************** + * + * @function: + * FT_TrueTypeGX_Free + * + * @description: + * Free the buffer allocated by TrueTypeGX validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer allocated by + * @FT_TrueTypeGX_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_TrueTypeGX_Validate only. + */ + FT_EXPORT( void ) + FT_TrueTypeGX_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_CKERNXXX + * + * @description: + * A list of bit-field constants used with @FT_ClassicKern_Validate + * to indicate the classic kern dialect or dialects. If the selected + * type doesn't fit, @FT_ClassicKern_Validate regards the table as + * invalid. + * + * @values: + * FT_VALIDATE_MS :: + * Handle the `kern' table as a classic Microsoft kern table. + * + * FT_VALIDATE_APPLE :: + * Handle the `kern' table as a classic Apple kern table. + * + * FT_VALIDATE_CKERN :: + * Handle the `kern' as either classic Apple or Microsoft kern table. + */ +#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) +#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) + +#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) + + + /* */ + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Validate + * + * @description: + * Validate classic (16-bit format) kern table to assure that the offsets + * and indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without error + * checking (which can be quite time consuming). + * + * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both + * the new 32-bit format and the classic 16-bit format, while + * FT_ClassicKern_Validate only supports the classic 16-bit format. + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the dialect to be validated. See + * @FT_VALIDATE_CKERNXXX for possible values. + * + * @output: + * ckern_table :: + * A pointer to the kern table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * After use, the application should deallocate the buffers pointed to by + * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value + * indicates that the table doesn't exist in the font. + */ + FT_EXPORT( FT_Error ) + FT_ClassicKern_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *ckern_table ); + + + /* */ + + /********************************************************************** + * + * @function: + * FT_ClassicKern_Free + * + * @description: + * Free the buffer allocated by classic Kern validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_ClassicKern_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_ClassicKern_Validate only. + */ + FT_EXPORT( void ) + FT_ClassicKern_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTGXVAL_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgzip.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgzip.h new file mode 100644 index 0000000..acbc4f0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftgzip.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftgzip.h */ +/* */ +/* Gzip-compressed stream support. */ +/* */ +/* Copyright 2002, 2003, 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGZIP_H__ +#define __FTGZIP_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* gzip */ + /* */ + /* <Title> */ + /* GZIP Streams */ + /* */ + /* <Abstract> */ + /* Using gzip-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Gzip-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenGzip + * + * @description: + * Open a new stream to parse gzip-compressed font files. This is + * mainly used to support the compressed `*.pcf.gz' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, gzip compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a gzipped stream from + * it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenGzip( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGZIP_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftimage.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftimage.h new file mode 100644 index 0000000..04b5e04 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftimage.h @@ -0,0 +1,1313 @@ +/***************************************************************************/ +/* */ +/* ftimage.h */ +/* */ +/* FreeType glyph image formats and default raster interface */ +/* (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Note: A `raster' is simply a scan-line converter, used to render */ + /* FT_Outlines into FT_Bitmaps. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTIMAGE_H__ +#define __FTIMAGE_H__ + + + /* _STANDALONE_ is from ftgrays.c */ +#ifndef _STANDALONE_ +#include <ft2build.h> +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pos */ + /* */ + /* <Description> */ + /* The type FT_Pos is used to store vectorial coordinates. Depending */ + /* on the context, these can represent distances in integer font */ + /* units, or 16.16, or 26.6 fixed float pixel coordinates. */ + /* */ + typedef signed long FT_Pos; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Vector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector; coordinates are of */ + /* the FT_Pos type. */ + /* */ + /* <Fields> */ + /* x :: The horizontal coordinate. */ + /* y :: The vertical coordinate. */ + /* */ + typedef struct FT_Vector_ + { + FT_Pos x; + FT_Pos y; + + } FT_Vector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_BBox */ + /* */ + /* <Description> */ + /* A structure used to hold an outline's bounding box, i.e., the */ + /* coordinates of its extrema in the horizontal and vertical */ + /* directions. */ + /* */ + /* <Fields> */ + /* xMin :: The horizontal minimum (left-most). */ + /* */ + /* yMin :: The vertical minimum (bottom-most). */ + /* */ + /* xMax :: The horizontal maximum (right-most). */ + /* */ + /* yMax :: The vertical maximum (top-most). */ + /* */ + /* <Note> */ + /* The bounding box is specified with the coordinates of the lower */ + /* left and the upper right corner. In PostScript, those values are */ + /* often called (llx,lly) and (urx,ury), respectively. */ + /* */ + /* If `yMin' is negative, this value gives the glyph's descender. */ + /* Otherwise, the glyph doesn't descend below the baseline. */ + /* Similarly, if `ymax' is positive, this value gives the glyph's */ + /* ascender. */ + /* */ + /* `xMin' gives the horizontal distance from the glyph's origin to */ + /* the left edge of the glyph's bounding box. If `xMin' is negative, */ + /* the glyph extends to the left of the origin. */ + /* */ + typedef struct FT_BBox_ + { + FT_Pos xMin, yMin; + FT_Pos xMax, yMax; + + } FT_BBox; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Pixel_Mode */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of pixels in a */ + /* given bitmap. Note that additional formats may be added in the */ + /* future. */ + /* */ + /* <Values> */ + /* FT_PIXEL_MODE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_PIXEL_MODE_MONO :: */ + /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ + /* are stored in most-significant order (MSB), which means that */ + /* the left-most pixel in a byte has value 128. */ + /* */ + /* FT_PIXEL_MODE_GRAY :: */ + /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ + /* images. Each pixel is stored in one byte. Note that the number */ + /* of `gray' levels is stored in the `num_grays' field of the */ + /* @FT_Bitmap structure (it generally is 256). */ + /* */ + /* FT_PIXEL_MODE_GRAY2 :: */ + /* A 2-bit per pixel bitmap, used to represent embedded */ + /* anti-aliased bitmaps in font files according to the OpenType */ + /* specification. We haven't found a single font using this */ + /* format, however. */ + /* */ + /* FT_PIXEL_MODE_GRAY4 :: */ + /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ + /* bitmaps in font files according to the OpenType specification. */ + /* We haven't found a single font using this format, however. */ + /* */ + /* FT_PIXEL_MODE_LCD :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on LCD displays; the bitmap is three times */ + /* wider than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD. */ + /* */ + /* FT_PIXEL_MODE_LCD_V :: */ + /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ + /* used for display on rotated LCD displays; the bitmap is three */ + /* times taller than the original glyph image. See also */ + /* @FT_RENDER_MODE_LCD_V. */ + /* */ + typedef enum FT_Pixel_Mode_ + { + FT_PIXEL_MODE_NONE = 0, + FT_PIXEL_MODE_MONO, + FT_PIXEL_MODE_GRAY, + FT_PIXEL_MODE_GRAY2, + FT_PIXEL_MODE_GRAY4, + FT_PIXEL_MODE_LCD, + FT_PIXEL_MODE_LCD_V, + + FT_PIXEL_MODE_MAX /* do not remove */ + + } FT_Pixel_Mode; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_pixel_mode_xxx */ + /* */ + /* <Description> */ + /* A list of deprecated constants. Use the corresponding */ + /* @FT_Pixel_Mode values instead. */ + /* */ + /* <Values> */ + /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */ + /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */ + /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */ + /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */ + /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */ + /* */ +#define ft_pixel_mode_none FT_PIXEL_MODE_NONE +#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO +#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY +#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 +#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 + + /* */ + +#if 0 + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Palette_Mode */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */ + /* */ + /* An enumeration type to describe the format of a bitmap palette, */ + /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ + /* */ + /* <Values> */ + /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */ + /* records. */ + /* */ + /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */ + /* records. */ + /* */ + /* <Note> */ + /* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */ + /* FreeType, these types are not handled by the library itself. */ + /* */ + typedef enum FT_Palette_Mode_ + { + ft_palette_mode_rgb = 0, + ft_palette_mode_rgba, + + ft_palette_mode_max /* do not remove */ + + } FT_Palette_Mode; + + /* */ + +#endif + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Bitmap */ + /* */ + /* <Description> */ + /* A structure used to describe a bitmap or pixmap to the raster. */ + /* Note that we now manage pixmaps of various depths through the */ + /* `pixel_mode' field. */ + /* */ + /* <Fields> */ + /* rows :: The number of bitmap rows. */ + /* */ + /* width :: The number of pixels in bitmap row. */ + /* */ + /* pitch :: The pitch's absolute value is the number of bytes */ + /* taken by one bitmap row, including padding. */ + /* However, the pitch is positive when the bitmap has */ + /* a `down' flow, and negative when it has an `up' */ + /* flow. In all cases, the pitch is an offset to add */ + /* to a bitmap pointer in order to go down one row. */ + /* */ + /* Note that `padding' means the alignment of a */ + /* bitmap to a byte border, and FreeType functions */ + /* normally align to the smallest possible integer */ + /* value. */ + /* */ + /* For the B/W rasterizer, `pitch' is always an even */ + /* number. */ + /* */ + /* To change the pitch of a bitmap (say, to make it a */ + /* multiple of 4), use @FT_Bitmap_Convert. */ + /* Alternatively, you might use callback functions to */ + /* directly render to the application's surface; see */ + /* the file `example2.cpp' in the tutorial for a */ + /* demonstration. */ + /* */ + /* buffer :: A typeless pointer to the bitmap buffer. This */ + /* value should be aligned on 32-bit boundaries in */ + /* most cases. */ + /* */ + /* num_grays :: This field is only used with */ + /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ + /* levels used in the bitmap. */ + /* */ + /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ + /* See @FT_Pixel_Mode for possible values. */ + /* */ + /* palette_mode :: This field is intended for paletted pixel modes; */ + /* it indicates how the palette is stored. Not */ + /* used currently. */ + /* */ + /* palette :: A typeless pointer to the bitmap palette; this */ + /* field is intended for paletted pixel modes. Not */ + /* used currently. */ + /* */ + /* <Note> */ + /* For now, the only pixel modes supported by FreeType are mono and */ + /* grays. However, drivers might be added in the future to support */ + /* more `colorful' options. */ + /* */ + typedef struct FT_Bitmap_ + { + int rows; + int width; + int pitch; + unsigned char* buffer; + short num_grays; + char pixel_mode; + char palette_mode; + void* palette; + + } FT_Bitmap; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline */ + /* */ + /* <Description> */ + /* This structure is used to describe an outline to the scan-line */ + /* converter. */ + /* */ + /* <Fields> */ + /* n_contours :: The number of contours in the outline. */ + /* */ + /* n_points :: The number of points in the outline. */ + /* */ + /* points :: A pointer to an array of `n_points' @FT_Vector */ + /* elements, giving the outline's point coordinates. */ + /* */ + /* tags :: A pointer to an array of `n_points' chars, giving */ + /* each outline point's type. */ + /* */ + /* If bit~0 is unset, the point is `off' the curve, */ + /* i.e., a Bézier control point, while it is `on' if */ + /* set. */ + /* */ + /* Bit~1 is meaningful for `off' points only. If set, */ + /* it indicates a third-order Bézier arc control point; */ + /* and a second-order control point if unset. */ + /* */ + /* If bit~2 is set, bits 5-7 contain the drop-out mode */ + /* (as defined in the OpenType specification; the value */ + /* is the same as the argument to the SCANMODE */ + /* instruction). */ + /* */ + /* Bits 3 and~4 are reserved for internal purposes. */ + /* */ + /* contours :: An array of `n_contours' shorts, giving the end */ + /* point of each contour within the outline. For */ + /* example, the first contour is defined by the points */ + /* `0' to `contours[0]', the second one is defined by */ + /* the points `contours[0]+1' to `contours[1]', etc. */ + /* */ + /* flags :: A set of bit flags used to characterize the outline */ + /* and give hints to the scan-converter and hinter on */ + /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */ + /* */ + /* <Note> */ + /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ + /* first point of each contour. The drop-out mode as given with */ + /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ + /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ + /* */ + typedef struct FT_Outline_ + { + short n_contours; /* number of contours in glyph */ + short n_points; /* number of points in the glyph */ + + FT_Vector* points; /* the outline's points */ + char* tags; /* the points flags */ + short* contours; /* the contour end points */ + + int flags; /* outline masks */ + + } FT_Outline; + + /* Following limits must be consistent with */ + /* FT_Outline.{n_contours,n_points} */ +#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX +#define FT_OUTLINE_POINTS_MAX SHRT_MAX + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_OUTLINE_FLAGS */ + /* */ + /* <Description> */ + /* A list of bit-field constants use for the flags in an outline's */ + /* `flags' field. */ + /* */ + /* <Values> */ + /* FT_OUTLINE_NONE :: */ + /* Value~0 is reserved. */ + /* */ + /* FT_OUTLINE_OWNER :: */ + /* If set, this flag indicates that the outline's field arrays */ + /* (i.e., `points', `flags', and `contours') are `owned' by the */ + /* outline object, and should thus be freed when it is destroyed. */ + /* */ + /* FT_OUTLINE_EVEN_ODD_FILL :: */ + /* By default, outlines are filled using the non-zero winding rule. */ + /* If set to 1, the outline will be filled using the even-odd fill */ + /* rule (only works with the smooth rasterizer). */ + /* */ + /* FT_OUTLINE_REVERSE_FILL :: */ + /* By default, outside contours of an outline are oriented in */ + /* clock-wise direction, as defined in the TrueType specification. */ + /* This flag is set if the outline uses the opposite direction */ + /* (typically for Type~1 fonts). This flag is ignored by the scan */ + /* converter. */ + /* */ + /* FT_OUTLINE_IGNORE_DROPOUTS :: */ + /* By default, the scan converter will try to detect drop-outs in */ + /* an outline and correct the glyph bitmap to ensure consistent */ + /* shape continuity. If set, this flag hints the scan-line */ + /* converter to ignore such cases. See below for more information. */ + /* */ + /* FT_OUTLINE_SMART_DROPOUTS :: */ + /* Select smart dropout control. If unset, use simple dropout */ + /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ + /* below for more information. */ + /* */ + /* FT_OUTLINE_INCLUDE_STUBS :: */ + /* If set, turn pixels on for `stubs', otherwise exclude them. */ + /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ + /* more information. */ + /* */ + /* FT_OUTLINE_HIGH_PRECISION :: */ + /* This flag indicates that the scan-line converter should try to */ + /* convert this outline to bitmaps with the highest possible */ + /* quality. It is typically set for small character sizes. Note */ + /* that this is only a hint that might be completely ignored by a */ + /* given scan-converter. */ + /* */ + /* FT_OUTLINE_SINGLE_PASS :: */ + /* This flag is set to force a given scan-converter to only use a */ + /* single pass over the outline to render a bitmap glyph image. */ + /* Normally, it is set for very large character sizes. It is only */ + /* a hint that might be completely ignored by a given */ + /* scan-converter. */ + /* */ + /* <Note> */ + /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ + /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ + /* rasterizer. */ + /* */ + /* There exists a second mechanism to pass the drop-out mode to the */ + /* B/W rasterizer; see the `tags' field in @FT_Outline. */ + /* */ + /* Please refer to the description of the `SCANTYPE' instruction in */ + /* the OpenType specification (in file `ttinst1.doc') how simple */ + /* drop-outs, smart drop-outs, and stubs are defined. */ + /* */ +#define FT_OUTLINE_NONE 0x0 +#define FT_OUTLINE_OWNER 0x1 +#define FT_OUTLINE_EVEN_ODD_FILL 0x2 +#define FT_OUTLINE_REVERSE_FILL 0x4 +#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 +#define FT_OUTLINE_SMART_DROPOUTS 0x10 +#define FT_OUTLINE_INCLUDE_STUBS 0x20 + +#define FT_OUTLINE_HIGH_PRECISION 0x100 +#define FT_OUTLINE_SINGLE_PASS 0x200 + + + /************************************************************************* + * + * @enum: + * ft_outline_flags + * + * @description: + * These constants are deprecated. Please use the corresponding + * @FT_OUTLINE_FLAGS values. + * + * @values: + * ft_outline_none :: See @FT_OUTLINE_NONE. + * ft_outline_owner :: See @FT_OUTLINE_OWNER. + * ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL. + * ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL. + * ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS. + * ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION. + * ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS. + */ +#define ft_outline_none FT_OUTLINE_NONE +#define ft_outline_owner FT_OUTLINE_OWNER +#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL +#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL +#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS +#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION +#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS + + /* */ + +#define FT_CURVE_TAG( flag ) ( flag & 3 ) + +#define FT_CURVE_TAG_ON 1 +#define FT_CURVE_TAG_CONIC 0 +#define FT_CURVE_TAG_CUBIC 2 + +#define FT_CURVE_TAG_HAS_SCANMODE 4 + +#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ +#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ + +#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ + FT_CURVE_TAG_TOUCH_Y ) + +#define FT_Curve_Tag_On FT_CURVE_TAG_ON +#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC +#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC +#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X +#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_MoveToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `move */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `move to' is emitted to start a new contour in an outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `move to'. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_MoveToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_LineToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `line */ + /* to' function during outline walking/decomposition. */ + /* */ + /* A `line to' is emitted to indicate a segment in the outline. */ + /* */ + /* <Input> */ + /* to :: A pointer to the target point of the `line to'. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of the */ + /* decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_LineToFunc)( const FT_Vector* to, + void* user ); + +#define FT_Outline_LineTo_Func FT_Outline_LineToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_ConicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `conic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `conic to' is emitted to indicate a second-order Bézier arc in */ + /* the outline. */ + /* */ + /* <Input> */ + /* control :: An intermediate control point between the last position */ + /* and the new target in `to'. */ + /* */ + /* to :: A pointer to the target end point of the conic arc. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_ConicToFunc)( const FT_Vector* control, + const FT_Vector* to, + void* user ); + +#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Outline_CubicToFunc */ + /* */ + /* <Description> */ + /* A function pointer type used to describe the signature of a `cubic */ + /* to' function during outline walking or decomposition. */ + /* */ + /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ + /* */ + /* <Input> */ + /* control1 :: A pointer to the first Bézier control point. */ + /* */ + /* control2 :: A pointer to the second Bézier control point. */ + /* */ + /* to :: A pointer to the target end point. */ + /* */ + /* user :: A typeless pointer which is passed from the caller of */ + /* the decomposition function. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + typedef int + (*FT_Outline_CubicToFunc)( const FT_Vector* control1, + const FT_Vector* control2, + const FT_Vector* to, + void* user ); + +#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Outline_Funcs */ + /* */ + /* <Description> */ + /* A structure to hold various function pointers used during outline */ + /* decomposition in order to emit segments, conic, and cubic Béziers. */ + /* */ + /* <Fields> */ + /* move_to :: The `move to' emitter. */ + /* */ + /* line_to :: The segment emitter. */ + /* */ + /* conic_to :: The second-order Bézier arc emitter. */ + /* */ + /* cubic_to :: The third-order Bézier arc emitter. */ + /* */ + /* shift :: The shift that is applied to coordinates before they */ + /* are sent to the emitter. */ + /* */ + /* delta :: The delta that is applied to coordinates before they */ + /* are sent to the emitter, but after the shift. */ + /* */ + /* <Note> */ + /* The point coordinates sent to the emitters are the transformed */ + /* version of the original coordinates (this is important for high */ + /* accuracy during scan-conversion). The transformation is simple: */ + /* */ + /* { */ + /* x' = (x << shift) - delta */ + /* y' = (x << shift) - delta */ + /* } */ + /* */ + /* Set the values of `shift' and `delta' to~0 to get the original */ + /* point coordinates. */ + /* */ + typedef struct FT_Outline_Funcs_ + { + FT_Outline_MoveToFunc move_to; + FT_Outline_LineToFunc line_to; + FT_Outline_ConicToFunc conic_to; + FT_Outline_CubicToFunc cubic_to; + + int shift; + FT_Pos delta; + + } FT_Outline_Funcs; + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_IMAGE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags to an unsigned long type. */ + /* */ + /* <Note> */ + /* Since many 16-bit compilers don't like 32-bit enumerations, you */ + /* should redefine this macro in case of problems to something like */ + /* this: */ + /* */ + /* { */ + /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ + /* } */ + /* */ + /* to get a simple enumeration without assigning special numbers. */ + /* */ +#ifndef FT_IMAGE_TAG +#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ + value = ( ( (unsigned long)_x1 << 24 ) | \ + ( (unsigned long)_x2 << 16 ) | \ + ( (unsigned long)_x3 << 8 ) | \ + (unsigned long)_x4 ) +#endif /* FT_IMAGE_TAG */ + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Glyph_Format */ + /* */ + /* <Description> */ + /* An enumeration type used to describe the format of a given glyph */ + /* image. Note that this version of FreeType only supports two image */ + /* formats, even though future font drivers will be able to register */ + /* their own format. */ + /* */ + /* <Values> */ + /* FT_GLYPH_FORMAT_NONE :: */ + /* The value~0 is reserved. */ + /* */ + /* FT_GLYPH_FORMAT_COMPOSITE :: */ + /* The glyph image is a composite of several other images. This */ + /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ + /* report compound glyphs (like accented characters). */ + /* */ + /* FT_GLYPH_FORMAT_BITMAP :: */ + /* The glyph image is a bitmap, and can be described as an */ + /* @FT_Bitmap. You generally need to access the `bitmap' field of */ + /* the @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_OUTLINE :: */ + /* The glyph image is a vectorial outline made of line segments */ + /* and Bézier arcs; it can be described as an @FT_Outline; you */ + /* generally want to access the `outline' field of the */ + /* @FT_GlyphSlotRec structure to read it. */ + /* */ + /* FT_GLYPH_FORMAT_PLOTTER :: */ + /* The glyph image is a vectorial path with no inside and outside */ + /* contours. Some Type~1 fonts, like those in the Hershey family, */ + /* contain glyphs in this format. These are described as */ + /* @FT_Outline, but FreeType isn't currently capable of rendering */ + /* them correctly. */ + /* */ + typedef enum FT_Glyph_Format_ + { + FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), + + FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) + + } FT_Glyph_Format; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* ft_glyph_format_xxx */ + /* */ + /* <Description> */ + /* A list of deprecated constants. Use the corresponding */ + /* @FT_Glyph_Format values instead. */ + /* */ + /* <Values> */ + /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */ + /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */ + /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */ + /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */ + /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */ + /* */ +#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE +#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE +#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP +#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE +#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** R A S T E R D E F I N I T I O N S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* A raster is a scan converter, in charge of rendering an outline into */ + /* a a bitmap. This section contains the public API for rasters. */ + /* */ + /* Note that in FreeType 2, all rasters are now encapsulated within */ + /* specific modules called `renderers'. See `freetype/ftrender.h' for */ + /* more details on renderers. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* raster */ + /* */ + /* <Title> */ + /* Scanline Converter */ + /* */ + /* <Abstract> */ + /* How vectorial outlines are converted into bitmaps and pixmaps. */ + /* */ + /* <Description> */ + /* This section contains technical definitions. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Raster */ + /* */ + /* <Description> */ + /* A handle (pointer) to a raster object. Each object can be used */ + /* independently to convert an outline into a bitmap or pixmap. */ + /* */ + typedef struct FT_RasterRec_* FT_Raster; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Span */ + /* */ + /* <Description> */ + /* A structure used to model a single span of gray (or black) pixels */ + /* when rendering a monochrome or anti-aliased bitmap. */ + /* */ + /* <Fields> */ + /* x :: The span's horizontal start position. */ + /* */ + /* len :: The span's length in pixels. */ + /* */ + /* coverage :: The span color/coverage, ranging from 0 (background) */ + /* to 255 (foreground). Only used for anti-aliased */ + /* rendering. */ + /* */ + /* <Note> */ + /* This structure is used by the span drawing callback type named */ + /* @FT_SpanFunc which takes the y~coordinate of the span as a */ + /* a parameter. */ + /* */ + /* The coverage value is always between 0 and 255. If you want less */ + /* gray values, the callback function has to reduce them. */ + /* */ + typedef struct FT_Span_ + { + short x; + unsigned short len; + unsigned char coverage; + + } FT_Span; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_SpanFunc */ + /* */ + /* <Description> */ + /* A function used as a call-back by the anti-aliased renderer in */ + /* order to let client applications draw themselves the gray pixel */ + /* spans on each scan line. */ + /* */ + /* <Input> */ + /* y :: The scanline's y~coordinate. */ + /* */ + /* count :: The number of spans to draw on this scanline. */ + /* */ + /* spans :: A table of `count' spans to draw on the scanline. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Note> */ + /* This callback allows client applications to directly render the */ + /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ + /* */ + /* This can be used to write anti-aliased outlines directly to a */ + /* given background bitmap, and even perform translucency. */ + /* */ + /* Note that the `count' field cannot be greater than a fixed value */ + /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */ + /* `ftoption.h'. By default, this value is set to~32, which means */ + /* that if there are more than 32~spans on a given scanline, the */ + /* callback is called several times with the same `y' parameter in */ + /* order to draw all callbacks. */ + /* */ + /* Otherwise, the callback is only called once per scan-line, and */ + /* only for those scanlines that do have `gray' pixels on them. */ + /* */ + typedef void + (*FT_SpanFunc)( int y, + int count, + const FT_Span* spans, + void* user ); + +#define FT_Raster_Span_Func FT_SpanFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitTest_Func */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ + /* */ + /* A function used as a call-back by the monochrome scan-converter */ + /* to test whether a given target pixel is already set to the drawing */ + /* `color'. These tests are crucial to implement drop-out control */ + /* per-se the TrueType spec. */ + /* */ + /* <Input> */ + /* y :: The pixel's y~coordinate. */ + /* */ + /* x :: The pixel's x~coordinate. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Return> */ + /* 1~if the pixel is `set', 0~otherwise. */ + /* */ + typedef int + (*FT_Raster_BitTest_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_BitSet_Func */ + /* */ + /* <Description> */ + /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ + /* */ + /* A function used as a call-back by the monochrome scan-converter */ + /* to set an individual target pixel. This is crucial to implement */ + /* drop-out control according to the TrueType specification. */ + /* */ + /* <Input> */ + /* y :: The pixel's y~coordinate. */ + /* */ + /* x :: The pixel's x~coordinate. */ + /* */ + /* user :: User-supplied data that is passed to the callback. */ + /* */ + /* <Return> */ + /* 1~if the pixel is `set', 0~otherwise. */ + /* */ + typedef void + (*FT_Raster_BitSet_Func)( int y, + int x, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flag constants as used in the `flags' field of a */ + /* @FT_Raster_Params structure. */ + /* */ + /* <Values> */ + /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ + /* */ + /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ + /* anti-aliased glyph image should be */ + /* generated. Otherwise, it will be */ + /* monochrome (1-bit). */ + /* */ + /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ + /* rendering. In this mode, client */ + /* applications must provide their own span */ + /* callback. This lets them directly */ + /* draw or compose over an existing bitmap. */ + /* If this bit is not set, the target */ + /* pixmap's buffer _must_ be zeroed before */ + /* rendering. */ + /* */ + /* Note that for now, direct rendering is */ + /* only possible with anti-aliased glyphs. */ + /* */ + /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ + /* rendering mode. If set, the output will */ + /* be clipped to a box specified in the */ + /* `clip_box' field of the */ + /* @FT_Raster_Params structure. */ + /* */ + /* Note that by default, the glyph bitmap */ + /* is clipped to the target pixmap, except */ + /* in direct rendering mode where all spans */ + /* are generated if no clipping box is set. */ + /* */ +#define FT_RASTER_FLAG_DEFAULT 0x0 +#define FT_RASTER_FLAG_AA 0x1 +#define FT_RASTER_FLAG_DIRECT 0x2 +#define FT_RASTER_FLAG_CLIP 0x4 + + /* deprecated */ +#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT +#define ft_raster_flag_aa FT_RASTER_FLAG_AA +#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT +#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Params */ + /* */ + /* <Description> */ + /* A structure to hold the arguments used by a raster's render */ + /* function. */ + /* */ + /* <Fields> */ + /* target :: The target bitmap. */ + /* */ + /* source :: A pointer to the source glyph image (e.g., an */ + /* @FT_Outline). */ + /* */ + /* flags :: The rendering flags. */ + /* */ + /* gray_spans :: The gray span drawing callback. */ + /* */ + /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */ + /* */ + /* bit_test :: The bit test callback. UNIMPLEMENTED! */ + /* */ + /* bit_set :: The bit set callback. UNIMPLEMENTED! */ + /* */ + /* user :: User-supplied data that is passed to each drawing */ + /* callback. */ + /* */ + /* clip_box :: An optional clipping box. It is only used in */ + /* direct rendering mode. Note that coordinates here */ + /* should be expressed in _integer_ pixels (and not in */ + /* 26.6 fixed-point units). */ + /* */ + /* <Note> */ + /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ + /* bit flag is set in the `flags' field, otherwise a monochrome */ + /* bitmap is generated. */ + /* */ + /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ + /* raster will call the `gray_spans' callback to draw gray pixel */ + /* spans, in the case of an aa glyph bitmap, it will call */ + /* `black_spans', and `bit_test' and `bit_set' in the case of a */ + /* monochrome bitmap. This allows direct composition over a */ + /* pre-existing bitmap through user-provided callbacks to perform the */ + /* span drawing/composition. */ + /* */ + /* Note that the `bit_test' and `bit_set' callbacks are required when */ + /* rendering a monochrome bitmap, as they are crucial to implement */ + /* correct drop-out control as defined in the TrueType specification. */ + /* */ + typedef struct FT_Raster_Params_ + { + const FT_Bitmap* target; + const void* source; + int flags; + FT_SpanFunc gray_spans; + FT_SpanFunc black_spans; /* doesn't work! */ + FT_Raster_BitTest_Func bit_test; /* doesn't work! */ + FT_Raster_BitSet_Func bit_set; /* doesn't work! */ + void* user; + FT_BBox clip_box; + + } FT_Raster_Params; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_NewFunc */ + /* */ + /* <Description> */ + /* A function used to create a new raster object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory allocator. */ + /* */ + /* <Output> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `memory' parameter is a typeless pointer in order to avoid */ + /* un-wanted dependencies on the rest of the FreeType code. In */ + /* practice, it is an @FT_Memory object, i.e., a handle to the */ + /* standard FreeType memory allocator. However, this field can be */ + /* completely ignored by a given raster implementation. */ + /* */ + typedef int + (*FT_Raster_NewFunc)( void* memory, + FT_Raster* raster ); + +#define FT_Raster_New_Func FT_Raster_NewFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_DoneFunc */ + /* */ + /* <Description> */ + /* A function used to destroy a given raster object. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + typedef void + (*FT_Raster_DoneFunc)( FT_Raster raster ); + +#define FT_Raster_Done_Func FT_Raster_DoneFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_ResetFunc */ + /* */ + /* <Description> */ + /* FreeType provides an area of memory called the `render pool', */ + /* available to all registered rasters. This pool can be freely used */ + /* during a given scan-conversion but is shared by all rasters. Its */ + /* content is thus transient. */ + /* */ + /* This function is called each time the render pool changes, or just */ + /* after a new raster object is created. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* pool_base :: The address in memory of the render pool. */ + /* */ + /* pool_size :: The size in bytes of the render pool. */ + /* */ + /* <Note> */ + /* Rasters can ignore the render pool and rely on dynamic memory */ + /* allocation if they want to (a handle to the memory allocator is */ + /* passed to the raster constructor). However, this is not */ + /* recommended for efficiency purposes. */ + /* */ + typedef void + (*FT_Raster_ResetFunc)( FT_Raster raster, + unsigned char* pool_base, + unsigned long pool_size ); + +#define FT_Raster_Reset_Func FT_Raster_ResetFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_SetModeFunc */ + /* */ + /* <Description> */ + /* This function is a generic facility to change modes or attributes */ + /* in a given raster. This can be used for debugging purposes, or */ + /* simply to allow implementation-specific `features' in a given */ + /* raster module. */ + /* */ + /* <Input> */ + /* raster :: A handle to the new raster object. */ + /* */ + /* mode :: A 4-byte tag used to name the mode or property. */ + /* */ + /* args :: A pointer to the new mode/property to use. */ + /* */ + typedef int + (*FT_Raster_SetModeFunc)( FT_Raster raster, + unsigned long mode, + void* args ); + +#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Raster_RenderFunc */ + /* */ + /* <Description> */ + /* Invoke a given raster to scan-convert a given glyph image into a */ + /* target bitmap. */ + /* */ + /* <Input> */ + /* raster :: A handle to the raster object. */ + /* */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* store the rendering parameters. */ + /* */ + /* <Return> */ + /* Error code. 0~means success. */ + /* */ + /* <Note> */ + /* The exact format of the source image depends on the raster's glyph */ + /* format defined in its @FT_Raster_Funcs structure. It can be an */ + /* @FT_Outline or anything else in order to support a large array of */ + /* glyph formats. */ + /* */ + /* Note also that the render function can fail and return a */ + /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ + /* not support direct composition. */ + /* */ + /* XXX: For now, the standard raster doesn't support direct */ + /* composition but this should change for the final release (see */ + /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ + /* for examples of distinct implementations which support direct */ + /* composition). */ + /* */ + typedef int + (*FT_Raster_RenderFunc)( FT_Raster raster, + const FT_Raster_Params* params ); + +#define FT_Raster_Render_Func FT_Raster_RenderFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Raster_Funcs */ + /* */ + /* <Description> */ + /* A structure used to describe a given raster class to the library. */ + /* */ + /* <Fields> */ + /* glyph_format :: The supported glyph format for this raster. */ + /* */ + /* raster_new :: The raster constructor. */ + /* */ + /* raster_reset :: Used to reset the render pool within the raster. */ + /* */ + /* raster_render :: A function to render a glyph into a given bitmap. */ + /* */ + /* raster_done :: The raster destructor. */ + /* */ + typedef struct FT_Raster_Funcs_ + { + FT_Glyph_Format glyph_format; + FT_Raster_NewFunc raster_new; + FT_Raster_ResetFunc raster_reset; + FT_Raster_SetModeFunc raster_set_mode; + FT_Raster_RenderFunc raster_render; + FT_Raster_DoneFunc raster_done; + + } FT_Raster_Funcs; + + + /* */ + + +FT_END_HEADER + +#endif /* __FTIMAGE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftincrem.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftincrem.h new file mode 100644 index 0000000..aaf689f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftincrem.h @@ -0,0 +1,353 @@ +/***************************************************************************/ +/* */ +/* ftincrem.h */ +/* */ +/* FreeType incremental loading (specification). */ +/* */ +/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTINCREM_H__ +#define __FTINCREM_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * incremental + * + * @title: + * Incremental Loading + * + * @abstract: + * Custom Glyph Loading. + * + * @description: + * This section contains various functions used to perform so-called + * `incremental' glyph loading. This is a mode where all glyphs loaded + * from a given @FT_Face are provided by the client application, + * + * Apart from that, all other tables are loaded normally from the font + * file. This mode is useful when FreeType is used within another + * engine, e.g., a PostScript Imaging Processor. + * + * To enable this mode, you must use @FT_Open_Face, passing an + * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an + * @FT_Incremental_Interface value. See the comments for + * @FT_Incremental_InterfaceRec for an example. + * + */ + + + /*************************************************************************** + * + * @type: + * FT_Incremental + * + * @description: + * An opaque type describing a user-provided object used to implement + * `incremental' glyph loading within FreeType. This is used to support + * embedded fonts in certain environments (e.g., PostScript interpreters), + * where the glyph data isn't in the font file, or must be overridden by + * different values. + * + * @note: + * It is up to client applications to create and implement @FT_Incremental + * objects, as long as they provide implementations for the methods + * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc + * and @FT_Incremental_GetGlyphMetricsFunc. + * + * See the description of @FT_Incremental_InterfaceRec to understand how + * to use incremental objects with FreeType. + * + */ + typedef struct FT_IncrementalRec_* FT_Incremental; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_MetricsRec + * + * @description: + * A small structure used to contain the basic glyph metrics returned + * by the @FT_Incremental_GetGlyphMetricsFunc method. + * + * @fields: + * bearing_x :: + * Left bearing, in font units. + * + * bearing_y :: + * Top bearing, in font units. + * + * advance :: + * Horizontal component of glyph advance, in font units. + * + * advance_v :: + * Vertical component of glyph advance, in font units. + * + * @note: + * These correspond to horizontal or vertical metrics depending on the + * value of the `vertical' argument to the function + * @FT_Incremental_GetGlyphMetricsFunc. + * + */ + typedef struct FT_Incremental_MetricsRec_ + { + FT_Long bearing_x; + FT_Long bearing_y; + FT_Long advance; + FT_Long advance_v; /* since 2.3.12 */ + + } FT_Incremental_MetricsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_Metrics + * + * @description: + * A handle to an @FT_Incremental_MetricsRec structure. + * + */ + typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphDataFunc + * + * @description: + * A function called by FreeType to access a given glyph's data bytes + * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is + * enabled. + * + * Note that the format of the glyph's data bytes depends on the font + * file format. For TrueType, it must correspond to the raw bytes within + * the `glyf' table. For PostScript formats, it must correspond to the + * *unencrypted* charstring bytes, without any `lenIV' header. It is + * undefined for any other format. + * + * @input: + * incremental :: + * Handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * @output: + * adata :: + * A structure describing the returned glyph data bytes (which will be + * accessed as a read-only byte block). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If this function returns successfully the method + * @FT_Incremental_FreeGlyphDataFunc will be called later to release + * the data bytes. + * + * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for + * compound glyphs. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Data* adata ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_FreeGlyphDataFunc + * + * @description: + * A function used to release the glyph data bytes returned by a + * successful call to @FT_Incremental_GetGlyphDataFunc. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * data :: + * A structure describing the glyph data bytes (which will be accessed + * as a read-only byte block). + * + */ + typedef void + (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, + FT_Data* data ); + + + /*************************************************************************** + * + * @type: + * FT_Incremental_GetGlyphMetricsFunc + * + * @description: + * A function used to retrieve the basic metrics of a given glyph index + * before accessing its data. This is necessary because, in certain + * formats like TrueType, the metrics are stored in a different place from + * the glyph images proper. + * + * @input: + * incremental :: + * A handle to an opaque @FT_Incremental handle provided by the client + * application. + * + * glyph_index :: + * Index of relevant glyph. + * + * vertical :: + * If true, return vertical metrics. + * + * ametrics :: + * This parameter is used for both input and output. + * The original glyph metrics, if any, in font units. If metrics are + * not available all the values must be set to zero. + * + * @output: + * ametrics :: + * The replacement glyph metrics in font units. + * + */ + typedef FT_Error + (*FT_Incremental_GetGlyphMetricsFunc) + ( FT_Incremental incremental, + FT_UInt glyph_index, + FT_Bool vertical, + FT_Incremental_MetricsRec *ametrics ); + + + /************************************************************************** + * + * @struct: + * FT_Incremental_FuncsRec + * + * @description: + * A table of functions for accessing fonts that load data + * incrementally. Used in @FT_Incremental_InterfaceRec. + * + * @fields: + * get_glyph_data :: + * The function to get glyph data. Must not be null. + * + * free_glyph_data :: + * The function to release glyph data. Must not be null. + * + * get_glyph_metrics :: + * The function to get glyph metrics. May be null if the font does + * not provide overriding glyph metrics. + * + */ + typedef struct FT_Incremental_FuncsRec_ + { + FT_Incremental_GetGlyphDataFunc get_glyph_data; + FT_Incremental_FreeGlyphDataFunc free_glyph_data; + FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; + + } FT_Incremental_FuncsRec; + + + /*************************************************************************** + * + * @struct: + * FT_Incremental_InterfaceRec + * + * @description: + * A structure to be used with @FT_Open_Face to indicate that the user + * wants to support incremental glyph loading. You should use it with + * @FT_PARAM_TAG_INCREMENTAL as in the following example: + * + * { + * FT_Incremental_InterfaceRec inc_int; + * FT_Parameter parameter; + * FT_Open_Args open_args; + * + * + * // set up incremental descriptor + * inc_int.funcs = my_funcs; + * inc_int.object = my_object; + * + * // set up optional parameter + * parameter.tag = FT_PARAM_TAG_INCREMENTAL; + * parameter.data = &inc_int; + * + * // set up FT_Open_Args structure + * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; + * open_args.pathname = my_font_pathname; + * open_args.num_params = 1; + * open_args.params = ¶meter; // we use one optional argument + * + * // open the font + * error = FT_Open_Face( library, &open_args, index, &face ); + * ... + * } + * + */ + typedef struct FT_Incremental_InterfaceRec_ + { + const FT_Incremental_FuncsRec* funcs; + FT_Incremental object; + + } FT_Incremental_InterfaceRec; + + + /*************************************************************************** + * + * @type: + * FT_Incremental_Interface + * + * @description: + * A pointer to an @FT_Incremental_InterfaceRec structure. + * + */ + typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_INCREMENTAL + * + * @description: + * A constant used as the tag of @FT_Parameter structures to indicate + * an incremental loading object to be used by FreeType. + * + */ +#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) + + /* */ + +FT_END_HEADER + +#endif /* __FTINCREM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlcdfil.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlcdfil.h new file mode 100644 index 0000000..0b55ebe --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlcdfil.h @@ -0,0 +1,213 @@ +/***************************************************************************/ +/* */ +/* ftlcdfil.h */ +/* */ +/* FreeType API for color filtering of subpixel bitmap glyphs */ +/* (specification). */ +/* */ +/* Copyright 2006, 2007, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_LCD_FILTER_H__ +#define __FT_LCD_FILTER_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************** + * + * @section: + * lcd_filtering + * + * @title: + * LCD Filtering + * + * @abstract: + * Reduce color fringes of LCD-optimized bitmaps. + * + * @description: + * The @FT_Library_SetLcdFilter API can be used to specify a low-pass + * filter which is then applied to LCD-optimized bitmaps generated + * through @FT_Render_Glyph. This is useful to reduce color fringes + * which would occur with unfiltered rendering. + * + * Note that no filter is active by default, and that this function is + * *not* implemented in default builds of the library. You need to + * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file + * in order to activate it. + */ + + + /**************************************************************************** + * + * @enum: + * FT_LcdFilter + * + * @description: + * A list of values to identify various types of LCD filters. + * + * @values: + * FT_LCD_FILTER_NONE :: + * Do not perform filtering. When used with subpixel rendering, this + * results in sometimes severe color fringes. + * + * FT_LCD_FILTER_DEFAULT :: + * The default filter reduces color fringes considerably, at the cost + * of a slight blurriness in the output. + * + * FT_LCD_FILTER_LIGHT :: + * The light filter is a variant that produces less blurriness at the + * cost of slightly more color fringes than the default one. It might + * be better, depending on taste, your monitor, or your personal vision. + * + * FT_LCD_FILTER_LEGACY :: + * This filter corresponds to the original libXft color filter. It + * provides high contrast output but can exhibit really bad color + * fringes if glyphs are not extremely well hinted to the pixel grid. + * In other words, it only works well if the TrueType bytecode + * interpreter is enabled *and* high-quality hinted fonts are used. + * + * This filter is only provided for comparison purposes, and might be + * disabled or stay unsupported in the future. + * + * @since: + * 2.3.0 + */ + typedef enum FT_LcdFilter_ + { + FT_LCD_FILTER_NONE = 0, + FT_LCD_FILTER_DEFAULT = 1, + FT_LCD_FILTER_LIGHT = 2, + FT_LCD_FILTER_LEGACY = 16, + + FT_LCD_FILTER_MAX /* do not remove */ + + } FT_LcdFilter; + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilter + * + * @description: + * This function is used to apply color filtering to LCD decimated + * bitmaps, like the ones used when calling @FT_Render_Glyph with + * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. + * + * @input: + * library :: + * A handle to the target library instance. + * + * filter :: + * The filter type. + * + * You can use @FT_LCD_FILTER_NONE here to disable this feature, or + * @FT_LCD_FILTER_DEFAULT to use a default filter that should work + * well on most LCD screens. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This feature is always disabled by default. Clients must make an + * explicit call to this function with a `filter' value other than + * @FT_LCD_FILTER_NONE in order to enable it. + * + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, + * @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char. + * + * It does _not_ affect the output of @FT_Outline_Render and + * @FT_Outline_Get_Bitmap. + * + * If this feature is activated, the dimensions of LCD glyph bitmaps are + * either larger or taller than the dimensions of the corresponding + * outline with regards to the pixel grid. For example, for + * @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and + * up to 3~pixels to the right. + * + * The bitmap offset values are adjusted correctly, so clients shouldn't + * need to modify their layout and glyph positioning code when enabling + * the filter. + * + * @since: + * 2.3.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilter( FT_Library library, + FT_LcdFilter filter ); + + + /************************************************************************** + * + * @func: + * FT_Library_SetLcdFilterWeights + * + * @description: + * Use this function to override the filter weights selected by + * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple + * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10, + * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and + * FT_LCD_FILTER_LEGACY. + * + * @input: + * library :: + * A handle to the target library instance. + * + * weights :: + * A pointer to an array; the function copies the first five bytes and + * uses them to specify the filter weights. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Due to *PATENTS* covering subpixel rendering, this function doesn't + * do anything except returning `FT_Err_Unimplemented_Feature' if the + * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not + * defined in your build of the library, which should correspond to all + * default builds of FreeType. + * + * This function must be called after @FT_Library_SetLcdFilter to have + * any effect. + * + * @since: + * 2.4.0 + */ + FT_EXPORT( FT_Error ) + FT_Library_SetLcdFilterWeights( FT_Library library, + unsigned char *weights ); + + /* */ + + +FT_END_HEADER + +#endif /* __FT_LCD_FILTER_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlist.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlist.h new file mode 100644 index 0000000..bb6f7f1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlist.h @@ -0,0 +1,277 @@ +/***************************************************************************/ +/* */ +/* ftlist.h */ +/* */ +/* Generic list support for FreeType (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file implements functions relative to list processing. Its */ + /* data structures are defined in `freetype.h'. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTLIST_H__ +#define __FTLIST_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /* <Title> */ + /* List Processing */ + /* */ + /* <Abstract> */ + /* Simple management of lists. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to list */ + /* processing using doubly-linked nodes. */ + /* */ + /* <Order> */ + /* FT_List */ + /* FT_ListNode */ + /* FT_ListRec */ + /* FT_ListNodeRec */ + /* */ + /* FT_List_Add */ + /* FT_List_Insert */ + /* FT_List_Find */ + /* FT_List_Remove */ + /* FT_List_Up */ + /* FT_List_Iterate */ + /* FT_List_Iterator */ + /* FT_List_Finalize */ + /* FT_List_Destructor */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Find */ + /* */ + /* <Description> */ + /* Find the list node for a given listed object. */ + /* */ + /* <Input> */ + /* list :: A pointer to the parent list. */ + /* data :: The address of the listed object. */ + /* */ + /* <Return> */ + /* List node. NULL if it wasn't found. */ + /* */ + FT_EXPORT( FT_ListNode ) + FT_List_Find( FT_List list, + void* data ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Add */ + /* */ + /* <Description> */ + /* Append an element to the end of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to append. */ + /* */ + FT_EXPORT( void ) + FT_List_Add( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Insert */ + /* */ + /* <Description> */ + /* Insert an element at the head of a list. */ + /* */ + /* <InOut> */ + /* list :: A pointer to parent list. */ + /* node :: The node to insert. */ + /* */ + FT_EXPORT( void ) + FT_List_Insert( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Remove */ + /* */ + /* <Description> */ + /* Remove a node from a list. This function doesn't check whether */ + /* the node is in the list! */ + /* */ + /* <Input> */ + /* node :: The node to remove. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* */ + FT_EXPORT( void ) + FT_List_Remove( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Up */ + /* */ + /* <Description> */ + /* Move a node to the head/top of a list. Used to maintain LRU */ + /* lists. */ + /* */ + /* <InOut> */ + /* list :: A pointer to the parent list. */ + /* node :: The node to move. */ + /* */ + FT_EXPORT( void ) + FT_List_Up( FT_List list, + FT_ListNode node ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Iterator */ + /* */ + /* <Description> */ + /* An FT_List iterator function which is called during a list parse */ + /* by @FT_List_Iterate. */ + /* */ + /* <Input> */ + /* node :: The current iteration list node. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. */ + /* Can be used to point to the iteration's state. */ + /* */ + typedef FT_Error + (*FT_List_Iterator)( FT_ListNode node, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Iterate */ + /* */ + /* <Description> */ + /* Parse a list and calls a given iterator function on each element. */ + /* Note that parsing is stopped as soon as one of the iterator calls */ + /* returns a non-zero value. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* iterator :: An iterator function, called on each node of the list. */ + /* user :: A user-supplied field which is passed as the second */ + /* argument to the iterator. */ + /* */ + /* <Return> */ + /* The result (a FreeType error code) of the last iterator call. */ + /* */ + FT_EXPORT( FT_Error ) + FT_List_Iterate( FT_List list, + FT_List_Iterator iterator, + void* user ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_List_Destructor */ + /* */ + /* <Description> */ + /* An @FT_List iterator function which is called during a list */ + /* finalization by @FT_List_Finalize to destroy all elements in a */ + /* given list. */ + /* */ + /* <Input> */ + /* system :: The current system object. */ + /* */ + /* data :: The current object to destroy. */ + /* */ + /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ + /* be used to point to the iteration's state. */ + /* */ + typedef void + (*FT_List_Destructor)( FT_Memory memory, + void* data, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_List_Finalize */ + /* */ + /* <Description> */ + /* Destroy all elements in the list as well as the list itself. */ + /* */ + /* <Input> */ + /* list :: A handle to the list. */ + /* */ + /* destroy :: A list destructor that will be applied to each element */ + /* of the list. */ + /* */ + /* memory :: The current memory object which handles deallocation. */ + /* */ + /* user :: A user-supplied field which is passed as the last */ + /* argument to the destructor. */ + /* */ + /* <Note> */ + /* This function expects that all nodes added by @FT_List_Add or */ + /* @FT_List_Insert have been dynamically allocated. */ + /* */ + FT_EXPORT( void ) + FT_List_Finalize( FT_List list, + FT_List_Destructor destroy, + FT_Memory memory, + void* user ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTLIST_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlzw.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlzw.h new file mode 100644 index 0000000..00d4016 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftlzw.h @@ -0,0 +1,99 @@ +/***************************************************************************/ +/* */ +/* ftlzw.h */ +/* */ +/* LZW-compressed stream support. */ +/* */ +/* Copyright 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTLZW_H__ +#define __FTLZW_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* lzw */ + /* */ + /* <Title> */ + /* LZW Streams */ + /* */ + /* <Abstract> */ + /* Using LZW-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of LZW-specific functions. */ + /* */ + /*************************************************************************/ + + /************************************************************************ + * + * @function: + * FT_Stream_OpenLZW + * + * @description: + * Open a new stream to parse LZW-compressed font files. This is + * mainly used to support the compressed `*.pcf.Z' fonts that come + * with XFree86. + * + * @input: + * stream :: The target embedding stream. + * + * source :: The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream + * + * In certain builds of the library, LZW compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a LZW stream from it + * and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with LZW support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenLZW( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTLZW_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmac.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmac.h new file mode 100644 index 0000000..ab5bab5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmac.h @@ -0,0 +1,274 @@ +/***************************************************************************/ +/* */ +/* ftmac.h */ +/* */ +/* Additional Mac-specific API. */ +/* */ +/* Copyright 1996-2001, 2004, 2006, 2007 by */ +/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* NOTE: Include this file after <freetype/freetype.h> and after any */ +/* Mac-specific headers (because this header uses Mac types such as */ +/* Handle, FSSpec, FSRef, etc.) */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMAC_H__ +#define __FTMAC_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + +/* gcc-3.4.1 and later can warn about functions tagged as deprecated */ +#ifndef FT_DEPRECATED_ATTRIBUTE +#if defined(__GNUC__) && \ + ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define FT_DEPRECATED_ATTRIBUTE +#endif +#endif + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* mac_specific */ + /* */ + /* <Title> */ + /* Mac Specific Interface */ + /* */ + /* <Abstract> */ + /* Only available on the Macintosh. */ + /* */ + /* <Description> */ + /* The following definitions are only available if FreeType is */ + /* compiled on a Macintosh. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FOND */ + /* */ + /* <Description> */ + /* Create a new face object from a FOND resource. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* fond :: A FOND resource. */ + /* */ + /* face_index :: Only supported for the -1 `sanity check' special */ + /* case. */ + /* */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Notes> */ + /* This function can be used to create @FT_Face objects from fonts */ + /* that are installed in the system as follows. */ + /* */ + /* { */ + /* fond = GetResource( 'FOND', fontName ); */ + /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FOND( FT_Library library, + Handle fond, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font (e.g., Times New Roman */ + /* Bold). */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFile_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return an FSSpec for the disk file containing the named font. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* pathSpec :: FSSpec to the file. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* face_index :: Index of the face. For passing to */ + /* @FT_New_Face_From_FSSpec. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFile_From_Mac_ATS_Name( const char* fontName, + FSSpec* pathSpec, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_GetFilePath_From_Mac_ATS_Name */ + /* */ + /* <Description> */ + /* Return a pathname of the disk file and face index for given font */ + /* name which is handled by ATS framework. */ + /* */ + /* <Input> */ + /* fontName :: Mac OS name of the font in ATS framework. */ + /* */ + /* <Output> */ + /* path :: Buffer to store pathname of the file. For passing */ + /* to @FT_New_Face. The client must allocate this */ + /* buffer before calling this function. */ + /* */ + /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ + /* */ + /* face_index :: Index of the face. For passing to @FT_New_Face. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, + UInt8* path, + UInt32 maxPathSize, + FT_Long* face_index ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSSpec */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSSpec to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSSpec to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ + /* it accepts an FSSpec instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSSpec( FT_Library library, + const FSSpec *spec, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Face_From_FSRef */ + /* */ + /* <Description> */ + /* Create a new face object from a given resource and typeface index */ + /* using an FSRef to the font file. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library resource. */ + /* */ + /* <Input> */ + /* spec :: FSRef to the font file. */ + /* */ + /* face_index :: The index of the face within the resource. The */ + /* first face has index~0. */ + /* <Output> */ + /* aface :: A handle to a new face object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ + /* it accepts an FSRef instead of a path. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Face_From_FSRef( FT_Library library, + const FSRef *ref, + FT_Long face_index, + FT_Face *aface ) + FT_DEPRECATED_ATTRIBUTE; + + /* */ + + +FT_END_HEADER + + +#endif /* __FTMAC_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmm.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmm.h new file mode 100644 index 0000000..3aefb9e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmm.h @@ -0,0 +1,378 @@ +/***************************************************************************/ +/* */ +/* ftmm.h */ +/* */ +/* FreeType Multiple Master font interface (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMM_H__ +#define __FTMM_H__ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* multiple_masters */ + /* */ + /* <Title> */ + /* Multiple Masters */ + /* */ + /* <Abstract> */ + /* How to manage Multiple Masters fonts. */ + /* */ + /* <Description> */ + /* The following types and functions are used to manage Multiple */ + /* Master fonts, i.e., the selection of specific design instances by */ + /* setting design axis coordinates. */ + /* */ + /* George Williams has extended this interface to make it work with */ + /* both Type~1 Multiple Masters fonts and GX distortable (var) */ + /* fonts. Some of these routines only work with MM fonts, others */ + /* will work with both types. They are similar enough that a */ + /* consistent interface makes sense. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters fonts. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + typedef struct FT_MM_Axis_ + { + FT_String* name; + FT_Long minimum; + FT_Long maximum; + + } FT_MM_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Multi_Master */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* font. */ + /* */ + /* This structure can't be used for GX var fonts. */ + /* */ + /* <Fields> */ + /* num_axis :: Number of axes. Cannot exceed~4. */ + /* */ + /* num_designs :: Number of designs; should be normally 2^num_axis */ + /* even though the Type~1 specification strangely */ + /* allows for intermediate designs to be present. This */ + /* number cannot exceed~16. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* */ + typedef struct FT_Multi_Master_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_MM_Axis axis[T1_MAX_MM_AXIS]; + + } FT_Multi_Master; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Axis */ + /* */ + /* <Description> */ + /* A simple structure used to model a given axis in design space for */ + /* Multiple Masters and GX var fonts. */ + /* */ + /* <Fields> */ + /* name :: The axis's name. */ + /* Not always meaningful for GX. */ + /* */ + /* minimum :: The axis's minimum design coordinate. */ + /* */ + /* def :: The axis's default design coordinate. */ + /* FreeType computes meaningful default values for MM; it */ + /* is then an integer value, not in 16.16 format. */ + /* */ + /* maximum :: The axis's maximum design coordinate. */ + /* */ + /* tag :: The axis's tag (the GX equivalent to `name'). */ + /* FreeType provides default values for MM if possible. */ + /* */ + /* strid :: The entry in `name' table (another GX version of */ + /* `name'). */ + /* Not meaningful for MM. */ + /* */ + typedef struct FT_Var_Axis_ + { + FT_String* name; + + FT_Fixed minimum; + FT_Fixed def; + FT_Fixed maximum; + + FT_ULong tag; + FT_UInt strid; + + } FT_Var_Axis; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Var_Named_Style */ + /* */ + /* <Description> */ + /* A simple structure used to model a named style in a GX var font. */ + /* */ + /* This structure can't be used for MM fonts. */ + /* */ + /* <Fields> */ + /* coords :: The design coordinates for this style. */ + /* This is an array with one entry for each axis. */ + /* */ + /* strid :: The entry in `name' table identifying this style. */ + /* */ + typedef struct FT_Var_Named_Style_ + { + FT_Fixed* coords; + FT_UInt strid; + + } FT_Var_Named_Style; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_MM_Var */ + /* */ + /* <Description> */ + /* A structure used to model the axes and space of a Multiple Masters */ + /* or GX var distortable font. */ + /* */ + /* Some fields are specific to one format and not to the other. */ + /* */ + /* <Fields> */ + /* num_axis :: The number of axes. The maximum value is~4 for */ + /* MM; no limit in GX. */ + /* */ + /* num_designs :: The number of designs; should be normally */ + /* 2^num_axis for MM fonts. Not meaningful for GX */ + /* (where every glyph could have a different */ + /* number of designs). */ + /* */ + /* num_namedstyles :: The number of named styles; only meaningful for */ + /* GX which allows certain design coordinates to */ + /* have a string ID (in the `name' table) */ + /* associated with them. The font can tell the */ + /* user that, for example, Weight=1.5 is `Bold'. */ + /* */ + /* axis :: A table of axis descriptors. */ + /* GX fonts contain slightly more data than MM. */ + /* */ + /* namedstyles :: A table of named styles. */ + /* Only meaningful with GX. */ + /* */ + typedef struct FT_MM_Var_ + { + FT_UInt num_axis; + FT_UInt num_designs; + FT_UInt num_namedstyles; + FT_Var_Axis* axis; + FT_Var_Named_Style* namedstyle; + + } FT_MM_Var; + + + /* */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Multi_Master */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master descriptor of a given font. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Multi_Master( FT_Face face, + FT_Multi_Master *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_MM_Var */ + /* */ + /* <Description> */ + /* Retrieve the Multiple Master/GX var descriptor of a given font. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Output> */ + /* amaster :: The Multiple Masters/GX var descriptor. */ + /* Allocates a data structure, which the user must free */ + /* (a single call to FT_FREE will do it). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_MM_Var( FT_Face face, + FT_MM_Var* *amaster ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters fonts, choose an interpolated font design */ + /* through design coordinates. */ + /* */ + /* This function can't be used with GX fonts. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Design_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Master or GX Var fonts, choose an interpolated font */ + /* design through design coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: An array of design coordinates. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_MM_Blend_Coordinates */ + /* */ + /* <Description> */ + /* For Multiple Masters and GX var fonts, choose an interpolated font */ + /* design through normalized blend coordinates. */ + /* */ + /* <InOut> */ + /* face :: A handle to the source face. */ + /* */ + /* <Input> */ + /* num_coords :: The number of design coordinates (must be equal to */ + /* the number of axes in the font). */ + /* */ + /* coords :: The design coordinates array (each element must be */ + /* between 0 and 1.0). */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_MM_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Var_Blend_Coordinates */ + /* */ + /* <Description> */ + /* This is another name of @FT_Set_MM_Blend_Coordinates. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Var_Blend_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTMM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmodapi.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmodapi.h new file mode 100644 index 0000000..8f2e017 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmodapi.h @@ -0,0 +1,483 @@ +/***************************************************************************/ +/* */ +/* ftmodapi.h */ +/* */ +/* FreeType modules public interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMODAPI_H__ +#define __FTMODAPI_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /* <Title> */ + /* Module Management */ + /* */ + /* <Abstract> */ + /* How to add, upgrade, and remove modules from FreeType. */ + /* */ + /* <Description> */ + /* The definitions below are used to manage modules within FreeType. */ + /* Modules can be added, upgraded, and removed at runtime. */ + /* */ + /*************************************************************************/ + + + /* module bit flags */ +#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ +#define FT_MODULE_RENDERER 2 /* this module is a renderer */ +#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ +#define FT_MODULE_STYLER 8 /* this module is a styler */ + +#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ + /* scalable fonts */ +#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ + /* support vector outlines */ +#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ + /* own hinter */ + + + /* deprecated values */ +#define ft_module_font_driver FT_MODULE_FONT_DRIVER +#define ft_module_renderer FT_MODULE_RENDERER +#define ft_module_hinter FT_MODULE_HINTER +#define ft_module_styler FT_MODULE_STYLER + +#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE +#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES +#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER + + + typedef FT_Pointer FT_Module_Interface; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Constructor */ + /* */ + /* <Description> */ + /* A function used to initialize (not create) a new module object. */ + /* */ + /* <Input> */ + /* module :: The module to initialize. */ + /* */ + typedef FT_Error + (*FT_Module_Constructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destructor */ + /* */ + /* <Description> */ + /* A function used to finalize (not destroy) a given module object. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + typedef void + (*FT_Module_Destructor)( FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Requester */ + /* */ + /* <Description> */ + /* A function used to query a given module for a specific interface. */ + /* */ + /* <Input> */ + /* module :: The module to finalize. */ + /* */ + /* name :: The name of the interface in the module. */ + /* */ + typedef FT_Module_Interface + (*FT_Module_Requester)( FT_Module module, + const char* name ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Module_Class */ + /* */ + /* <Description> */ + /* The module class descriptor. */ + /* */ + /* <Fields> */ + /* module_flags :: Bit flags describing the module. */ + /* */ + /* module_size :: The size of one module object/instance in */ + /* bytes. */ + /* */ + /* module_name :: The name of the module. */ + /* */ + /* module_version :: The version, as a 16.16 fixed number */ + /* (major.minor). */ + /* */ + /* module_requires :: The version of FreeType this module requires, */ + /* as a 16.16 fixed number (major.minor). Starts */ + /* at version 2.0, i.e., 0x20000. */ + /* */ + /* module_init :: The initializing function. */ + /* */ + /* module_done :: The finalizing function. */ + /* */ + /* get_interface :: The interface requesting function. */ + /* */ + typedef struct FT_Module_Class_ + { + FT_ULong module_flags; + FT_Long module_size; + const FT_String* module_name; + FT_Fixed module_version; + FT_Fixed module_requires; + + const void* module_interface; + + FT_Module_Constructor module_init; + FT_Module_Destructor module_done; + FT_Module_Requester get_interface; + + } FT_Module_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Module */ + /* */ + /* <Description> */ + /* Add a new module to a given library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* clazz :: A pointer to class descriptor for the module. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Add_Module( FT_Library library, + const FT_Module_Class* clazz ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module */ + /* */ + /* <Description> */ + /* Find a module by its name. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module handle. 0~if none was found. */ + /* */ + /* <Note> */ + /* FreeType's internal modules aren't documented very well, and you */ + /* should look up the source code for details. */ + /* */ + FT_EXPORT( FT_Module ) + FT_Get_Module( FT_Library library, + const char* module_name ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Remove_Module */ + /* */ + /* <Description> */ + /* Remove a given module from a library instance. */ + /* */ + /* <InOut> */ + /* library :: A handle to a library object. */ + /* */ + /* <Input> */ + /* module :: A handle to a module object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The module object is destroyed by the function in case of success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Remove_Module( FT_Library library, + FT_Module module ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Reference_Library */ + /* */ + /* <Description> */ + /* A counter gets initialized to~1 at the time an @FT_Library */ + /* structure is created. This function increments the counter. */ + /* @FT_Done_Library then only destroys a library if the counter is~1, */ + /* otherwise it simply decrements the counter. */ + /* */ + /* This function helps in managing life-cycles of structures which */ + /* reference @FT_Library objects. */ + /* */ + /* <Input> */ + /* library :: A handle to a target library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Since> */ + /* 2.4.2 */ + /* */ + FT_EXPORT( FT_Error ) + FT_Reference_Library( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Library */ + /* */ + /* <Description> */ + /* This function is used to create a new FreeType library instance */ + /* from a given memory object. It is thus possible to use libraries */ + /* with distinct memory allocators within the same program. */ + /* */ + /* Normally, you would call this function (followed by a call to */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ + /* instead of @FT_Init_FreeType to initialize the FreeType library. */ + /* */ + /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ + /* library instance. */ + /* */ + /* <Input> */ + /* memory :: A handle to the original memory object. */ + /* */ + /* <Output> */ + /* alibrary :: A pointer to handle of a new library object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Library( FT_Memory memory, + FT_Library *alibrary ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Library */ + /* */ + /* <Description> */ + /* Discard a given library object. This closes all drivers and */ + /* discards all resource objects. */ + /* */ + /* <Input> */ + /* library :: A handle to the target library. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* See the discussion of reference counters in the description of */ + /* @FT_Reference_Library. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Library( FT_Library library ); + +/* */ + + typedef void + (*FT_DebugHook_Func)( void* arg ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Debug_Hook */ + /* */ + /* <Description> */ + /* Set a debug hook function for debugging the interpreter of a font */ + /* format. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* hook_index :: The index of the debug hook. You should use the */ + /* values defined in `ftobjs.h', e.g., */ + /* `FT_DEBUG_HOOK_TRUETYPE'. */ + /* */ + /* debug_hook :: The function used to debug the interpreter. */ + /* */ + /* <Note> */ + /* Currently, four debug hook slots are available, but only two (for */ + /* the TrueType and the Type~1 interpreter) are defined. */ + /* */ + /* Since the internal headers of FreeType are no longer installed, */ + /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ + /* This is a bug and will be fixed in a forthcoming release. */ + /* */ + FT_EXPORT( void ) + FT_Set_Debug_Hook( FT_Library library, + FT_UInt hook_index, + FT_DebugHook_Func debug_hook ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Add_Default_Modules */ + /* */ + /* <Description> */ + /* Add the set of default drivers to a given library object. */ + /* This is only useful when you create a library object with */ + /* @FT_New_Library (usually to plug a custom memory manager). */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Add_Default_Modules( FT_Library library ); + + + + /************************************************************************** + * + * @section: + * truetype_engine + * + * @title: + * The TrueType Engine + * + * @abstract: + * TrueType bytecode support. + * + * @description: + * This section contains a function used to query the level of TrueType + * bytecode support compiled in this version of the library. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_TrueTypeEngineType + * + * @description: + * A list of values describing which kind of TrueType bytecode + * engine is implemented in a given FT_Library instance. It is used + * by the @FT_Get_TrueType_Engine_Type function. + * + * @values: + * FT_TRUETYPE_ENGINE_TYPE_NONE :: + * The library doesn't implement any kind of bytecode interpreter. + * + * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: + * The library implements a bytecode interpreter that doesn't + * support the patented operations of the TrueType virtual machine. + * + * Its main use is to load certain Asian fonts which position and + * scale glyph components with bytecode instructions. It produces + * bad output for most other fonts. + * + * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: + * The library implements a bytecode interpreter that covers + * the full instruction set of the TrueType virtual machine (this + * was governed by patents until May 2010, hence the name). + * + * @since: + * 2.2 + * + */ + typedef enum FT_TrueTypeEngineType_ + { + FT_TRUETYPE_ENGINE_TYPE_NONE = 0, + FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, + FT_TRUETYPE_ENGINE_TYPE_PATENTED + + } FT_TrueTypeEngineType; + + + /************************************************************************** + * + * @func: + * FT_Get_TrueType_Engine_Type + * + * @description: + * Return an @FT_TrueTypeEngineType value to indicate which level of + * the TrueType virtual machine a given library instance supports. + * + * @input: + * library :: + * A library instance. + * + * @return: + * A value indicating which level is supported. + * + * @since: + * 2.2 + * + */ + FT_EXPORT( FT_TrueTypeEngineType ) + FT_Get_TrueType_Engine_Type( FT_Library library ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTMODAPI_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmoderr.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmoderr.h new file mode 100644 index 0000000..1bf3b38 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftmoderr.h @@ -0,0 +1,156 @@ +/***************************************************************************/ +/* */ +/* ftmoderr.h */ +/* */ +/* FreeType module error offsets (specification). */ +/* */ +/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is used to define the FreeType module error offsets. */ + /* */ + /* The lower byte gives the error code, the higher byte gives the */ + /* module. The base module has error offset 0. For example, the error */ + /* `FT_Err_Invalid_File_Format' has value 0x003, the error */ + /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */ + /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */ + /* */ + /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */ + /* to make the higher byte always zero (disabling the module error */ + /* mechanism). */ + /* */ + /* It can also be used to create a module error message table easily */ + /* with something like */ + /* */ + /* { */ + /* #undef __FTMODERR_H__ */ + /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ + /* #define FT_MODERR_START_LIST { */ + /* #define FT_MODERR_END_LIST { 0, 0 } }; */ + /* */ + /* const struct */ + /* { */ + /* int mod_err_offset; */ + /* const char* mod_err_msg */ + /* } ft_mod_errors[] = */ + /* */ + /* #include FT_MODULE_ERRORS_H */ + /* } */ + /* */ + /* To use such a table, all errors must be ANDed with 0xFF00 to remove */ + /* the error code. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTMODERR_H__ +#define __FTMODERR_H__ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** SETUP MACROS *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#undef FT_NEED_EXTERN_C + +#ifndef FT_MODERRDEF + +#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, +#else +#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, +#endif + +#define FT_MODERR_START_LIST enum { +#define FT_MODERR_END_LIST FT_Mod_Err_Max }; + +#ifdef __cplusplus +#define FT_NEED_EXTERN_C + extern "C" { +#endif + +#endif /* !FT_MODERRDEF */ + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** LIST MODULE ERROR BASES *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_MODERR_START_LIST + FT_MODERR_START_LIST +#endif + + + FT_MODERRDEF( Base, 0x000, "base module" ) + FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) + FT_MODERRDEF( BDF, 0x200, "BDF module" ) + FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) + FT_MODERRDEF( Cache, 0x400, "cache module" ) + FT_MODERRDEF( CFF, 0x500, "CFF module" ) + FT_MODERRDEF( CID, 0x600, "CID module" ) + FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) + FT_MODERRDEF( LZW, 0x800, "LZW module" ) + FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) + FT_MODERRDEF( PCF, 0xA00, "PCF module" ) + FT_MODERRDEF( PFR, 0xB00, "PFR module" ) + FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) + FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) + FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) + FT_MODERRDEF( Raster, 0xF00, "raster module" ) + FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) + FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) + FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) + FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) + FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) + FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) + + +#ifdef FT_MODERR_END_LIST + FT_MODERR_END_LIST +#endif + + + /*******************************************************************/ + /*******************************************************************/ + /***** *****/ + /***** CLEANUP *****/ + /***** *****/ + /*******************************************************************/ + /*******************************************************************/ + + +#ifdef FT_NEED_EXTERN_C + } +#endif + +#undef FT_MODERR_START_LIST +#undef FT_MODERR_END_LIST +#undef FT_MODERRDEF +#undef FT_NEED_EXTERN_C + + +#endif /* __FTMODERR_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftotval.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftotval.h new file mode 100644 index 0000000..027f2e8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftotval.h @@ -0,0 +1,203 @@ +/***************************************************************************/ +/* */ +/* ftotval.h */ +/* */ +/* FreeType API for validating OpenType tables (specification). */ +/* */ +/* Copyright 2004, 2005, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* */ +/* Warning: This module might be moved to a different library in the */ +/* future to avoid a tight dependency between FreeType and the */ +/* OpenType specification. */ +/* */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOTVAL_H__ +#define __FTOTVAL_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* ot_validation */ + /* */ + /* <Title> */ + /* OpenType Validation */ + /* */ + /* <Abstract> */ + /* An API to validate OpenType tables. */ + /* */ + /* <Description> */ + /* This section contains the declaration of functions to validate */ + /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @enum: + * FT_VALIDATE_OTXXX + * + * @description: + * A list of bit-field constants used with @FT_OpenType_Validate to + * indicate which OpenType tables should be validated. + * + * @values: + * FT_VALIDATE_BASE :: + * Validate BASE table. + * + * FT_VALIDATE_GDEF :: + * Validate GDEF table. + * + * FT_VALIDATE_GPOS :: + * Validate GPOS table. + * + * FT_VALIDATE_GSUB :: + * Validate GSUB table. + * + * FT_VALIDATE_JSTF :: + * Validate JSTF table. + * + * FT_VALIDATE_MATH :: + * Validate MATH table. + * + * FT_VALIDATE_OT :: + * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). + * + */ +#define FT_VALIDATE_BASE 0x0100 +#define FT_VALIDATE_GDEF 0x0200 +#define FT_VALIDATE_GPOS 0x0400 +#define FT_VALIDATE_GSUB 0x0800 +#define FT_VALIDATE_JSTF 0x1000 +#define FT_VALIDATE_MATH 0x2000 + +#define FT_VALIDATE_OT FT_VALIDATE_BASE | \ + FT_VALIDATE_GDEF | \ + FT_VALIDATE_GPOS | \ + FT_VALIDATE_GSUB | \ + FT_VALIDATE_JSTF | \ + FT_VALIDATE_MATH + + /* */ + + /********************************************************************** + * + * @function: + * FT_OpenType_Validate + * + * @description: + * Validate various OpenType tables to assure that all offsets and + * indices are valid. The idea is that a higher-level library which + * actually does the text layout can access those tables without + * error checking (which can be quite time consuming). + * + * @input: + * face :: + * A handle to the input face. + * + * validation_flags :: + * A bit field which specifies the tables to be validated. See + * @FT_VALIDATE_OTXXX for possible values. + * + * @output: + * BASE_table :: + * A pointer to the BASE table. + * + * GDEF_table :: + * A pointer to the GDEF table. + * + * GPOS_table :: + * A pointer to the GPOS table. + * + * GSUB_table :: + * A pointer to the GSUB table. + * + * JSTF_table :: + * A pointer to the JSTF table. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with OpenType fonts, returning an error + * otherwise. + * + * After use, the application should deallocate the five tables with + * @FT_OpenType_Free. A NULL value indicates that the table either + * doesn't exist in the font, or the application hasn't asked for + * validation. + */ + FT_EXPORT( FT_Error ) + FT_OpenType_Validate( FT_Face face, + FT_UInt validation_flags, + FT_Bytes *BASE_table, + FT_Bytes *GDEF_table, + FT_Bytes *GPOS_table, + FT_Bytes *GSUB_table, + FT_Bytes *JSTF_table ); + + /* */ + + /********************************************************************** + * + * @function: + * FT_OpenType_Free + * + * @description: + * Free the buffer allocated by OpenType validator. + * + * @input: + * face :: + * A handle to the input face. + * + * table :: + * The pointer to the buffer that is allocated by + * @FT_OpenType_Validate. + * + * @note: + * This function must be used to free the buffer allocated by + * @FT_OpenType_Validate only. + */ + FT_EXPORT( void ) + FT_OpenType_Free( FT_Face face, + FT_Bytes table ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTOTVAL_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftoutln.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftoutln.h new file mode 100644 index 0000000..1cf3c3f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftoutln.h @@ -0,0 +1,540 @@ +/***************************************************************************/ +/* */ +/* ftoutln.h */ +/* */ +/* Support for the FT_Outline type used to store glyph shapes of */ +/* most scalable font formats (specification). */ +/* */ +/* Copyright 1996-2003, 2005-2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTOUTLN_H__ +#define __FTOUTLN_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* outline_processing */ + /* */ + /* <Title> */ + /* Outline Processing */ + /* */ + /* <Abstract> */ + /* Functions to create, transform, and render vectorial glyph images. */ + /* */ + /* <Description> */ + /* This section contains routines used to create and destroy scalable */ + /* glyph images known as `outlines'. These can also be measured, */ + /* transformed, and converted into bitmaps and pixmaps. */ + /* */ + /* <Order> */ + /* FT_Outline */ + /* FT_OUTLINE_FLAGS */ + /* FT_Outline_New */ + /* FT_Outline_Done */ + /* FT_Outline_Copy */ + /* FT_Outline_Translate */ + /* FT_Outline_Transform */ + /* FT_Outline_Embolden */ + /* FT_Outline_Reverse */ + /* FT_Outline_Check */ + /* */ + /* FT_Outline_Get_CBox */ + /* FT_Outline_Get_BBox */ + /* */ + /* FT_Outline_Get_Bitmap */ + /* FT_Outline_Render */ + /* */ + /* FT_Outline_Decompose */ + /* FT_Outline_Funcs */ + /* FT_Outline_MoveTo_Func */ + /* FT_Outline_LineTo_Func */ + /* FT_Outline_ConicTo_Func */ + /* FT_Outline_CubicTo_Func */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Decompose */ + /* */ + /* <Description> */ + /* Walk over an outline's structure to decompose it into individual */ + /* segments and Bézier arcs. This function also emits `move to' */ + /* operations to indicate the start of new contours in the outline. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source target. */ + /* */ + /* func_interface :: A table of `emitters', i.e., function pointers */ + /* called during decomposition to indicate path */ + /* operations. */ + /* */ + /* <InOut> */ + /* user :: A typeless pointer which is passed to each */ + /* emitter during the decomposition. It can be */ + /* used to store the state during the */ + /* decomposition. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Decompose( FT_Outline* outline, + const FT_Outline_Funcs* func_interface, + void* user ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_New */ + /* */ + /* <Description> */ + /* Create a new outline of a given size. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object from where the */ + /* outline is allocated. Note however that the new */ + /* outline will *not* necessarily be *freed*, when */ + /* destroying the library, by @FT_Done_FreeType. */ + /* */ + /* numPoints :: The maximal number of points within the outline. */ + /* */ + /* numContours :: The maximal number of contours within the outline. */ + /* */ + /* <Output> */ + /* anoutline :: A handle to the new outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The reason why this function takes a `library' parameter is simply */ + /* to use the library's memory allocator. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_New_Internal( FT_Memory memory, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Done */ + /* */ + /* <Description> */ + /* Destroy an outline created with @FT_Outline_New. */ + /* */ + /* <Input> */ + /* library :: A handle of the library object used to allocate the */ + /* outline. */ + /* */ + /* outline :: A pointer to the outline object to be discarded. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If the outline's `owner' field is not set, only the outline */ + /* descriptor will be released. */ + /* */ + /* The reason why this function takes an `library' parameter is */ + /* simply to use ft_mem_free(). */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ); + + + FT_EXPORT( FT_Error ) + FT_Outline_Done_Internal( FT_Memory memory, + FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Check */ + /* */ + /* <Description> */ + /* Check the contents of an outline descriptor. */ + /* */ + /* <Input> */ + /* outline :: A handle to a source outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Check( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_CBox */ + /* */ + /* <Description> */ + /* Return an outline's `control box'. The control box encloses all */ + /* the outline's points, including Bézier control points. Though it */ + /* coincides with the exact bounding box for most glyphs, it can be */ + /* slightly larger in some situations (like when rotating an outline */ + /* which contains Bézier outside arcs). */ + /* */ + /* Computing the control box is very fast, while getting the bounding */ + /* box can take much more time as it needs to walk over all segments */ + /* and arcs in the outline. To get the latter, you can use the */ + /* `ftbbox' component which is dedicated to this single task. */ + /* */ + /* <Input> */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <Output> */ + /* acbox :: The outline's control box. */ + /* */ + /* <Note> */ + /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Translate */ + /* */ + /* <Description> */ + /* Apply a simple translation to the points of an outline. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* xOffset :: The horizontal offset. */ + /* */ + /* yOffset :: The vertical offset. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Translate( const FT_Outline* outline, + FT_Pos xOffset, + FT_Pos yOffset ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Copy */ + /* */ + /* <Description> */ + /* Copy an outline into another one. Both objects must have the */ + /* same sizes (number of points & number of contours) when this */ + /* function is called. */ + /* */ + /* <Input> */ + /* source :: A handle to the source outline. */ + /* */ + /* <Output> */ + /* target :: A handle to the target outline. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Transform */ + /* */ + /* <Description> */ + /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ + /* for applying rotations, slanting, flipping, etc. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Input> */ + /* matrix :: A pointer to the transformation matrix. */ + /* */ + /* <Note> */ + /* You can use @FT_Outline_Translate if you need to translate the */ + /* outline's points. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Transform( const FT_Outline* outline, + const FT_Matrix* matrix ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Embolden */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be at most 4~times */ + /* `strength' pixels wider and higher. You may think of the left and */ + /* bottom borders as unchanged. */ + /* */ + /* Negative `strength' values to reduce the outline thickness are */ + /* possible also. */ + /* */ + /* <InOut> */ + /* outline :: A handle to the target outline. */ + /* */ + /* <Input> */ + /* strength :: How strong the glyph is emboldened. Expressed in */ + /* 26.6 pixel format. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The used algorithm to increase or decrease the thickness of the */ + /* glyph doesn't change the number of points; this means that certain */ + /* situations like acute angles or intersections are sometimes */ + /* handled incorrectly. */ + /* */ + /* If you need `better' metrics values you should call */ + /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */ + /* */ + /* Example call: */ + /* */ + /* { */ + /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ + /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */ + /* FT_Outline_Embolden( &face->slot->outline, strength ); */ + /* } */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Embolden( FT_Outline* outline, + FT_Pos strength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Reverse */ + /* */ + /* <Description> */ + /* Reverse the drawing direction of an outline. This is used to */ + /* ensure consistent fill conventions for mirrored glyphs. */ + /* */ + /* <InOut> */ + /* outline :: A pointer to the target outline descriptor. */ + /* */ + /* <Note> */ + /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ + /* the outline's `flags' field. */ + /* */ + /* It shouldn't be used by a normal client application, unless it */ + /* knows what it is doing. */ + /* */ + FT_EXPORT( void ) + FT_Outline_Reverse( FT_Outline* outline ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Get_Bitmap */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap. The outline's image is simply */ + /* OR-ed to the target bitmap. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* abitmap :: A pointer to the target bitmap descriptor. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* This function does NOT CREATE the bitmap, it only renders an */ + /* outline image within the one you pass to it! Consequently, the */ + /* various fields in `abitmap' should be set accordingly. */ + /* */ + /* It will use the raster corresponding to the default glyph format. */ + /* */ + /* The value of the `num_grays' field in `abitmap' is ignored. If */ + /* you select the gray-level rasterizer, and you want less than 256 */ + /* gray levels, you have to use @FT_Outline_Render directly. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Outline_Render */ + /* */ + /* <Description> */ + /* Render an outline within a bitmap using the current scan-convert. */ + /* This function uses an @FT_Raster_Params structure as an argument, */ + /* allowing advanced features like direct composition, translucency, */ + /* etc. */ + /* */ + /* <Input> */ + /* library :: A handle to a FreeType library object. */ + /* */ + /* outline :: A pointer to the source outline descriptor. */ + /* */ + /* <InOut> */ + /* params :: A pointer to an @FT_Raster_Params structure used to */ + /* describe the rendering operation. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You should know what you are doing and how @FT_Raster_Params works */ + /* to use this function. */ + /* */ + /* The field `params.source' will be set to `outline' before the scan */ + /* converter is called, which means that the value you give to it is */ + /* actually ignored. */ + /* */ + /* The gray-level rasterizer always uses 256 gray levels. If you */ + /* want less gray levels, you have to provide your own span callback. */ + /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ + /* @FT_Raster_Params structure for more details. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_Render( FT_Library library, + FT_Outline* outline, + FT_Raster_Params* params ); + + + /************************************************************************** + * + * @enum: + * FT_Orientation + * + * @description: + * A list of values used to describe an outline's contour orientation. + * + * The TrueType and PostScript specifications use different conventions + * to determine whether outline contours should be filled or unfilled. + * + * @values: + * FT_ORIENTATION_TRUETYPE :: + * According to the TrueType specification, clockwise contours must + * be filled, and counter-clockwise ones must be unfilled. + * + * FT_ORIENTATION_POSTSCRIPT :: + * According to the PostScript specification, counter-clockwise contours + * must be filled, and clockwise ones must be unfilled. + * + * FT_ORIENTATION_FILL_RIGHT :: + * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to + * remember that in TrueType, everything that is to the right of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_FILL_LEFT :: + * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to + * remember that in PostScript, everything that is to the left of + * the drawing direction of a contour must be filled. + * + * FT_ORIENTATION_NONE :: + * The orientation cannot be determined. That is, different parts of + * the glyph have different orientation. + * + */ + typedef enum FT_Orientation_ + { + FT_ORIENTATION_TRUETYPE = 0, + FT_ORIENTATION_POSTSCRIPT = 1, + FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, + FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, + FT_ORIENTATION_NONE + + } FT_Orientation; + + + /************************************************************************** + * + * @function: + * FT_Outline_Get_Orientation + * + * @description: + * This function analyzes a glyph outline and tries to compute its + * fill orientation (see @FT_Orientation). This is done by computing + * the direction of each global horizontal and/or vertical extrema + * within the outline. + * + * Note that this will return @FT_ORIENTATION_TRUETYPE for empty + * outlines. + * + * @input: + * outline :: + * A handle to the source outline. + * + * @return: + * The orientation. + * + */ + FT_EXPORT( FT_Orientation ) + FT_Outline_Get_Orientation( FT_Outline* outline ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTOUTLN_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftpfr.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftpfr.h new file mode 100644 index 0000000..0b7b7d4 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftpfr.h @@ -0,0 +1,172 @@ +/***************************************************************************/ +/* */ +/* ftpfr.h */ +/* */ +/* FreeType API for accessing PFR-specific data (specification only). */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTPFR_H__ +#define __FTPFR_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* pfr_fonts */ + /* */ + /* <Title> */ + /* PFR Fonts */ + /* */ + /* <Abstract> */ + /* PFR/TrueDoc specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of PFR-specific functions. */ + /* */ + /*************************************************************************/ + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Metrics + * + * @description: + * Return the outline and metrics resolutions of a given PFR face. + * + * @input: + * face :: Handle to the input face. It can be a non-PFR face. + * + * @output: + * aoutline_resolution :: + * Outline resolution. This is equivalent to `face->units_per_EM' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_resolution :: + * Metrics resolution. This is equivalent to `outline_resolution' + * for non-PFR fonts. Optional (parameter can be NULL). + * + * ametrics_x_scale :: + * A 16.16 fixed-point number used to scale distance expressed + * in metrics units to device sub-pixels. This is equivalent to + * `face->size->x_scale', but for metrics only. Optional (parameter + * can be NULL). + * + * ametrics_y_scale :: + * Same as `ametrics_x_scale' but for the vertical direction. + * optional (parameter can be NULL). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If the input face is not a PFR, this function will return an error. + * However, in all cases, it will return valid values. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Metrics( FT_Face face, + FT_UInt *aoutline_resolution, + FT_UInt *ametrics_resolution, + FT_Fixed *ametrics_x_scale, + FT_Fixed *ametrics_y_scale ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Kerning + * + * @description: + * Return the kerning pair corresponding to two glyphs in a PFR face. + * The distance is expressed in metrics units, unlike the result of + * @FT_Get_Kerning. + * + * @input: + * face :: A handle to the input face. + * + * left :: Index of the left glyph. + * + * right :: Index of the right glyph. + * + * @output: + * avector :: A kerning vector. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function always return distances in original PFR metrics + * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED + * mode, which always returns distances converted to outline units. + * + * You can use the value of the `x_scale' and `y_scale' parameters + * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Kerning( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + + /********************************************************************** + * + * @function: + * FT_Get_PFR_Advance + * + * @description: + * Return a given glyph advance, expressed in original metrics units, + * from a PFR font. + * + * @input: + * face :: A handle to the input face. + * + * gindex :: The glyph index. + * + * @output: + * aadvance :: The glyph advance in metrics units. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics + * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). + */ + FT_EXPORT( FT_Error ) + FT_Get_PFR_Advance( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTPFR_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftrender.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftrender.h new file mode 100644 index 0000000..dd0229b --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftrender.h @@ -0,0 +1,238 @@ +/***************************************************************************/ +/* */ +/* ftrender.h */ +/* */ +/* FreeType renderer modules public interface (specification). */ +/* */ +/* Copyright 1996-2001, 2005, 2006, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTRENDER_H__ +#define __FTRENDER_H__ + + +#include <ft2build.h> +#include FT_MODULE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + + /* create a new glyph object */ + typedef FT_Error + (*FT_Glyph_InitFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + + /* destroys a given glyph object */ + typedef void + (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); + + typedef void + (*FT_Glyph_TransformFunc)( FT_Glyph glyph, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + typedef void + (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, + FT_BBox* abbox ); + + typedef FT_Error + (*FT_Glyph_CopyFunc)( FT_Glyph source, + FT_Glyph target ); + + typedef FT_Error + (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, + FT_GlyphSlot slot ); + +/* deprecated */ +#define FT_Glyph_Init_Func FT_Glyph_InitFunc +#define FT_Glyph_Done_Func FT_Glyph_DoneFunc +#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc +#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc +#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc +#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc + + + struct FT_Glyph_Class_ + { + FT_Long glyph_size; + FT_Glyph_Format glyph_format; + FT_Glyph_InitFunc glyph_init; + FT_Glyph_DoneFunc glyph_done; + FT_Glyph_CopyFunc glyph_copy; + FT_Glyph_TransformFunc glyph_transform; + FT_Glyph_GetBBoxFunc glyph_bbox; + FT_Glyph_PrepareFunc glyph_prepare; + }; + + + typedef FT_Error + (*FT_Renderer_RenderFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_UInt mode, + const FT_Vector* origin ); + + typedef FT_Error + (*FT_Renderer_TransformFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + const FT_Matrix* matrix, + const FT_Vector* delta ); + + + typedef void + (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_BBox* cbox ); + + + typedef FT_Error + (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, + FT_ULong mode_tag, + FT_Pointer mode_ptr ); + +/* deprecated identifiers */ +#define FTRenderer_render FT_Renderer_RenderFunc +#define FTRenderer_transform FT_Renderer_TransformFunc +#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc +#define FTRenderer_setMode FT_Renderer_SetModeFunc + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Renderer_Class */ + /* */ + /* <Description> */ + /* The renderer module class descriptor. */ + /* */ + /* <Fields> */ + /* root :: The root @FT_Module_Class fields. */ + /* */ + /* glyph_format :: The glyph image format this renderer handles. */ + /* */ + /* render_glyph :: A method used to render the image that is in a */ + /* given glyph slot into a bitmap. */ + /* */ + /* transform_glyph :: A method used to transform the image that is in */ + /* a given glyph slot. */ + /* */ + /* get_glyph_cbox :: A method used to access the glyph's cbox. */ + /* */ + /* set_mode :: A method used to pass additional parameters. */ + /* */ + /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ + /* This is a pointer to its raster's class. */ + /* */ + typedef struct FT_Renderer_Class_ + { + FT_Module_Class root; + + FT_Glyph_Format glyph_format; + + FT_Renderer_RenderFunc render_glyph; + FT_Renderer_TransformFunc transform_glyph; + FT_Renderer_GetCBoxFunc get_glyph_cbox; + FT_Renderer_SetModeFunc set_mode; + + FT_Raster_Funcs* raster_class; + + } FT_Renderer_Class; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Renderer */ + /* */ + /* <Description> */ + /* Retrieve the current renderer for a given glyph format. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* format :: The glyph format. */ + /* */ + /* <Return> */ + /* A renderer handle. 0~if none found. */ + /* */ + /* <Note> */ + /* An error will be returned if a module already exists by that name, */ + /* or if the module requires a version of FreeType that is too great. */ + /* */ + /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ + /* renderer by its name, use @FT_Get_Module. */ + /* */ + FT_EXPORT( FT_Renderer ) + FT_Get_Renderer( FT_Library library, + FT_Glyph_Format format ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Renderer */ + /* */ + /* <Description> */ + /* Set the current renderer to use, and set additional mode. */ + /* */ + /* <InOut> */ + /* library :: A handle to the library object. */ + /* */ + /* <Input> */ + /* renderer :: A handle to the renderer object. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* parameters :: Additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* In case of success, the renderer will be used to convert glyph */ + /* images in the renderer's known format into bitmaps. */ + /* */ + /* This doesn't change the current renderer for other formats. */ + /* */ + /* Currently, only the B/W renderer, if compiled with */ + /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */ + /* anti-aliasing mode; this option must be set directly in */ + /* `ftraster.c' and is undefined by default) accepts a single tag */ + /* `pal5' to set its gray palette as a character string with */ + /* 5~elements. Consequently, the third and fourth argument are zero */ + /* normally. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Renderer( FT_Library library, + FT_Renderer renderer, + FT_UInt num_params, + FT_Parameter* parameters ); + + + /* */ + + +FT_END_HEADER + +#endif /* __FTRENDER_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsizes.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsizes.h new file mode 100644 index 0000000..3e548cc --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsizes.h @@ -0,0 +1,159 @@ +/***************************************************************************/ +/* */ +/* ftsizes.h */ +/* */ +/* FreeType size objects management (specification). */ +/* */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Typical application would normally not need to use these functions. */ + /* However, they have been placed in a public API for the rare cases */ + /* where they are needed. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSIZES_H__ +#define __FTSIZES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sizes_management */ + /* */ + /* <Title> */ + /* Size Management */ + /* */ + /* <Abstract> */ + /* Managing multiple sizes per face. */ + /* */ + /* <Description> */ + /* When creating a new face object (e.g., with @FT_New_Face), an */ + /* @FT_Size object is automatically created and used to store all */ + /* pixel-size dependent information, available in the `face->size' */ + /* field. */ + /* */ + /* It is however possible to create more sizes for a given face, */ + /* mostly in order to manage several character pixel sizes of the */ + /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ + /* */ + /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ + /* modify the contents of the current `active' size; you thus need */ + /* to use @FT_Activate_Size to change it. */ + /* */ + /* 99% of applications won't need the functions provided here, */ + /* especially if they use the caching sub-system, so be cautious */ + /* when using these. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Size */ + /* */ + /* <Description> */ + /* Create a new size object from a given face object. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* asize :: A handle to a new size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* You need to call @FT_Activate_Size in order to select the new size */ + /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ + /* @FT_Load_Glyph, @FT_Load_Char, etc. */ + /* */ + FT_EXPORT( FT_Error ) + FT_New_Size( FT_Face face, + FT_Size* size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Size */ + /* */ + /* <Description> */ + /* Discard a given size object. Note that @FT_Done_Face */ + /* automatically discards all size objects allocated with */ + /* @FT_New_Size. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Done_Size( FT_Size size ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Activate_Size */ + /* */ + /* <Description> */ + /* Even though it is possible to create several size objects for a */ + /* given face (see @FT_New_Size for details), functions like */ + /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */ + /* activated last to determine the `current character pixel size'. */ + /* */ + /* This function can be used to `activate' a previously created size */ + /* object. */ + /* */ + /* <Input> */ + /* size :: A handle to a target size object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* If `face' is the size's parent face object, this function changes */ + /* the value of `face->size' to the input size handle. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Activate_Size( FT_Size size ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTSIZES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsnames.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsnames.h new file mode 100644 index 0000000..485e4e1 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsnames.h @@ -0,0 +1,200 @@ +/***************************************************************************/ +/* */ +/* ftsnames.h */ +/* */ +/* Simple interface to access SFNT name tables (which are used */ +/* to hold font names, copyright info, notices, etc.) (specification). */ +/* */ +/* This is _not_ used to retrieve glyph names! */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_SFNT_NAMES_H__ +#define __FT_SFNT_NAMES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* sfnt_names */ + /* */ + /* <Title> */ + /* SFNT Names */ + /* */ + /* <Abstract> */ + /* Access the names embedded in TrueType and OpenType files. */ + /* */ + /* <Description> */ + /* The TrueType and OpenType specifications allow the inclusion of */ + /* a special `names table' in font files. This table contains */ + /* textual (and internationalized) information regarding the font, */ + /* like family name, copyright, version, etc. */ + /* */ + /* The definitions below are used to access them if available. */ + /* */ + /* Note that this has nothing to do with glyph names! */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntName */ + /* */ + /* <Description> */ + /* A structure used to model an SFNT `name' table entry. */ + /* */ + /* <Fields> */ + /* platform_id :: The platform ID for `string'. */ + /* */ + /* encoding_id :: The encoding ID for `string'. */ + /* */ + /* language_id :: The language ID for `string'. */ + /* */ + /* name_id :: An identifier for `string'. */ + /* */ + /* string :: The `name' string. Note that its format differs */ + /* depending on the (platform,encoding) pair. It can */ + /* be a Pascal String, a UTF-16 one, etc. */ + /* */ + /* Generally speaking, the string is not */ + /* zero-terminated. Please refer to the TrueType */ + /* specification for details. */ + /* */ + /* string_len :: The length of `string' in bytes. */ + /* */ + /* <Note> */ + /* Possible values for `platform_id', `encoding_id', `language_id', */ + /* and `name_id' are given in the file `ttnameid.h'. For details */ + /* please refer to the TrueType or OpenType specification. */ + /* */ + /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ + /* */ + typedef struct FT_SfntName_ + { + FT_UShort platform_id; + FT_UShort encoding_id; + FT_UShort language_id; + FT_UShort name_id; + + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntName; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name_Count */ + /* */ + /* <Description> */ + /* Retrieve the number of name strings in the SFNT `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* <Return> */ + /* The number of strings in the `name' table. */ + /* */ + FT_EXPORT( FT_UInt ) + FT_Get_Sfnt_Name_Count( FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Name */ + /* */ + /* <Description> */ + /* Retrieve a string of the SFNT `name' table for a given index. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* idx :: The index of the `name' string. */ + /* */ + /* <Output> */ + /* aname :: The indexed @FT_SfntName structure. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `aname' structure is not */ + /* null-terminated. The application should deallocate it if it is no */ + /* longer in use. */ + /* */ + /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ + /* `name' table entries, then do a loop until you get the right */ + /* platform, encoding, and name ID. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_Name( FT_Face face, + FT_UInt idx, + FT_SfntName *aname ); + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred family subfamily names in `name' + * table since OpenType version 1.4. For backwards compatibility with + * legacy systems which has 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY + * + * @description: + * A constant used as the tag of @FT_Parameter structures to make + * FT_Open_Face() ignore preferred subfamily names in `name' table since + * OpenType version 1.4. For backwards compatibility with legacy + * systems which has 4-face-per-family restriction. + * + */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + /* */ + + +FT_END_HEADER + +#endif /* __FT_SFNT_NAMES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftstroke.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftstroke.h new file mode 100644 index 0000000..dbda6d2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftstroke.h @@ -0,0 +1,741 @@ +/***************************************************************************/ +/* */ +/* ftstroke.h */ +/* */ +/* FreeType path stroker (specification). */ +/* */ +/* Copyright 2002-2006, 2008, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FT_STROKE_H__ +#define __FT_STROKE_H__ + +#include <ft2build.h> +#include FT_OUTLINE_H +#include FT_GLYPH_H + + +FT_BEGIN_HEADER + + + /************************************************************************ + * + * @section: + * glyph_stroker + * + * @title: + * Glyph Stroker + * + * @abstract: + * Generating bordered and stroked glyphs. + * + * @description: + * This component generates stroked outlines of a given vectorial + * glyph. It also allows you to retrieve the `outside' and/or the + * `inside' borders of the stroke. + * + * This can be useful to generate `bordered' glyph, i.e., glyphs + * displayed with a coloured (and anti-aliased) border around their + * shape. + */ + + + /************************************************************** + * + * @type: + * FT_Stroker + * + * @description: + * Opaque handler to a path stroker object. + */ + typedef struct FT_StrokerRec_* FT_Stroker; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineJoin + * + * @description: + * These values determine how two joining lines are rendered + * in a stroker. + * + * @values: + * FT_STROKER_LINEJOIN_ROUND :: + * Used to render rounded line joins. Circular arcs are used + * to join two lines smoothly. + * + * FT_STROKER_LINEJOIN_BEVEL :: + * Used to render beveled line joins. The outer corner of + * the joined lines is filled by enclosing the triangular + * region of the corner with a straight line between the + * outer corners of each stroke. + * + * FT_STROKER_LINEJOIN_MITER_FIXED :: + * Used to render mitered line joins, with fixed bevels if the + * miter limit is exceeded. The outer edges of the strokes + * for the two segments are extended until they meet at an + * angle. If the segments meet at too sharp an angle (such + * that the miter would extend from the intersection of the + * segments a distance greater than the product of the miter + * limit value and the border radius), then a bevel join (see + * above) is used instead. This prevents long spikes being + * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter + * line join as used in PostScript and PDF. + * + * FT_STROKER_LINEJOIN_MITER_VARIABLE :: + * FT_STROKER_LINEJOIN_MITER :: + * Used to render mitered line joins, with variable bevels if + * the miter limit is exceeded. The intersection of the + * strokes is clipped at a line perpendicular to the bisector + * of the angle between the strokes, at the distance from the + * intersection of the segments equal to the product of the + * miter limit value and the border radius. This prevents + * long spikes being created. + * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line + * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias + * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for + * backwards compatibility. + */ + typedef enum FT_Stroker_LineJoin_ + { + FT_STROKER_LINEJOIN_ROUND = 0, + FT_STROKER_LINEJOIN_BEVEL = 1, + FT_STROKER_LINEJOIN_MITER_VARIABLE = 2, + FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE, + FT_STROKER_LINEJOIN_MITER_FIXED = 3 + + } FT_Stroker_LineJoin; + + + /************************************************************** + * + * @enum: + * FT_Stroker_LineCap + * + * @description: + * These values determine how the end of opened sub-paths are + * rendered in a stroke. + * + * @values: + * FT_STROKER_LINECAP_BUTT :: + * The end of lines is rendered as a full stop on the last + * point itself. + * + * FT_STROKER_LINECAP_ROUND :: + * The end of lines is rendered as a half-circle around the + * last point. + * + * FT_STROKER_LINECAP_SQUARE :: + * The end of lines is rendered as a square around the + * last point. + */ + typedef enum FT_Stroker_LineCap_ + { + FT_STROKER_LINECAP_BUTT = 0, + FT_STROKER_LINECAP_ROUND, + FT_STROKER_LINECAP_SQUARE + + } FT_Stroker_LineCap; + + + /************************************************************** + * + * @enum: + * FT_StrokerBorder + * + * @description: + * These values are used to select a given stroke border + * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. + * + * @values: + * FT_STROKER_BORDER_LEFT :: + * Select the left border, relative to the drawing direction. + * + * FT_STROKER_BORDER_RIGHT :: + * Select the right border, relative to the drawing direction. + * + * @note: + * Applications are generally interested in the `inside' and `outside' + * borders. However, there is no direct mapping between these and the + * `left' and `right' ones, since this really depends on the glyph's + * drawing orientation, which varies between font formats. + * + * You can however use @FT_Outline_GetInsideBorder and + * @FT_Outline_GetOutsideBorder to get these. + */ + typedef enum FT_StrokerBorder_ + { + FT_STROKER_BORDER_LEFT = 0, + FT_STROKER_BORDER_RIGHT + + } FT_StrokerBorder; + + + /************************************************************** + * + * @function: + * FT_Outline_GetInsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `inside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetInsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Outline_GetOutsideBorder + * + * @description: + * Retrieve the @FT_StrokerBorder value corresponding to the + * `outside' borders of a given outline. + * + * @input: + * outline :: + * The source outline handle. + * + * @return: + * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid + * outlines. + */ + FT_EXPORT( FT_StrokerBorder ) + FT_Outline_GetOutsideBorder( FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_New + * + * @description: + * Create a new stroker object. + * + * @input: + * library :: + * FreeType library handle. + * + * @output: + * astroker :: + * A new stroker object handle. NULL in case of error. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_New( FT_Library library, + FT_Stroker *astroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Set + * + * @description: + * Reset a stroker object's attributes. + * + * @input: + * stroker :: + * The target stroker handle. + * + * radius :: + * The border radius. + * + * line_cap :: + * The line cap style. + * + * line_join :: + * The line join style. + * + * miter_limit :: + * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and + * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, + * expressed as 16.16 fixed point value. + * + * @note: + * The radius is expressed in the same units as the outline + * coordinates. + */ + FT_EXPORT( void ) + FT_Stroker_Set( FT_Stroker stroker, + FT_Fixed radius, + FT_Stroker_LineCap line_cap, + FT_Stroker_LineJoin line_join, + FT_Fixed miter_limit ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Rewind + * + * @description: + * Reset a stroker object without changing its attributes. + * You should call this function before beginning a new + * series of calls to @FT_Stroker_BeginSubPath or + * @FT_Stroker_EndSubPath. + * + * @input: + * stroker :: + * The target stroker handle. + */ + FT_EXPORT( void ) + FT_Stroker_Rewind( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ParseOutline + * + * @description: + * A convenience function used to parse a whole outline with + * the stroker. The resulting outline(s) can be retrieved + * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The source outline. + * + * opened :: + * A boolean. If~1, the outline is treated as an open path instead + * of a closed one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `opened' is~0 (the default), the outline is treated as a closed + * path, and the stroker generates two distinct `border' outlines. + * + * If `opened' is~1, the outline is processed as an open path, and the + * stroker generates a single `stroke' outline. + * + * This function calls @FT_Stroker_Rewind automatically. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ParseOutline( FT_Stroker stroker, + FT_Outline* outline, + FT_Bool opened ); + + + /************************************************************** + * + * @function: + * FT_Stroker_BeginSubPath + * + * @description: + * Start a new sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the start vector. + * + * open :: + * A boolean. If~1, the sub-path is treated as an open one. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function is useful when you need to stroke a path that is + * not stored as an @FT_Outline object. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_BeginSubPath( FT_Stroker stroker, + FT_Vector* to, + FT_Bool open ); + + + /************************************************************** + * + * @function: + * FT_Stroker_EndSubPath + * + * @description: + * Close the current sub-path in the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function after @FT_Stroker_BeginSubPath. + * If the subpath was not `opened', this function `draws' a + * single line segment to the start position when needed. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_EndSubPath( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Stroker_LineTo + * + * @description: + * `Draw' a single line segment in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_LineTo( FT_Stroker stroker, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ConicTo + * + * @description: + * `Draw' a single quadratic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control :: + * A pointer to a Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_ConicTo( FT_Stroker stroker, + FT_Vector* control, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_CubicTo + * + * @description: + * `Draw' a single cubic Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control1 :: + * A pointer to the first Bézier control point. + * + * control2 :: + * A pointer to second Bézier control point. + * + * to :: + * A pointer to the destination point. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * You should call this function between @FT_Stroker_BeginSubPath and + * @FT_Stroker_EndSubPath. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_CubicTo( FT_Stroker stroker, + FT_Vector* control1, + FT_Vector* control2, + FT_Vector* to ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetBorderCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export one of the `border' or `stroke' + * outlines generated by the stroker. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right'. + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_GetCounts instead if you want to + * retrieve the counts associated to both borders. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetBorderCounts( FT_Stroker stroker, + FT_StrokerBorder border, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_ExportBorder + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export the corresponding border to your own @FT_Outline + * structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * border :: + * The border index. + * + * outline :: + * The target outline handle. + * + * @note: + * Always call this function after @FT_Stroker_GetBorderCounts to + * get sure that there is enough room in your @FT_Outline object to + * receive all new data. + * + * When an outline, or a sub-path, is `closed', the stroker generates + * two independent `border' outlines, named `left' and `right' + * + * When the outline, or a sub-path, is `opened', the stroker merges + * the `border' outlines with caps. The `left' border receives all + * points, while the `right' border becomes empty. + * + * Use the function @FT_Stroker_Export instead if you want to + * retrieve all borders at once. + */ + FT_EXPORT( void ) + FT_Stroker_ExportBorder( FT_Stroker stroker, + FT_StrokerBorder border, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_GetCounts + * + * @description: + * Call this function once you have finished parsing your paths + * with the stroker. It returns the number of points and + * contours necessary to export all points/borders from the stroked + * outline/path. + * + * @input: + * stroker :: + * The target stroker handle. + * + * @output: + * anum_points :: + * The number of points. + * + * anum_contours :: + * The number of contours. + * + * @return: + * FreeType error code. 0~means success. + */ + FT_EXPORT( FT_Error ) + FT_Stroker_GetCounts( FT_Stroker stroker, + FT_UInt *anum_points, + FT_UInt *anum_contours ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Export + * + * @description: + * Call this function after @FT_Stroker_GetBorderCounts to + * export all borders to your own @FT_Outline structure. + * + * Note that this function appends the border points and + * contours to your outline, but does not try to resize its + * arrays. + * + * @input: + * stroker :: + * The target stroker handle. + * + * outline :: + * The target outline handle. + */ + FT_EXPORT( void ) + FT_Stroker_Export( FT_Stroker stroker, + FT_Outline* outline ); + + + /************************************************************** + * + * @function: + * FT_Stroker_Done + * + * @description: + * Destroy a stroker object. + * + * @input: + * stroker :: + * A stroker handle. Can be NULL. + */ + FT_EXPORT( void ) + FT_Stroker_Done( FT_Stroker stroker ); + + + /************************************************************** + * + * @function: + * FT_Glyph_Stroke + * + * @description: + * Stroke a given outline glyph object with a given stroker. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_Stroke( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool destroy ); + + + /************************************************************** + * + * @function: + * FT_Glyph_StrokeBorder + * + * @description: + * Stroke a given outline glyph object with a given stroker, but + * only return either its inside or outside border. + * + * @inout: + * pglyph :: + * Source glyph handle on input, new glyph handle on output. + * + * @input: + * stroker :: + * A stroker handle. + * + * inside :: + * A Boolean. If~1, return the inside border, otherwise + * the outside border. + * + * destroy :: + * A Boolean. If~1, the source glyph object is destroyed + * on success. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source glyph is untouched in case of error. + */ + FT_EXPORT( FT_Error ) + FT_Glyph_StrokeBorder( FT_Glyph *pglyph, + FT_Stroker stroker, + FT_Bool inside, + FT_Bool destroy ); + + /* */ + +FT_END_HEADER + +#endif /* __FT_STROKE_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsynth.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsynth.h new file mode 100644 index 0000000..a068b79 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsynth.h @@ -0,0 +1,80 @@ +/***************************************************************************/ +/* */ +/* ftsynth.h */ +/* */ +/* FreeType synthesizing code for emboldening and slanting */ +/* (specification). */ +/* */ +/* Copyright 2000-2001, 2003, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /********* *********/ + /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ + /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ + /********* FREETYPE DEVELOPMENT TEAM *********/ + /********* *********/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* Main reason for not lifting the functions in this module to a */ + /* `standard' API is that the used parameters for emboldening and */ + /* slanting are not configurable. Consider the functions as a */ + /* code resource which should be copied into the application and */ + /* adapted to the particular needs. */ + + +#ifndef __FTSYNTH_H__ +#define __FTSYNTH_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ + /* taste). This function is actually a convenience function, providing */ + /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ + /* */ + /* For emboldened outlines the metrics are estimates only; if you need */ + /* precise values you should call @FT_Outline_Get_CBox. */ + FT_EXPORT( void ) + FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); + + /* Slant an outline glyph to the right by about 12 degrees. */ + FT_EXPORT( void ) + FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); + + /* */ + +FT_END_HEADER + +#endif /* __FTSYNTH_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsystem.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsystem.h new file mode 100644 index 0000000..e07460c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftsystem.h @@ -0,0 +1,347 @@ +/***************************************************************************/ +/* */ +/* ftsystem.h */ +/* */ +/* FreeType low-level system interface definition (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2005, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTSYSTEM_H__ +#define __FTSYSTEM_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* system_interface */ + /* */ + /* <Title> */ + /* System Interface */ + /* */ + /* <Abstract> */ + /* How FreeType manages memory and i/o. */ + /* */ + /* <Description> */ + /* This section contains various definitions related to memory */ + /* management and i/o access. You need to understand this */ + /* information if you want to use a custom memory manager or you own */ + /* i/o streams. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* M E M O R Y M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Memory + * + * @description: + * A handle to a given memory manager object, defined with an + * @FT_MemoryRec structure. + * + */ + typedef struct FT_MemoryRec_* FT_Memory; + + + /************************************************************************* + * + * @functype: + * FT_Alloc_Func + * + * @description: + * A function used to allocate `size' bytes from `memory'. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * size :: + * The size in bytes to allocate. + * + * @return: + * Address of new memory block. 0~in case of failure. + * + */ + typedef void* + (*FT_Alloc_Func)( FT_Memory memory, + long size ); + + + /************************************************************************* + * + * @functype: + * FT_Free_Func + * + * @description: + * A function used to release a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * block :: + * The address of the target memory block. + * + */ + typedef void + (*FT_Free_Func)( FT_Memory memory, + void* block ); + + + /************************************************************************* + * + * @functype: + * FT_Realloc_Func + * + * @description: + * A function used to re-allocate a given block of memory. + * + * @input: + * memory :: + * A handle to the source memory manager. + * + * cur_size :: + * The block's current size in bytes. + * + * new_size :: + * The block's requested new size. + * + * block :: + * The block's current address. + * + * @return: + * New block address. 0~in case of memory shortage. + * + * @note: + * In case of error, the old block must still be available. + * + */ + typedef void* + (*FT_Realloc_Func)( FT_Memory memory, + long cur_size, + long new_size, + void* block ); + + + /************************************************************************* + * + * @struct: + * FT_MemoryRec + * + * @description: + * A structure used to describe a given memory manager to FreeType~2. + * + * @fields: + * user :: + * A generic typeless pointer for user data. + * + * alloc :: + * A pointer type to an allocation function. + * + * free :: + * A pointer type to an memory freeing function. + * + * realloc :: + * A pointer type to a reallocation function. + * + */ + struct FT_MemoryRec_ + { + void* user; + FT_Alloc_Func alloc; + FT_Free_Func free; + FT_Realloc_Func realloc; + }; + + + /*************************************************************************/ + /* */ + /* I / O M A N A G E M E N T */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Stream + * + * @description: + * A handle to an input stream. + * + */ + typedef struct FT_StreamRec_* FT_Stream; + + + /************************************************************************* + * + * @struct: + * FT_StreamDesc + * + * @description: + * A union type used to store either a long or a pointer. This is used + * to store a file descriptor or a `FILE*' in an input stream. + * + */ + typedef union FT_StreamDesc_ + { + long value; + void* pointer; + + } FT_StreamDesc; + + + /************************************************************************* + * + * @functype: + * FT_Stream_IoFunc + * + * @description: + * A function used to seek and read data from a given input stream. + * + * @input: + * stream :: + * A handle to the source stream. + * + * offset :: + * The offset of read in stream (always from start). + * + * buffer :: + * The address of the read buffer. + * + * count :: + * The number of bytes to read from the stream. + * + * @return: + * The number of bytes effectively read by the stream. + * + * @note: + * This function might be called to perform a seek or skip operation + * with a `count' of~0. A non-zero return value then indicates an + * error. + * + */ + typedef unsigned long + (*FT_Stream_IoFunc)( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ); + + + /************************************************************************* + * + * @functype: + * FT_Stream_CloseFunc + * + * @description: + * A function used to close a given input stream. + * + * @input: + * stream :: + * A handle to the target stream. + * + */ + typedef void + (*FT_Stream_CloseFunc)( FT_Stream stream ); + + + /************************************************************************* + * + * @struct: + * FT_StreamRec + * + * @description: + * A structure used to describe an input stream. + * + * @input: + * base :: + * For memory-based streams, this is the address of the first stream + * byte in memory. This field should always be set to NULL for + * disk-based streams. + * + * size :: + * The stream size in bytes. + * + * pos :: + * The current position within the stream. + * + * descriptor :: + * This field is a union that can hold an integer or a pointer. It is + * used by stream implementations to store file descriptors or `FILE*' + * pointers. + * + * pathname :: + * This field is completely ignored by FreeType. However, it is often + * useful during debugging to use it to store the stream's filename + * (where available). + * + * read :: + * The stream's input function. + * + * close :: + * The stream's close function. + * + * memory :: + * The memory manager to use to preload frames. This is set + * internally by FreeType and shouldn't be touched by stream + * implementations. + * + * cursor :: + * This field is set and used internally by FreeType when parsing + * frames. + * + * limit :: + * This field is set and used internally by FreeType when parsing + * frames. + * + */ + typedef struct FT_StreamRec_ + { + unsigned char* base; + unsigned long size; + unsigned long pos; + + FT_StreamDesc descriptor; + FT_StreamDesc pathname; + FT_Stream_IoFunc read; + FT_Stream_CloseFunc close; + + FT_Memory memory; + unsigned char* cursor; + unsigned char* limit; + + } FT_StreamRec; + + + /* */ + + +FT_END_HEADER + +#endif /* __FTSYSTEM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/fttrigon.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/fttrigon.h new file mode 100644 index 0000000..6b77d2e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/fttrigon.h @@ -0,0 +1,350 @@ +/***************************************************************************/ +/* */ +/* fttrigon.h */ +/* */ +/* FreeType trigonometric functions (specification). */ +/* */ +/* Copyright 2001, 2003, 2005, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTRIGON_H__ +#define __FTTRIGON_H__ + +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* computations */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @type: + * FT_Angle + * + * @description: + * This type is used to model angle values in FreeType. Note that the + * angle is a 16.16 fixed float value expressed in degrees. + * + */ + typedef FT_Fixed FT_Angle; + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI + * + * @description: + * The angle pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI ( 180L << 16 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_2PI + * + * @description: + * The angle 2*pi expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI2 + * + * @description: + * The angle pi/2 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) + + + /************************************************************************* + * + * @macro: + * FT_ANGLE_PI4 + * + * @description: + * The angle pi/4 expressed in @FT_Angle units. + * + */ +#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) + + + /************************************************************************* + * + * @function: + * FT_Sin + * + * @description: + * Return the sinus of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The sinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Sin( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Cos + * + * @description: + * Return the cosinus of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The cosinus value. + * + * @note: + * If you need both the sinus and cosinus for a given angle, use the + * function @FT_Vector_Unit. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Cos( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Tan + * + * @description: + * Return the tangent of a given angle in fixed point format. + * + * @input: + * angle :: + * The input angle. + * + * @return: + * The tangent value. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Tan( FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Atan2 + * + * @description: + * Return the arc-tangent corresponding to a given vector (x,y) in + * the 2d plane. + * + * @input: + * x :: + * The horizontal vector coordinate. + * + * y :: + * The vertical vector coordinate. + * + * @return: + * The arc-tangent value (i.e. angle). + * + */ + FT_EXPORT( FT_Angle ) + FT_Atan2( FT_Fixed x, + FT_Fixed y ); + + + /************************************************************************* + * + * @function: + * FT_Angle_Diff + * + * @description: + * Return the difference between two angles. The result is always + * constrained to the ]-PI..PI] interval. + * + * @input: + * angle1 :: + * First angle. + * + * angle2 :: + * Second angle. + * + * @return: + * Constrained value of `value2-value1'. + * + */ + FT_EXPORT( FT_Angle ) + FT_Angle_Diff( FT_Angle angle1, + FT_Angle angle2 ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Unit + * + * @description: + * Return the unit vector corresponding to a given angle. After the + * call, the value of `vec.x' will be `sin(angle)', and the value of + * `vec.y' will be `cos(angle)'. + * + * This function is useful to retrieve both the sinus and cosinus of a + * given angle quickly. + * + * @output: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The address of angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Unit( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Rotate + * + * @description: + * Rotate a vector by a given angle. + * + * @inout: + * vec :: + * The address of target vector. + * + * @input: + * angle :: + * The address of angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Rotate( FT_Vector* vec, + FT_Angle angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Length + * + * @description: + * Return the length of a given vector. + * + * @input: + * vec :: + * The address of target vector. + * + * @return: + * The vector length, expressed in the same units that the original + * vector coordinates. + * + */ + FT_EXPORT( FT_Fixed ) + FT_Vector_Length( FT_Vector* vec ); + + + /************************************************************************* + * + * @function: + * FT_Vector_Polarize + * + * @description: + * Compute both the length and angle of a given vector. + * + * @input: + * vec :: + * The address of source vector. + * + * @output: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_Polarize( FT_Vector* vec, + FT_Fixed *length, + FT_Angle *angle ); + + + /************************************************************************* + * + * @function: + * FT_Vector_From_Polar + * + * @description: + * Compute vector coordinates from a length and angle. + * + * @output: + * vec :: + * The address of source vector. + * + * @input: + * length :: + * The vector length. + * + * angle :: + * The vector angle. + * + */ + FT_EXPORT( void ) + FT_Vector_From_Polar( FT_Vector* vec, + FT_Fixed length, + FT_Angle angle ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTTRIGON_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/fttypes.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/fttypes.h new file mode 100644 index 0000000..a57ffa6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/fttypes.h @@ -0,0 +1,588 @@ +/***************************************************************************/ +/* */ +/* fttypes.h */ +/* */ +/* FreeType simple types definitions (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTYPES_H__ +#define __FTTYPES_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_SYSTEM_H +#include FT_IMAGE_H + +#include <stddef.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /* <Title> */ + /* Basic Data Types */ + /* */ + /* <Abstract> */ + /* The basic data types defined by the library. */ + /* */ + /* <Description> */ + /* This section contains the basic data types defined by FreeType~2, */ + /* ranging from simple scalar types to bitmap descriptors. More */ + /* font-specific structures are defined in a different section. */ + /* */ + /* <Order> */ + /* FT_Byte */ + /* FT_Bytes */ + /* FT_Char */ + /* FT_Int */ + /* FT_UInt */ + /* FT_Int16 */ + /* FT_UInt16 */ + /* FT_Int32 */ + /* FT_UInt32 */ + /* FT_Short */ + /* FT_UShort */ + /* FT_Long */ + /* FT_ULong */ + /* FT_Bool */ + /* FT_Offset */ + /* FT_PtrDist */ + /* FT_String */ + /* FT_Tag */ + /* FT_Error */ + /* FT_Fixed */ + /* FT_Pointer */ + /* FT_Pos */ + /* FT_Vector */ + /* FT_BBox */ + /* FT_Matrix */ + /* FT_FWord */ + /* FT_UFWord */ + /* FT_F2Dot14 */ + /* FT_UnitVector */ + /* FT_F26Dot6 */ + /* */ + /* */ + /* FT_Generic */ + /* FT_Generic_Finalizer */ + /* */ + /* FT_Bitmap */ + /* FT_Pixel_Mode */ + /* FT_Palette_Mode */ + /* FT_Glyph_Format */ + /* FT_IMAGE_TAG */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bool */ + /* */ + /* <Description> */ + /* A typedef of unsigned char, used for simple booleans. As usual, */ + /* values 1 and~0 represent true and false, respectively. */ + /* */ + typedef unsigned char FT_Bool; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_FWord */ + /* */ + /* <Description> */ + /* A signed 16-bit integer used to store a distance in original font */ + /* units. */ + /* */ + typedef signed short FT_FWord; /* distance in FUnits */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UFWord */ + /* */ + /* <Description> */ + /* An unsigned 16-bit integer used to store a distance in original */ + /* font units. */ + /* */ + typedef unsigned short FT_UFWord; /* unsigned distance */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Char */ + /* */ + /* <Description> */ + /* A simple typedef for the _signed_ char type. */ + /* */ + typedef signed char FT_Char; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Byte */ + /* */ + /* <Description> */ + /* A simple typedef for the _unsigned_ char type. */ + /* */ + typedef unsigned char FT_Byte; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bytes */ + /* */ + /* <Description> */ + /* A typedef for constant memory areas. */ + /* */ + typedef const FT_Byte* FT_Bytes; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Tag */ + /* */ + /* <Description> */ + /* A typedef for 32-bit tags (as used in the SFNT format). */ + /* */ + typedef FT_UInt32 FT_Tag; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_String */ + /* */ + /* <Description> */ + /* A simple typedef for the char type, usually used for strings. */ + /* */ + typedef char FT_String; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Short */ + /* */ + /* <Description> */ + /* A typedef for signed short. */ + /* */ + typedef signed short FT_Short; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UShort */ + /* */ + /* <Description> */ + /* A typedef for unsigned short. */ + /* */ + typedef unsigned short FT_UShort; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Int */ + /* */ + /* <Description> */ + /* A typedef for the int type. */ + /* */ + typedef signed int FT_Int; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UInt */ + /* */ + /* <Description> */ + /* A typedef for the unsigned int type. */ + /* */ + typedef unsigned int FT_UInt; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Long */ + /* */ + /* <Description> */ + /* A typedef for signed long. */ + /* */ + typedef signed long FT_Long; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ULong */ + /* */ + /* <Description> */ + /* A typedef for unsigned long. */ + /* */ + typedef unsigned long FT_ULong; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F2Dot14 */ + /* */ + /* <Description> */ + /* A signed 2.14 fixed float type used for unit vectors. */ + /* */ + typedef signed short FT_F2Dot14; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F26Dot6 */ + /* */ + /* <Description> */ + /* A signed 26.6 fixed float type used for vectorial pixel */ + /* coordinates. */ + /* */ + typedef signed long FT_F26Dot6; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Fixed */ + /* */ + /* <Description> */ + /* This type is used to store 16.16 fixed float values, like scaling */ + /* values or matrix coefficients. */ + /* */ + typedef signed long FT_Fixed; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Error */ + /* */ + /* <Description> */ + /* The FreeType error code type. A value of~0 is always interpreted */ + /* as a successful operation. */ + /* */ + typedef int FT_Error; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pointer */ + /* */ + /* <Description> */ + /* A simple typedef for a typeless pointer. */ + /* */ + typedef void* FT_Pointer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Offset */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ + /* _unsigned_ integer type used to express a file size or position, */ + /* or a memory block size. */ + /* */ + typedef size_t FT_Offset; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_PtrDist */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ + /* largest _signed_ integer type used to express the distance */ + /* between two pointers. */ + /* */ + typedef ft_ptrdiff_t FT_PtrDist; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_UnitVector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector unit vector. Uses */ + /* FT_F2Dot14 types. */ + /* */ + /* <Fields> */ + /* x :: Horizontal coordinate. */ + /* */ + /* y :: Vertical coordinate. */ + /* */ + typedef struct FT_UnitVector_ + { + FT_F2Dot14 x; + FT_F2Dot14 y; + + } FT_UnitVector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Matrix */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2x2 matrix. Coefficients are */ + /* in 16.16 fixed float format. The computation performed is: */ + /* */ + /* { */ + /* x' = x*xx + y*xy */ + /* y' = x*yx + y*yy */ + /* } */ + /* */ + /* <Fields> */ + /* xx :: Matrix coefficient. */ + /* */ + /* xy :: Matrix coefficient. */ + /* */ + /* yx :: Matrix coefficient. */ + /* */ + /* yy :: Matrix coefficient. */ + /* */ + typedef struct FT_Matrix_ + { + FT_Fixed xx, xy; + FT_Fixed yx, yy; + + } FT_Matrix; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Data */ + /* */ + /* <Description> */ + /* Read-only binary data represented as a pointer and a length. */ + /* */ + /* <Fields> */ + /* pointer :: The data. */ + /* */ + /* length :: The length of the data in bytes. */ + /* */ + typedef struct FT_Data_ + { + const FT_Byte* pointer; + FT_Int length; + + } FT_Data; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Generic_Finalizer */ + /* */ + /* <Description> */ + /* Describe a function used to destroy the `client' data of any */ + /* FreeType object. See the description of the @FT_Generic type for */ + /* details of usage. */ + /* */ + /* <Input> */ + /* The address of the FreeType object which is under finalization. */ + /* Its client data is accessed through its `generic' field. */ + /* */ + typedef void (*FT_Generic_Finalizer)(void* object); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Generic */ + /* */ + /* <Description> */ + /* Client applications often need to associate their own data to a */ + /* variety of FreeType core objects. For example, a text layout API */ + /* might want to associate a glyph cache to a given size object. */ + /* */ + /* Most FreeType object contains a `generic' field, of type */ + /* FT_Generic, which usage is left to client applications and font */ + /* servers. */ + /* */ + /* It can be used to store a pointer to client-specific data, as well */ + /* as the address of a `finalizer' function, which will be called by */ + /* FreeType when the object is destroyed (for example, the previous */ + /* client example would put the address of the glyph cache destructor */ + /* in the `finalizer' field). */ + /* */ + /* <Fields> */ + /* data :: A typeless pointer to any client-specified data. This */ + /* field is completely ignored by the FreeType library. */ + /* */ + /* finalizer :: A pointer to a `generic finalizer' function, which */ + /* will be called when the object is destroyed. If this */ + /* field is set to NULL, no code will be called. */ + /* */ + typedef struct FT_Generic_ + { + void* data; + FT_Generic_Finalizer finalizer; + + } FT_Generic; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_MAKE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four-letter tags which are used to label */ + /* TrueType tables into an unsigned long to be used within FreeType. */ + /* */ + /* <Note> */ + /* The produced values *must* be 32-bit integers. Don't redefine */ + /* this macro. */ + /* */ +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ + (FT_Tag) \ + ( ( (FT_ULong)_x1 << 24 ) | \ + ( (FT_ULong)_x2 << 16 ) | \ + ( (FT_ULong)_x3 << 8 ) | \ + (FT_ULong)_x4 ) + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* L I S T M A N A G E M E N T */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ListNode */ + /* */ + /* <Description> */ + /* Many elements and objects in FreeType are listed through an */ + /* @FT_List record (see @FT_ListRec). As its name suggests, an */ + /* FT_ListNode is a handle to a single list element. */ + /* */ + typedef struct FT_ListNodeRec_* FT_ListNode; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_List */ + /* */ + /* <Description> */ + /* A handle to a list record (see @FT_ListRec). */ + /* */ + typedef struct FT_ListRec_* FT_List; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListNodeRec */ + /* */ + /* <Description> */ + /* A structure used to hold a single list element. */ + /* */ + /* <Fields> */ + /* prev :: The previous element in the list. NULL if first. */ + /* */ + /* next :: The next element in the list. NULL if last. */ + /* */ + /* data :: A typeless pointer to the listed object. */ + /* */ + typedef struct FT_ListNodeRec_ + { + FT_ListNode prev; + FT_ListNode next; + void* data; + + } FT_ListNodeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListRec */ + /* */ + /* <Description> */ + /* A structure used to hold a simple doubly-linked list. These are */ + /* used in many parts of FreeType. */ + /* */ + /* <Fields> */ + /* head :: The head (first element) of doubly-linked list. */ + /* */ + /* tail :: The tail (last element) of doubly-linked list. */ + /* */ + typedef struct FT_ListRec_ + { + FT_ListNode head; + FT_ListNode tail; + + } FT_ListRec; + + + /* */ + +#define FT_IS_EMPTY( list ) ( (list).head == 0 ) + + /* return base error code (without module-specific prefix) */ +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) + + /* return module error code */ +#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) + +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) + +FT_END_HEADER + +#endif /* __FTTYPES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftwinfnt.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftwinfnt.h new file mode 100644 index 0000000..ea33353 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftwinfnt.h @@ -0,0 +1,274 @@ +/***************************************************************************/ +/* */ +/* ftwinfnt.h */ +/* */ +/* FreeType API for accessing Windows fnt-specific data. */ +/* */ +/* Copyright 2003, 2004, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTWINFNT_H__ +#define __FTWINFNT_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* winfnt_fonts */ + /* */ + /* <Title> */ + /* Window FNT Files */ + /* */ + /* <Abstract> */ + /* Windows FNT specific API. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Windows FNT specific */ + /* functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************* + * + * @enum: + * FT_WinFNT_ID_XXX + * + * @description: + * A list of valid values for the `charset' byte in + * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX + * encodings (except for cp1361) can be found at ftp://ftp.unicode.org + * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is + * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. + * + * @values: + * FT_WinFNT_ID_DEFAULT :: + * This is used for font enumeration and font creation as a + * `don't care' value. Valid font files don't contain this value. + * When querying for information about the character set of the font + * that is currently selected into a specified device context, this + * return value (of the related Windows API) simply denotes failure. + * + * FT_WinFNT_ID_SYMBOL :: + * There is no known mapping table available. + * + * FT_WinFNT_ID_MAC :: + * Mac Roman encoding. + * + * FT_WinFNT_ID_OEM :: + * From Michael Pöttgen <michael@poettgen.de>: + * + * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM + * is used for the charset of vector fonts, like `modern.fon', + * `roman.fon', and `script.fon' on Windows. + * + * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value + * specifies a character set that is operating-system dependent. + * + * The `IFIMETRICS' documentation from the `Windows Driver + * Development Kit' says: This font supports an OEM-specific + * character set. The OEM character set is system dependent. + * + * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the + * second default codepage that most international versions of + * Windows have. It is one of the OEM codepages from + * + * http://www.microsoft.com/globaldev/reference/cphome.mspx, + * + * and is used for the `DOS boxes', to support legacy applications. + * A German Windows version for example usually uses ANSI codepage + * 1252 and OEM codepage 850. + * + * FT_WinFNT_ID_CP874 :: + * A superset of Thai TIS 620 and ISO 8859-11. + * + * FT_WinFNT_ID_CP932 :: + * A superset of Japanese Shift-JIS (with minor deviations). + * + * FT_WinFNT_ID_CP936 :: + * A superset of simplified Chinese GB 2312-1980 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP949 :: + * A superset of Korean Hangul KS~C 5601-1987 (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP950 :: + * A superset of traditional Chinese Big~5 ETen (with different + * ordering and minor deviations). + * + * FT_WinFNT_ID_CP1250 :: + * A superset of East European ISO 8859-2 (with slightly different + * ordering). + * + * FT_WinFNT_ID_CP1251 :: + * A superset of Russian ISO 8859-5 (with different ordering). + * + * FT_WinFNT_ID_CP1252 :: + * ANSI encoding. A superset of ISO 8859-1. + * + * FT_WinFNT_ID_CP1253 :: + * A superset of Greek ISO 8859-7 (with minor modifications). + * + * FT_WinFNT_ID_CP1254 :: + * A superset of Turkish ISO 8859-9. + * + * FT_WinFNT_ID_CP1255 :: + * A superset of Hebrew ISO 8859-8 (with some modifications). + * + * FT_WinFNT_ID_CP1256 :: + * A superset of Arabic ISO 8859-6 (with different ordering). + * + * FT_WinFNT_ID_CP1257 :: + * A superset of Baltic ISO 8859-13 (with some deviations). + * + * FT_WinFNT_ID_CP1258 :: + * For Vietnamese. This encoding doesn't cover all necessary + * characters. + * + * FT_WinFNT_ID_CP1361 :: + * Korean (Johab). + */ + +#define FT_WinFNT_ID_CP1252 0 +#define FT_WinFNT_ID_DEFAULT 1 +#define FT_WinFNT_ID_SYMBOL 2 +#define FT_WinFNT_ID_MAC 77 +#define FT_WinFNT_ID_CP932 128 +#define FT_WinFNT_ID_CP949 129 +#define FT_WinFNT_ID_CP1361 130 +#define FT_WinFNT_ID_CP936 134 +#define FT_WinFNT_ID_CP950 136 +#define FT_WinFNT_ID_CP1253 161 +#define FT_WinFNT_ID_CP1254 162 +#define FT_WinFNT_ID_CP1258 163 +#define FT_WinFNT_ID_CP1255 177 +#define FT_WinFNT_ID_CP1256 178 +#define FT_WinFNT_ID_CP1257 186 +#define FT_WinFNT_ID_CP1251 204 +#define FT_WinFNT_ID_CP874 222 +#define FT_WinFNT_ID_CP1250 238 +#define FT_WinFNT_ID_OEM 255 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_HeaderRec */ + /* */ + /* <Description> */ + /* Windows FNT Header info. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_ + { + FT_UShort version; + FT_ULong file_size; + FT_Byte copyright[60]; + FT_UShort file_type; + FT_UShort nominal_point_size; + FT_UShort vertical_resolution; + FT_UShort horizontal_resolution; + FT_UShort ascent; + FT_UShort internal_leading; + FT_UShort external_leading; + FT_Byte italic; + FT_Byte underline; + FT_Byte strike_out; + FT_UShort weight; + FT_Byte charset; + FT_UShort pixel_width; + FT_UShort pixel_height; + FT_Byte pitch_and_family; + FT_UShort avg_width; + FT_UShort max_width; + FT_Byte first_char; + FT_Byte last_char; + FT_Byte default_char; + FT_Byte break_char; + FT_UShort bytes_per_row; + FT_ULong device_offset; + FT_ULong face_name_offset; + FT_ULong bits_pointer; + FT_ULong bits_offset; + FT_Byte reserved; + FT_ULong flags; + FT_UShort A_space; + FT_UShort B_space; + FT_UShort C_space; + FT_UShort color_table_offset; + FT_ULong reserved1[4]; + + } FT_WinFNT_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_WinFNT_Header */ + /* */ + /* <Description> */ + /* A handle to an @FT_WinFNT_HeaderRec structure. */ + /* */ + typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; + + + /********************************************************************** + * + * @function: + * FT_Get_WinFNT_Header + * + * @description: + * Retrieve a Windows FNT font info header. + * + * @input: + * face :: A handle to the input face. + * + * @output: + * aheader :: The WinFNT header. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function only works with Windows FNT faces, returning an error + * otherwise. + */ + FT_EXPORT( FT_Error ) + FT_Get_WinFNT_Header( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + + /* */ + +FT_END_HEADER + +#endif /* __FTWINFNT_H__ */ + + +/* END */ + + +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ftxf86.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftxf86.h new file mode 100644 index 0000000..8c68afd --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ftxf86.h @@ -0,0 +1,83 @@ +/***************************************************************************/ +/* */ +/* ftxf86.h */ +/* */ +/* Support functions for X11. */ +/* */ +/* Copyright 2002, 2003, 2004, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTXF86_H__ +#define __FTXF86_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* font_formats */ + /* */ + /* <Title> */ + /* Font Formats */ + /* */ + /* <Abstract> */ + /* Getting the font format. */ + /* */ + /* <Description> */ + /* The single function in this section can be used to get the font */ + /* format. Note that this information is not needed normally; */ + /* however, there are special cases (like in PDF devices) where it is */ + /* important to differentiate, in spite of FreeType's uniform API. */ + /* */ + /* This function is in the X11/xf86 namespace for historical reasons */ + /* and in no way depends on that windowing system. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_X11_Font_Format */ + /* */ + /* <Description> */ + /* Return a string describing the format of a given face, using values */ + /* which can be used as an X11 FONT_PROPERTY. Possible values are */ + /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */ + /* `PFR', and `Windows~FNT'. */ + /* */ + /* <Input> */ + /* face :: */ + /* Input face handle. */ + /* */ + /* <Return> */ + /* Font format string. NULL in case of error. */ + /* */ + FT_EXPORT( const char* ) + FT_Get_X11_Font_Format( FT_Face face ); + + /* */ + +FT_END_HEADER + +#endif /* __FTXF86_H__ */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/autohint.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/autohint.h new file mode 100644 index 0000000..7e3a08a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/autohint.h @@ -0,0 +1,231 @@ +/***************************************************************************/ +/* */ +/* autohint.h */ +/* */ +/* High-level `autohint' module-specific interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* The auto-hinter is used to load and automatically hint glyphs if a */ + /* format-specific hinter isn't available. */ + /* */ + /*************************************************************************/ + + +#ifndef __AUTOHINT_H__ +#define __AUTOHINT_H__ + + + /*************************************************************************/ + /* */ + /* A small technical note regarding automatic hinting in order to */ + /* clarify this module interface. */ + /* */ + /* An automatic hinter might compute two kinds of data for a given face: */ + /* */ + /* - global hints: Usually some metrics that describe global properties */ + /* of the face. It is computed by scanning more or less */ + /* aggressively the glyphs in the face, and thus can be */ + /* very slow to compute (even if the size of global */ + /* hints is really small). */ + /* */ + /* - glyph hints: These describe some important features of the glyph */ + /* outline, as well as how to align them. They are */ + /* generally much faster to compute than global hints. */ + /* */ + /* The current FreeType auto-hinter does a pretty good job while */ + /* performing fast computations for both global and glyph hints. */ + /* However, we might be interested in introducing more complex and */ + /* powerful algorithms in the future, like the one described in the John */ + /* D. Hobby paper, which unfortunately requires a lot more horsepower. */ + /* */ + /* Because a sufficiently sophisticated font management system would */ + /* typically implement an LRU cache of opened face objects to reduce */ + /* memory usage, it is a good idea to be able to avoid recomputing */ + /* global hints every time the same face is re-opened. */ + /* */ + /* We thus provide the ability to cache global hints outside of the face */ + /* object, in order to speed up font re-opening time. Of course, this */ + /* feature is purely optional, so most client programs won't even notice */ + /* it. */ + /* */ + /* I initially thought that it would be a good idea to cache the glyph */ + /* hints too. However, my general idea now is that if you really need */ + /* to cache these too, you are simply in need of a new font format, */ + /* where all this information could be stored within the font file and */ + /* decoded on the fly. */ + /* */ + /*************************************************************************/ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + typedef struct FT_AutoHinterRec_ *FT_AutoHinter; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalGetFunc */ + /* */ + /* <Description> */ + /* Retrieves the global hints computed for a given face object the */ + /* resulting data is dissociated from the face and will survive a */ + /* call to FT_Done_Face(). It must be discarded through the API */ + /* FT_AutoHinter_GlobalDoneFunc(). */ + /* */ + /* <Input> */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the source face object. */ + /* */ + /* <Output> */ + /* global_hints :: A typeless pointer to the global hints. */ + /* */ + /* global_len :: The size in bytes of the global hints. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter, + FT_Face face, + void** global_hints, + long* global_len ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalDoneFunc */ + /* */ + /* <Description> */ + /* Discards the global hints retrieved through */ + /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */ + /* are freed from memory. */ + /* */ + /* <Input> */ + /* hinter :: A handle to the auto-hinter module. */ + /* */ + /* global :: A pointer to retrieved global hints to discard. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter, + void* global ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlobalResetFunc */ + /* */ + /* <Description> */ + /* This function is used to recompute the global metrics in a given */ + /* font. This is useful when global font data changes (e.g. Multiple */ + /* Masters fonts where blend coordinates change). */ + /* */ + /* <Input> */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the face. */ + /* */ + typedef void + (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter, + FT_Face face ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_AutoHinter_GlyphLoadFunc */ + /* */ + /* <Description> */ + /* This function is used to load, scale, and automatically hint a */ + /* glyph from a given face. */ + /* */ + /* <Input> */ + /* face :: A handle to the face. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* load_flags :: The load flags. */ + /* */ + /* <Note> */ + /* This function is capable of loading composite glyphs by hinting */ + /* each sub-glyph independently (which improves quality). */ + /* */ + /* It will call the font driver with FT_Load_Glyph(), with */ + /* FT_LOAD_NO_SCALE set. */ + /* */ + typedef FT_Error + (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_AutoHinter_ServiceRec */ + /* */ + /* <Description> */ + /* The auto-hinter module's interface. */ + /* */ + typedef struct FT_AutoHinter_ServiceRec_ + { + FT_AutoHinter_GlobalResetFunc reset_face; + FT_AutoHinter_GlobalGetFunc get_global_hints; + FT_AutoHinter_GlobalDoneFunc done_global_hints; + FT_AutoHinter_GlyphLoadFunc load_glyph; + + } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ + done_global_hints_, load_glyph_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_AutoHinter_ServiceRec class_ = \ + { \ + reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ + done_global_hints_, load_glyph_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_AutoHinter_ServiceRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->reset_face = reset_face_; \ + clazz->get_global_hints = get_global_hints_; \ + clazz->done_global_hints = done_global_hints_; \ + clazz->load_glyph = load_glyph_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __AUTOHINT_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftcalc.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftcalc.h new file mode 100644 index 0000000..f8b4324 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftcalc.h @@ -0,0 +1,179 @@ +/***************************************************************************/ +/* */ +/* ftcalc.h */ +/* */ +/* Arithmetic computations (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCALC_H__ +#define __FTCALC_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_FixedSqrt */ + /* */ + /* <Description> */ + /* Computes the square root of a 16.16 fixed point value. */ + /* */ + /* <Input> */ + /* x :: The value to compute the root for. */ + /* */ + /* <Return> */ + /* The result of `sqrt(x)'. */ + /* */ + /* <Note> */ + /* This function is not very fast. */ + /* */ + FT_BASE( FT_Int32 ) + FT_SqrtFixed( FT_Int32 x ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Sqrt32 */ + /* */ + /* <Description> */ + /* Computes the square root of an Int32 integer (which will be */ + /* handled as an unsigned long value). */ + /* */ + /* <Input> */ + /* x :: The value to compute the root for. */ + /* */ + /* <Return> */ + /* The result of `sqrt(x)'. */ + /* */ + FT_EXPORT( FT_Int32 ) + FT_Sqrt32( FT_Int32 x ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ + /* */ + /*************************************************************************/ + + +#ifdef TT_USE_BYTECODE_INTERPRETER + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_MulDiv_No_Round */ + /* */ + /* <Description> */ + /* A very simple function used to perform the computation `(a*b)/c' */ + /* (without rounding) with maximal accuracy (it uses a 64-bit */ + /* intermediate integer whenever necessary). */ + /* */ + /* This function isn't necessarily as fast as some processor specific */ + /* operations, but is at least completely portable. */ + /* */ + /* <Input> */ + /* a :: The first multiplier. */ + /* b :: The second multiplier. */ + /* c :: The divisor. */ + /* */ + /* <Return> */ + /* The result of `(a*b)/c'. This function never traps when trying to */ + /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ + /* on the signs of `a' and `b'. */ + /* */ + FT_BASE( FT_Long ) + FT_MulDiv_No_Round( FT_Long a, + FT_Long b, + FT_Long c ); + +#endif /* TT_USE_BYTECODE_INTERPRETER */ + + + /* + * A variant of FT_Matrix_Multiply which scales its result afterwards. + * The idea is that both `a' and `b' are scaled by factors of 10 so that + * the values are as precise as possible to get a correct result during + * the 64bit multiplication. Let `sa' and `sb' be the scaling factors of + * `a' and `b', respectively, then the scaling factor of the result is + * `sa*sb'. + */ + FT_BASE( void ) + FT_Matrix_Multiply_Scaled( const FT_Matrix* a, + FT_Matrix *b, + FT_Long scaling ); + + + /* + * A variant of FT_Vector_Transform. See comments for + * FT_Matrix_Multiply_Scaled. + */ + + FT_BASE( void ) + FT_Vector_Transform_Scaled( FT_Vector* vector, + const FT_Matrix* matrix, + FT_Long scaling ); + + + /* + * Return -1, 0, or +1, depending on the orientation of a given corner. + * We use the Cartesian coordinate system, with positive vertical values + * going upwards. The function returns +1 if the corner turns to the + * left, -1 to the right, and 0 for undecidable cases. + */ + FT_BASE( FT_Int ) + ft_corner_orientation( FT_Pos in_x, + FT_Pos in_y, + FT_Pos out_x, + FT_Pos out_y ); + + /* + * Return TRUE if a corner is flat or nearly flat. This is equivalent to + * saying that the angle difference between the `in' and `out' vectors is + * very small. + */ + FT_BASE( FT_Int ) + ft_corner_is_flat( FT_Pos in_x, + FT_Pos in_y, + FT_Pos out_x, + FT_Pos out_y ); + + +#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) +#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) +#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) +#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) +#define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) +#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 ) + +#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ + : ( -( ( 32 - (x) ) & -64 ) ) ) + + +FT_END_HEADER + +#endif /* __FTCALC_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdebug.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdebug.h new file mode 100644 index 0000000..7baae35 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdebug.h @@ -0,0 +1,250 @@ +/***************************************************************************/ +/* */ +/* ftdebug.h */ +/* */ +/* Debugging and logging component (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/* */ +/* IMPORTANT: A description of FreeType's debugging support can be */ +/* found in `docs/DEBUG.TXT'. Read it if you need to use or */ +/* understand this code. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTDEBUG_H__ +#define __FTDEBUG_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */ + /* is already defined; this simplifies the following #ifdefs */ + /* */ +#ifdef FT_DEBUG_LEVEL_TRACE +#undef FT_DEBUG_LEVEL_ERROR +#define FT_DEBUG_LEVEL_ERROR +#endif + + + /*************************************************************************/ + /* */ + /* Define the trace enums as well as the trace levels array when they */ + /* are needed. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_TRACE + +#define FT_TRACE_DEF( x ) trace_ ## x , + + /* defining the enumeration */ + typedef enum FT_Trace_ + { +#include FT_INTERNAL_TRACE_H + trace_count + + } FT_Trace; + + + /* defining the array of trace levels, provided by `src/base/ftdebug.c' */ + extern int ft_trace_levels[trace_count]; + +#undef FT_TRACE_DEF + +#endif /* FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Define the FT_TRACE macro */ + /* */ + /* IMPORTANT! */ + /* */ + /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */ + /* value before using any TRACE macro. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_TRACE + +#define FT_TRACE( level, varformat ) \ + do \ + { \ + if ( ft_trace_levels[FT_COMPONENT] >= level ) \ + FT_Message varformat; \ + } while ( 0 ) + +#else /* !FT_DEBUG_LEVEL_TRACE */ + +#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */ + +#endif /* !FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Trace_Get_Count */ + /* */ + /* <Description> */ + /* Return the number of available trace components. */ + /* */ + /* <Return> */ + /* The number of trace components. 0 if FreeType 2 is not built with */ + /* FT_DEBUG_LEVEL_TRACE definition. */ + /* */ + /* <Note> */ + /* This function may be useful if you want to access elements of */ + /* the internal `ft_trace_levels' array by an index. */ + /* */ + FT_BASE( FT_Int ) + FT_Trace_Get_Count( void ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Trace_Get_Name */ + /* */ + /* <Description> */ + /* Return the name of a trace component. */ + /* */ + /* <Input> */ + /* The index of the trace component. */ + /* */ + /* <Return> */ + /* The name of the trace component. This is a statically allocated */ + /* C string, so do not free it after use. NULL if FreeType 2 is not */ + /* built with FT_DEBUG_LEVEL_TRACE definition. */ + /* */ + /* <Note> */ + /* Use @FT_Trace_Get_Count to get the number of available trace */ + /* components. */ + /* */ + /* This function may be useful if you want to control FreeType 2's */ + /* debug level in your application. */ + /* */ + FT_BASE( const char * ) + FT_Trace_Get_Name( FT_Int idx ); + + + /*************************************************************************/ + /* */ + /* You need two opening and closing parentheses! */ + /* */ + /* Example: FT_TRACE0(( "Value is %i", foo )) */ + /* */ + /* Output of the FT_TRACEX macros is sent to stderr. */ + /* */ + /*************************************************************************/ + +#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat ) +#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat ) +#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat ) +#define FT_TRACE3( varformat ) FT_TRACE( 3, varformat ) +#define FT_TRACE4( varformat ) FT_TRACE( 4, varformat ) +#define FT_TRACE5( varformat ) FT_TRACE( 5, varformat ) +#define FT_TRACE6( varformat ) FT_TRACE( 6, varformat ) +#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat ) + + + /*************************************************************************/ + /* */ + /* Define the FT_ERROR macro. */ + /* */ + /* Output of this macro is sent to stderr. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#define FT_ERROR( varformat ) FT_Message varformat + +#else /* !FT_DEBUG_LEVEL_ERROR */ + +#define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */ + +#endif /* !FT_DEBUG_LEVEL_ERROR */ + + + /*************************************************************************/ + /* */ + /* Define the FT_ASSERT macro. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#define FT_ASSERT( condition ) \ + do \ + { \ + if ( !( condition ) ) \ + FT_Panic( "assertion failed on line %d of file %s\n", \ + __LINE__, __FILE__ ); \ + } while ( 0 ) + +#else /* !FT_DEBUG_LEVEL_ERROR */ + +#define FT_ASSERT( condition ) do { } while ( 0 ) + +#endif /* !FT_DEBUG_LEVEL_ERROR */ + + + /*************************************************************************/ + /* */ + /* Define `FT_Message' and `FT_Panic' when needed. */ + /* */ + /*************************************************************************/ + +#ifdef FT_DEBUG_LEVEL_ERROR + +#include "stdio.h" /* for vfprintf() */ + + /* print a message */ + FT_BASE( void ) + FT_Message( const char* fmt, + ... ); + + /* print a message and exit */ + FT_BASE( void ) + FT_Panic( const char* fmt, + ... ); + +#endif /* FT_DEBUG_LEVEL_ERROR */ + + + FT_BASE( void ) + ft_debug_init( void ); + + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + + /* We disable the warning `conditional expression is constant' here */ + /* in order to compile cleanly with the maximum level of warnings. */ +#pragma warning( disable : 4127 ) + +#endif /* _MSC_VER */ + + +FT_END_HEADER + +#endif /* __FTDEBUG_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdriver.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdriver.h new file mode 100644 index 0000000..1d06997 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftdriver.h @@ -0,0 +1,422 @@ +/***************************************************************************/ +/* */ +/* ftdriver.h */ +/* */ +/* FreeType font driver interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTDRIVER_H__ +#define __FTDRIVER_H__ + + +#include <ft2build.h> +#include FT_MODULE_H + + +FT_BEGIN_HEADER + + + typedef FT_Error + (*FT_Face_InitFunc)( FT_Stream stream, + FT_Face face, + FT_Int typeface_index, + FT_Int num_params, + FT_Parameter* parameters ); + + typedef void + (*FT_Face_DoneFunc)( FT_Face face ); + + + typedef FT_Error + (*FT_Size_InitFunc)( FT_Size size ); + + typedef void + (*FT_Size_DoneFunc)( FT_Size size ); + + + typedef FT_Error + (*FT_Slot_InitFunc)( FT_GlyphSlot slot ); + + typedef void + (*FT_Slot_DoneFunc)( FT_GlyphSlot slot ); + + + typedef FT_Error + (*FT_Size_RequestFunc)( FT_Size size, + FT_Size_Request req ); + + typedef FT_Error + (*FT_Size_SelectFunc)( FT_Size size, + FT_ULong size_index ); + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + typedef FT_Error + (*FT_Size_ResetPointsFunc)( FT_Size size, + FT_F26Dot6 char_width, + FT_F26Dot6 char_height, + FT_UInt horz_resolution, + FT_UInt vert_resolution ); + + typedef FT_Error + (*FT_Size_ResetPixelsFunc)( FT_Size size, + FT_UInt pixel_width, + FT_UInt pixel_height ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + typedef FT_Error + (*FT_Slot_LoadFunc)( FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_Int32 load_flags ); + + + typedef FT_UInt + (*FT_CharMap_CharIndexFunc)( FT_CharMap charmap, + FT_Long charcode ); + + typedef FT_Long + (*FT_CharMap_CharNextFunc)( FT_CharMap charmap, + FT_Long charcode ); + + + typedef FT_Error + (*FT_Face_GetKerningFunc)( FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_Vector* kerning ); + + + typedef FT_Error + (*FT_Face_AttachFunc)( FT_Face face, + FT_Stream stream ); + + + typedef FT_Error + (*FT_Face_GetAdvancesFunc)( FT_Face face, + FT_UInt first, + FT_UInt count, + FT_Int32 flags, + FT_Fixed* advances ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Driver_ClassRec */ + /* */ + /* <Description> */ + /* The font driver class. This structure mostly contains pointers to */ + /* driver methods. */ + /* */ + /* <Fields> */ + /* root :: The parent module. */ + /* */ + /* face_object_size :: The size of a face object in bytes. */ + /* */ + /* size_object_size :: The size of a size object in bytes. */ + /* */ + /* slot_object_size :: The size of a glyph object in bytes. */ + /* */ + /* init_face :: The format-specific face constructor. */ + /* */ + /* done_face :: The format-specific face destructor. */ + /* */ + /* init_size :: The format-specific size constructor. */ + /* */ + /* done_size :: The format-specific size destructor. */ + /* */ + /* init_slot :: The format-specific slot constructor. */ + /* */ + /* done_slot :: The format-specific slot destructor. */ + /* */ + /* */ + /* load_glyph :: A function handle to load a glyph to a slot. */ + /* This field is mandatory! */ + /* */ + /* get_kerning :: A function handle to return the unscaled */ + /* kerning for a given pair of glyphs. Can be */ + /* set to 0 if the format doesn't support */ + /* kerning. */ + /* */ + /* attach_file :: This function handle is used to read */ + /* additional data for a face from another */ + /* file/stream. For example, this can be used to */ + /* add data from AFM or PFM files on a Type 1 */ + /* face, or a CIDMap on a CID-keyed face. */ + /* */ + /* get_advances :: A function handle used to return advance */ + /* widths of `count' glyphs (in font units), */ + /* starting at `first'. The `vertical' flag must */ + /* be set to get vertical advance heights. The */ + /* `advances' buffer is caller-allocated. */ + /* Currently not implemented. The idea of this */ + /* function is to be able to perform */ + /* device-independent text layout without loading */ + /* a single glyph image. */ + /* */ + /* request_size :: A handle to a function used to request the new */ + /* character size. Can be set to 0 if the */ + /* scaling done in the base layer suffices. */ + /* */ + /* select_size :: A handle to a function used to select a new */ + /* fixed size. It is used only if */ + /* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */ + /* to 0 if the scaling done in the base layer */ + /* suffices. */ + /* <Note> */ + /* Most function pointers, with the exception of `load_glyph', can be */ + /* set to 0 to indicate a default behaviour. */ + /* */ + typedef struct FT_Driver_ClassRec_ + { + FT_Module_Class root; + + FT_Long face_object_size; + FT_Long size_object_size; + FT_Long slot_object_size; + + FT_Face_InitFunc init_face; + FT_Face_DoneFunc done_face; + + FT_Size_InitFunc init_size; + FT_Size_DoneFunc done_size; + + FT_Slot_InitFunc init_slot; + FT_Slot_DoneFunc done_slot; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_Size_ResetPointsFunc set_char_sizes; + FT_Size_ResetPixelsFunc set_pixel_sizes; + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + FT_Slot_LoadFunc load_glyph; + + FT_Face_GetKerningFunc get_kerning; + FT_Face_AttachFunc attach_file; + FT_Face_GetAdvancesFunc get_advances; + + /* since version 2.2 */ + FT_Size_RequestFunc request_size; + FT_Size_SelectFunc select_size; + + } FT_Driver_ClassRec, *FT_Driver_Class; + + + /* + * The following functions are used as stubs for `set_char_sizes' and + * `set_pixel_sizes'; the code uses `request_size' and `select_size' + * functions instead. + * + * Implementation is in `src/base/ftobjs.c'. + */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_BASE( FT_Error ) + ft_stub_set_char_sizes( FT_Size size, + FT_F26Dot6 width, + FT_F26Dot6 height, + FT_UInt horz_res, + FT_UInt vert_res ); + + FT_BASE( FT_Error ) + ft_stub_set_pixel_sizes( FT_Size size, + FT_UInt width, + FT_UInt height ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_DRIVER */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Driver_ClassRec stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_DRIVER */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Driver_ClassRec struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ + a_, b_, +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) +#endif + +#define FT_DECLARE_DRIVER(class_) \ + FT_CALLBACK_TABLE \ + const FT_Driver_ClassRec class_; + +#define FT_DEFINE_DRIVER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + face_object_size_, size_object_size_, \ + slot_object_size_, init_face_, done_face_, \ + init_size_, done_size_, init_slot_, done_slot_, \ + old_set_char_sizes_, old_set_pixel_sizes_, \ + load_glyph_, get_kerning_, attach_file_, \ + get_advances_, request_size_, select_size_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Driver_ClassRec class_ = \ + { \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ + init_,done_,get_interface_) \ + \ + face_object_size_, \ + size_object_size_, \ + slot_object_size_, \ + \ + init_face_, \ + done_face_, \ + \ + init_size_, \ + done_size_, \ + \ + init_slot_, \ + done_slot_, \ + \ + FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ + \ + load_glyph_, \ + \ + get_kerning_, \ + attach_file_, \ + get_advances_, \ + \ + request_size_, \ + select_size_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ + clazz->set_char_sizes = a_; \ + clazz->set_pixel_sizes = b_; +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) +#endif + +#define FT_DECLARE_DRIVER(class_) FT_DECLARE_MODULE(class_) + +#define FT_DEFINE_DRIVER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + face_object_size_, size_object_size_, \ + slot_object_size_, init_face_, done_face_, \ + init_size_, done_size_, init_slot_, done_slot_, \ + old_set_char_sizes_, old_set_pixel_sizes_, \ + load_glyph_, get_kerning_, attach_file_, \ + get_advances_, request_size_, select_size_ ) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \ + class_##_pic_free( library ); \ + if ( dclazz ) \ + FT_FREE( dclazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Driver_Class clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ + init_,done_,get_interface_) \ + \ + clazz->face_object_size = face_object_size_; \ + clazz->size_object_size = size_object_size_; \ + clazz->slot_object_size = slot_object_size_; \ + \ + clazz->init_face = init_face_; \ + clazz->done_face = done_face_; \ + \ + clazz->init_size = init_size_; \ + clazz->done_size = done_size_; \ + \ + clazz->init_slot = init_slot_; \ + clazz->done_slot = done_slot_; \ + \ + FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ + \ + clazz->load_glyph = load_glyph_; \ + \ + clazz->get_kerning = get_kerning_; \ + clazz->attach_file = attach_file_; \ + clazz->get_advances = get_advances_; \ + \ + clazz->request_size = request_size_; \ + clazz->select_size = select_size_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + return FT_Err_Ok; \ + } + + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __FTDRIVER_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftgloadr.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftgloadr.h new file mode 100644 index 0000000..ce4dc6c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftgloadr.h @@ -0,0 +1,168 @@ +/***************************************************************************/ +/* */ +/* ftgloadr.h */ +/* */ +/* The FreeType glyph loader (specification). */ +/* */ +/* Copyright 2002, 2003, 2005, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTGLOADR_H__ +#define __FTGLOADR_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_GlyphLoader */ + /* */ + /* <Description> */ + /* The glyph loader is an internal object used to load several glyphs */ + /* together (for example, in the case of composites). */ + /* */ + /* <Note> */ + /* The glyph loader implementation is not part of the high-level API, */ + /* hence the forward structure declaration. */ + /* */ + typedef struct FT_GlyphLoaderRec_* FT_GlyphLoader ; + + +#if 0 /* moved to freetype.h in version 2.2 */ +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 +#define FT_SUBGLYPH_FLAG_SCALE 8 +#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 +#define FT_SUBGLYPH_FLAG_2X2 0x80 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 +#endif + + + typedef struct FT_SubGlyphRec_ + { + FT_Int index; + FT_UShort flags; + FT_Int arg1; + FT_Int arg2; + FT_Matrix transform; + + } FT_SubGlyphRec; + + + typedef struct FT_GlyphLoadRec_ + { + FT_Outline outline; /* outline */ + FT_Vector* extra_points; /* extra points table */ + FT_Vector* extra_points2; /* second extra points table */ + FT_UInt num_subglyphs; /* number of subglyphs */ + FT_SubGlyph subglyphs; /* subglyphs */ + + } FT_GlyphLoadRec, *FT_GlyphLoad; + + + typedef struct FT_GlyphLoaderRec_ + { + FT_Memory memory; + FT_UInt max_points; + FT_UInt max_contours; + FT_UInt max_subglyphs; + FT_Bool use_extra; + + FT_GlyphLoadRec base; + FT_GlyphLoadRec current; + + void* other; /* for possible future extension? */ + + } FT_GlyphLoaderRec; + + + /* create new empty glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_New( FT_Memory memory, + FT_GlyphLoader *aloader ); + + /* add an extra points table to a glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader ); + + /* destroy a glyph loader */ + FT_BASE( void ) + FT_GlyphLoader_Done( FT_GlyphLoader loader ); + + /* reset a glyph loader (frees everything int it) */ + FT_BASE( void ) + FT_GlyphLoader_Reset( FT_GlyphLoader loader ); + + /* rewind a glyph loader */ + FT_BASE( void ) + FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); + + /* check that there is enough space to add `n_points' and `n_contours' */ + /* to the glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, + FT_UInt n_points, + FT_UInt n_contours ); + + +#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ + ( (_count) == 0 || ((_loader)->base.outline.n_points + \ + (_loader)->current.outline.n_points + \ + (unsigned long)(_count)) <= (_loader)->max_points ) + +#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ + ( (_count) == 0 || ((_loader)->base.outline.n_contours + \ + (_loader)->current.outline.n_contours + \ + (unsigned long)(_count)) <= (_loader)->max_contours ) + +#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \ + ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ + FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ + ? 0 \ + : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) ) + + + /* check that there is enough space to add `n_subs' sub-glyphs to */ + /* a glyph loader */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, + FT_UInt n_subs ); + + /* prepare a glyph loader, i.e. empty the current glyph */ + FT_BASE( void ) + FT_GlyphLoader_Prepare( FT_GlyphLoader loader ); + + /* add the current glyph to the base glyph */ + FT_BASE( void ) + FT_GlyphLoader_Add( FT_GlyphLoader loader ); + + /* copy points from one glyph loader to another */ + FT_BASE( FT_Error ) + FT_GlyphLoader_CopyPoints( FT_GlyphLoader target, + FT_GlyphLoader source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTGLOADR_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftmemory.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftmemory.h new file mode 100644 index 0000000..026aa63 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftmemory.h @@ -0,0 +1,380 @@ +/***************************************************************************/ +/* */ +/* ftmemory.h */ +/* */ +/* The FreeType memory management macros (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTMEMORY_H__ +#define __FTMEMORY_H__ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_TYPES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_SET_ERROR */ + /* */ + /* <Description> */ + /* This macro is used to set an implicit `error' variable to a given */ + /* expression's value (usually a function call), and convert it to a */ + /* boolean which is set whenever the value is != 0. */ + /* */ +#undef FT_SET_ERROR +#define FT_SET_ERROR( expression ) \ + ( ( error = (expression) ) != 0 ) + + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** M E M O R Y ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* + * C++ refuses to handle statements like p = (void*)anything, with `p' a + * typed pointer. Since we don't have a `typeof' operator in standard + * C++, we have to use a template to emulate it. + */ + +#ifdef __cplusplus + + extern "C++" + template <typename T> inline T* + cplusplus_typeof( T*, + void *v ) + { + return static_cast <T*> ( v ); + } + +#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) ) + +#else + +#define FT_ASSIGNP( p, val ) (p) = (val) + +#endif + + + +#ifdef FT_DEBUG_MEMORY + + FT_BASE( const char* ) _ft_debug_file; + FT_BASE( long ) _ft_debug_lineno; + +#define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \ + _ft_debug_lineno = __LINE__, \ + (exp) ) + +#define FT_ASSIGNP_INNER( p, exp ) ( _ft_debug_file = __FILE__, \ + _ft_debug_lineno = __LINE__, \ + FT_ASSIGNP( p, exp ) ) + +#else /* !FT_DEBUG_MEMORY */ + +#define FT_DEBUG_INNER( exp ) (exp) +#define FT_ASSIGNP_INNER( p, exp ) FT_ASSIGNP( p, exp ) + +#endif /* !FT_DEBUG_MEMORY */ + + + /* + * The allocation functions return a pointer, and the error code + * is written to through the `p_error' parameter. See below for + * for documentation. + */ + + FT_BASE( FT_Pointer ) + ft_mem_alloc( FT_Memory memory, + FT_Long size, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qalloc( FT_Memory memory, + FT_Long size, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_realloc( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_qrealloc( FT_Memory memory, + FT_Long item_size, + FT_Long cur_count, + FT_Long new_count, + void* block, + FT_Error *p_error ); + + FT_BASE( void ) + ft_mem_free( FT_Memory memory, + const void* P ); + + +#define FT_MEM_ALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) ) + +#define FT_MEM_FREE( ptr ) \ + FT_BEGIN_STMNT \ + ft_mem_free( memory, (ptr) ); \ + (ptr) = NULL; \ + FT_END_STMNT + +#define FT_MEM_NEW( ptr ) \ + FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) ) + +#define FT_MEM_REALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, 1, \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, (size), &error ) ) + +#define FT_MEM_QNEW( ptr ) \ + FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) ) + +#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, 1, \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (item_size), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), &error ) ) + +#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (item_size), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (itmsz), \ + (oldcnt), (newcnt), \ + (ptr), &error ) ) + + +#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 ) + + +#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count ) + +#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count ) + +#define FT_MEM_MOVE( dest, source, count ) ft_memmove( dest, source, count ) + + +#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count ) + +#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) ) + + +#define FT_ARRAY_ZERO( dest, count ) \ + FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) ) + +#define FT_ARRAY_COPY( dest, source, count ) \ + FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) ) + +#define FT_ARRAY_MOVE( dest, source, count ) \ + FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) ) + + + /* + * Return the maximum number of addressable elements in an array. + * We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid + * any problems. + */ +#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) ) + +#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) ) + + + /*************************************************************************/ + /* */ + /* The following functions macros expect that their pointer argument is */ + /* _typed_ in order to automatically compute array element sizes. */ + /* */ + +#define FT_MEM_NEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + +#define FT_MEM_QNEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + 0, (count), \ + NULL, &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ + (cursz), (newsz), \ + (ptr), &error ) ) + + +#define FT_ALLOC( ptr, size ) \ + FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) ) + +#define FT_REALLOC( ptr, cursz, newsz ) \ + FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) ) + +#define FT_ALLOC_MULT( ptr, count, item_size ) \ + FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) ) + +#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt, \ + newcnt, itmsz ) ) + +#define FT_QALLOC( ptr, size ) \ + FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) ) + +#define FT_QREALLOC( ptr, cursz, newsz ) \ + FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) ) + +#define FT_QALLOC_MULT( ptr, count, item_size ) \ + FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) ) + +#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt, \ + newcnt, itmsz ) ) + +#define FT_FREE( ptr ) FT_MEM_FREE( ptr ) + +#define FT_NEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) ) + +#define FT_NEW_ARRAY( ptr, count ) \ + FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) + +#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \ + FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) + +#define FT_QNEW( ptr ) \ + FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) ) + +#define FT_QNEW_ARRAY( ptr, count ) \ + FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) + +#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \ + FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + FT_BASE( FT_Error ) + FT_Alloc( FT_Memory memory, + FT_Long size, + void* *P ); + + FT_BASE( FT_Error ) + FT_QAlloc( FT_Memory memory, + FT_Long size, + void* *p ); + + FT_BASE( FT_Error ) + FT_Realloc( FT_Memory memory, + FT_Long current, + FT_Long size, + void* *P ); + + FT_BASE( FT_Error ) + FT_QRealloc( FT_Memory memory, + FT_Long current, + FT_Long size, + void* *p ); + + FT_BASE( void ) + FT_Free( FT_Memory memory, + void* *P ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + FT_BASE( FT_Pointer ) + ft_mem_strdup( FT_Memory memory, + const char* str, + FT_Error *p_error ); + + FT_BASE( FT_Pointer ) + ft_mem_dup( FT_Memory memory, + const void* address, + FT_ULong size, + FT_Error *p_error ); + +#define FT_MEM_STRDUP( dst, str ) \ + (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error ) + +#define FT_STRDUP( dst, str ) \ + FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) ) + +#define FT_MEM_DUP( dst, address, size ) \ + (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error ) + +#define FT_DUP( dst, address, size ) \ + FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) ) + + + /* Return >= 1 if a truncation occurs. */ + /* Return 0 if the source string fits the buffer. */ + /* This is *not* the same as strlcpy(). */ + FT_BASE( FT_Int ) + ft_mem_strcpyn( char* dst, + const char* src, + FT_ULong size ); + +#define FT_STRCPYN( dst, src, size ) \ + ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) ) + + /* */ + + +FT_END_HEADER + +#endif /* __FTMEMORY_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftobjs.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftobjs.h new file mode 100644 index 0000000..670eb78 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftobjs.h @@ -0,0 +1,1428 @@ +/***************************************************************************/ +/* */ +/* ftobjs.h */ +/* */ +/* The FreeType private base classes (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file contains the definition of all internal FreeType classes. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTOBJS_H__ +#define __FTOBJS_H__ + +#include <ft2build.h> +#include FT_RENDER_H +#include FT_SIZES_H +#include FT_LCD_FILTER_H +#include FT_INTERNAL_MEMORY_H +#include FT_INTERNAL_GLYPH_LOADER_H +#include FT_INTERNAL_DRIVER_H +#include FT_INTERNAL_AUTOHINT_H +#include FT_INTERNAL_SERVICE_H +#include FT_INTERNAL_PIC_H + +#ifdef FT_CONFIG_OPTION_INCREMENTAL +#include FT_INCREMENTAL_H +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* Some generic definitions. */ + /* */ +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL (void*)0 +#endif + + + /*************************************************************************/ + /* */ + /* The min and max functions missing in C. As usual, be careful not to */ + /* write things like FT_MIN( a++, b++ ) to avoid side effects. */ + /* */ +#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) ) +#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) ) + +#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) + + +#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) ) +#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n ) +#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n ) + +#define FT_PIX_FLOOR( x ) ( (x) & ~63 ) +#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 ) +#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 ) + + + /* + * Return the highest power of 2 that is <= value; this correspond to + * the highest bit in a given 32-bit value. + */ + FT_BASE( FT_UInt32 ) + ft_highpow2( FT_UInt32 value ); + + + /* + * character classification functions -- since these are used to parse + * font files, we must not use those in <ctypes.h> which are + * locale-dependent + */ +#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U ) + +#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \ + ( (unsigned)(x) - 'a' ) < 6U || \ + ( (unsigned)(x) - 'A' ) < 6U ) + + /* the next two macros assume ASCII representation */ +#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U ) +#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U ) + +#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) ) +#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) ) + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** C H A R M A P S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* handle to internal charmap object */ + typedef struct FT_CMapRec_* FT_CMap; + + /* handle to charmap class structure */ + typedef const struct FT_CMap_ClassRec_* FT_CMap_Class; + + /* internal charmap object structure */ + typedef struct FT_CMapRec_ + { + FT_CharMapRec charmap; + FT_CMap_Class clazz; + + } FT_CMapRec; + + /* typecase any pointer to a charmap handle */ +#define FT_CMAP( x ) ((FT_CMap)( x )) + + /* obvious macros */ +#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id +#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id +#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding +#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face + + + /* class method definitions */ + typedef FT_Error + (*FT_CMap_InitFunc)( FT_CMap cmap, + FT_Pointer init_data ); + + typedef void + (*FT_CMap_DoneFunc)( FT_CMap cmap ); + + typedef FT_UInt + (*FT_CMap_CharIndexFunc)( FT_CMap cmap, + FT_UInt32 char_code ); + + typedef FT_UInt + (*FT_CMap_CharNextFunc)( FT_CMap cmap, + FT_UInt32 *achar_code ); + + typedef FT_UInt + (*FT_CMap_CharVarIndexFunc)( FT_CMap cmap, + FT_CMap unicode_cmap, + FT_UInt32 char_code, + FT_UInt32 variant_selector ); + + typedef FT_Bool + (*FT_CMap_CharVarIsDefaultFunc)( FT_CMap cmap, + FT_UInt32 char_code, + FT_UInt32 variant_selector ); + + typedef FT_UInt32 * + (*FT_CMap_VariantListFunc)( FT_CMap cmap, + FT_Memory mem ); + + typedef FT_UInt32 * + (*FT_CMap_CharVariantListFunc)( FT_CMap cmap, + FT_Memory mem, + FT_UInt32 char_code ); + + typedef FT_UInt32 * + (*FT_CMap_VariantCharListFunc)( FT_CMap cmap, + FT_Memory mem, + FT_UInt32 variant_selector ); + + + typedef struct FT_CMap_ClassRec_ + { + FT_ULong size; + FT_CMap_InitFunc init; + FT_CMap_DoneFunc done; + FT_CMap_CharIndexFunc char_index; + FT_CMap_CharNextFunc char_next; + + /* Subsequent entries are special ones for format 14 -- the variant */ + /* selector subtable which behaves like no other */ + + FT_CMap_CharVarIndexFunc char_var_index; + FT_CMap_CharVarIsDefaultFunc char_var_default; + FT_CMap_VariantListFunc variant_list; + FT_CMap_CharVariantListFunc charvariant_list; + FT_CMap_VariantCharListFunc variantchar_list; + + } FT_CMap_ClassRec; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_CMAP_CLASS(class_) \ + FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; + +#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ + char_next_, char_var_index_, char_var_default_, variant_list_, \ + charvariant_list_, variantchar_list_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_CMap_ClassRec class_ = \ + { \ + size_, init_, done_, char_index_, char_next_, char_var_index_, \ + char_var_default_, variant_list_, charvariant_list_, variantchar_list_ \ + }; +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_CMAP_CLASS(class_) \ + void FT_Init_Class_##class_( FT_Library library, FT_CMap_ClassRec* clazz); + +#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ + char_next_, char_var_index_, char_var_default_, variant_list_, \ + charvariant_list_, variantchar_list_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_CMap_ClassRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->size = size_; \ + clazz->init = init_; \ + clazz->done = done_; \ + clazz->char_index = char_index_; \ + clazz->char_next = char_next_; \ + clazz->char_var_index = char_var_index_; \ + clazz->char_var_default = char_var_default_; \ + clazz->variant_list = variant_list_; \ + clazz->charvariant_list = charvariant_list_; \ + clazz->variantchar_list = variantchar_list_; \ + } +#endif /* FT_CONFIG_OPTION_PIC */ + + /* create a new charmap and add it to charmap->face */ + FT_BASE( FT_Error ) + FT_CMap_New( FT_CMap_Class clazz, + FT_Pointer init_data, + FT_CharMap charmap, + FT_CMap *acmap ); + + /* destroy a charmap and remove it from face's list */ + FT_BASE( void ) + FT_CMap_Done( FT_CMap cmap ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Face_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_Face */ + /* object. These fields may change between different releases of */ + /* FreeType. */ + /* */ + /* <Fields> */ + /* max_points :: */ + /* The maximal number of points used to store the vectorial outline */ + /* of any glyph in this face. If this value cannot be known in */ + /* advance, or if the face isn't scalable, this should be set to 0. */ + /* Only relevant for scalable formats. */ + /* */ + /* max_contours :: */ + /* The maximal number of contours used to store the vectorial */ + /* outline of any glyph in this face. If this value cannot be */ + /* known in advance, or if the face isn't scalable, this should be */ + /* set to 0. Only relevant for scalable formats. */ + /* */ + /* transform_matrix :: */ + /* A 2x2 matrix of 16.16 coefficients used to transform glyph */ + /* outlines after they are loaded from the font. Only used by the */ + /* convenience functions. */ + /* */ + /* transform_delta :: */ + /* A translation vector used to transform glyph outlines after they */ + /* are loaded from the font. Only used by the convenience */ + /* functions. */ + /* */ + /* transform_flags :: */ + /* Some flags used to classify the transform. Only used by the */ + /* convenience functions. */ + /* */ + /* services :: */ + /* A cache for frequently used services. It should be only */ + /* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. */ + /* */ + /* incremental_interface :: */ + /* If non-null, the interface through which glyph data and metrics */ + /* are loaded incrementally for faces that do not provide all of */ + /* this data when first opened. This field exists only if */ + /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ + /* */ + /* ignore_unpatented_hinter :: */ + /* This boolean flag instructs the glyph loader to ignore the */ + /* native font hinter, if one is found. This is exclusively used */ + /* in the case when the unpatented hinter is compiled within the */ + /* library. */ + /* */ + /* refcount :: */ + /* A counter initialized to~1 at the time an @FT_Face structure is */ + /* created. @FT_Reference_Face increments this counter, and */ + /* @FT_Done_Face only destroys a face if the counter is~1, */ + /* otherwise it simply decrements it. */ + /* */ + typedef struct FT_Face_InternalRec_ + { +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_UShort reserved1; + FT_Short reserved2; +#endif + FT_Matrix transform_matrix; + FT_Vector transform_delta; + FT_Int transform_flags; + + FT_ServiceCacheRec services; + +#ifdef FT_CONFIG_OPTION_INCREMENTAL + FT_Incremental_InterfaceRec* incremental_interface; +#endif + + FT_Bool ignore_unpatented_hinter; + FT_UInt refcount; + + } FT_Face_InternalRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Slot_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_GlyphSlot */ + /* object. These fields may change between different releases of */ + /* FreeType. */ + /* */ + /* <Fields> */ + /* loader :: The glyph loader object used to load outlines */ + /* into the glyph slot. */ + /* */ + /* flags :: Possible values are zero or */ + /* FT_GLYPH_OWN_BITMAP. The latter indicates */ + /* that the FT_GlyphSlot structure owns the */ + /* bitmap buffer. */ + /* */ + /* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */ + /* must be transformed through a specific */ + /* font transformation. This is _not_ the same */ + /* as the face transform set through */ + /* FT_Set_Transform(). */ + /* */ + /* glyph_matrix :: The 2x2 matrix corresponding to the glyph */ + /* transformation, if necessary. */ + /* */ + /* glyph_delta :: The 2d translation vector corresponding to */ + /* the glyph transformation, if necessary. */ + /* */ + /* glyph_hints :: Format-specific glyph hints management. */ + /* */ + +#define FT_GLYPH_OWN_BITMAP 0x1 + + typedef struct FT_Slot_InternalRec_ + { + FT_GlyphLoader loader; + FT_UInt flags; + FT_Bool glyph_transformed; + FT_Matrix glyph_matrix; + FT_Vector glyph_delta; + void* glyph_hints; + + } FT_GlyphSlot_InternalRec; + + +#if 0 + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Size_InternalRec */ + /* */ + /* <Description> */ + /* This structure contains the internal fields of each FT_Size */ + /* object. Currently, it's empty. */ + /* */ + /*************************************************************************/ + + typedef struct FT_Size_InternalRec_ + { + /* empty */ + + } FT_Size_InternalRec; + +#endif + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** M O D U L E S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ModuleRec */ + /* */ + /* <Description> */ + /* A module object instance. */ + /* */ + /* <Fields> */ + /* clazz :: A pointer to the module's class. */ + /* */ + /* library :: A handle to the parent library object. */ + /* */ + /* memory :: A handle to the memory manager. */ + /* */ + /* generic :: A generic structure for user-level extensibility (?). */ + /* */ + typedef struct FT_ModuleRec_ + { + FT_Module_Class* clazz; + FT_Library library; + FT_Memory memory; + FT_Generic generic; + + } FT_ModuleRec; + + + /* typecast an object to a FT_Module */ +#define FT_MODULE( x ) ((FT_Module)( x )) +#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz +#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library +#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory + + +#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_FONT_DRIVER ) + +#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_RENDERER ) + +#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_HINTER ) + +#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_STYLER ) + +#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_SCALABLE ) + +#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_NO_OUTLINES ) + +#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ + FT_MODULE_DRIVER_HAS_HINTER ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Module_Interface */ + /* */ + /* <Description> */ + /* Finds a module and returns its specific interface as a typeless */ + /* pointer. */ + /* */ + /* <Input> */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* <Return> */ + /* A module-specific interface if available, 0 otherwise. */ + /* */ + /* <Note> */ + /* You should better be familiar with FreeType internals to know */ + /* which module to look for, and what its interface is :-) */ + /* */ + FT_BASE( const void* ) + FT_Get_Module_Interface( FT_Library library, + const char* mod_name ); + + FT_BASE( FT_Pointer ) + ft_module_get_service( FT_Module module, + const char* service_id ); + + /* */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* a few macros used to perform easy typecasts with minimal brain damage */ + +#define FT_FACE( x ) ((FT_Face)(x)) +#define FT_SIZE( x ) ((FT_Size)(x)) +#define FT_SLOT( x ) ((FT_GlyphSlot)(x)) + +#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver +#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library +#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory +#define FT_FACE_STREAM( x ) FT_FACE( x )->stream + +#define FT_SIZE_FACE( x ) FT_SIZE( x )->face +#define FT_SLOT_FACE( x ) FT_SLOT( x )->face + +#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph +#define FT_FACE_SIZE( x ) FT_FACE( x )->size + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_GlyphSlot */ + /* */ + /* <Description> */ + /* It is sometimes useful to have more than one glyph slot for a */ + /* given face object. This function is used to create additional */ + /* slots. All of them are automatically discarded when the face is */ + /* destroyed. */ + /* */ + /* <Input> */ + /* face :: A handle to a parent face object. */ + /* */ + /* <Output> */ + /* aslot :: A handle to a new glyph slot object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + FT_BASE( FT_Error ) + FT_New_GlyphSlot( FT_Face face, + FT_GlyphSlot *aslot ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_GlyphSlot */ + /* */ + /* <Description> */ + /* Destroys a given glyph slot. Remember however that all slots are */ + /* automatically destroyed with its parent. Using this function is */ + /* not always mandatory. */ + /* */ + /* <Input> */ + /* slot :: A handle to a target glyph slot. */ + /* */ + FT_BASE( void ) + FT_Done_GlyphSlot( FT_GlyphSlot slot ); + + /* */ + +#define FT_REQUEST_WIDTH( req ) \ + ( (req)->horiResolution \ + ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \ + : (req)->width ) + +#define FT_REQUEST_HEIGHT( req ) \ + ( (req)->vertResolution \ + ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \ + : (req)->height ) + + + /* Set the metrics according to a bitmap strike. */ + FT_BASE( void ) + FT_Select_Metrics( FT_Face face, + FT_ULong strike_index ); + + + /* Set the metrics according to a size request. */ + FT_BASE( void ) + FT_Request_Metrics( FT_Face face, + FT_Size_Request req ); + + + /* Match a size request against `available_sizes'. */ + FT_BASE( FT_Error ) + FT_Match_Size( FT_Face face, + FT_Size_Request req, + FT_Bool ignore_width, + FT_ULong* size_index ); + + + /* Use the horizontal metrics to synthesize the vertical metrics. */ + /* If `advance' is zero, it is also synthesized. */ + FT_BASE( void ) + ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics, + FT_Pos advance ); + + + /* Free the bitmap of a given glyphslot when needed (i.e., only when it */ + /* was allocated with ft_glyphslot_alloc_bitmap). */ + FT_BASE( void ) + ft_glyphslot_free_bitmap( FT_GlyphSlot slot ); + + + /* Allocate a new bitmap buffer in a glyph slot. */ + FT_BASE( FT_Error ) + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, + FT_ULong size ); + + + /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ + /* will not be freed by a later call to ft_glyphslot_free_bitmap. */ + FT_BASE( void ) + ft_glyphslot_set_bitmap( FT_GlyphSlot slot, + FT_Byte* buffer ); + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** R E N D E R E R S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#define FT_RENDERER( x ) ((FT_Renderer)( x )) +#define FT_GLYPH( x ) ((FT_Glyph)( x )) +#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x )) +#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) + + + typedef struct FT_RendererRec_ + { + FT_ModuleRec root; + FT_Renderer_Class* clazz; + FT_Glyph_Format glyph_format; + FT_Glyph_Class glyph_class; + + FT_Raster raster; + FT_Raster_Render_Func raster_render; + FT_Renderer_RenderFunc render; + + } FT_RendererRec; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** F O N T D R I V E R S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* typecast a module into a driver easily */ +#define FT_DRIVER( x ) ((FT_Driver)(x)) + + /* typecast a module as a driver, and get its driver class */ +#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_DriverRec */ + /* */ + /* <Description> */ + /* The root font driver class. A font driver is responsible for */ + /* managing and loading font files of a given format. */ + /* */ + /* <Fields> */ + /* root :: Contains the fields of the root module class. */ + /* */ + /* clazz :: A pointer to the font driver's class. Note that */ + /* this is NOT root.clazz. `class' wasn't used */ + /* as it is a reserved word in C++. */ + /* */ + /* faces_list :: The list of faces currently opened by this */ + /* driver. */ + /* */ + /* extensions :: A typeless pointer to the driver's extensions */ + /* registry, if they are supported through the */ + /* configuration macro FT_CONFIG_OPTION_EXTENSIONS. */ + /* */ + /* glyph_loader :: The glyph loader for all faces managed by this */ + /* driver. This object isn't defined for unscalable */ + /* formats. */ + /* */ + typedef struct FT_DriverRec_ + { + FT_ModuleRec root; + FT_Driver_Class clazz; + + FT_ListRec faces_list; + void* extensions; + + FT_GlyphLoader glyph_loader; + + } FT_DriverRec; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** L I B R A R I E S ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /* This hook is used by the TrueType debugger. It must be set to an */ + /* alternate truetype bytecode interpreter function. */ +#define FT_DEBUG_HOOK_TRUETYPE 0 + + + /* Set this debug hook to a non-null pointer to force unpatented hinting */ + /* for all faces when both TT_USE_BYTECODE_INTERPRETER and */ + /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. This is only used */ + /* during debugging. */ +#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1 + + + typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, + FT_Render_Mode render_mode, + FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_LibraryRec */ + /* */ + /* <Description> */ + /* The FreeType library class. This is the root of all FreeType */ + /* data. Use FT_New_Library() to create a library object, and */ + /* FT_Done_Library() to discard it and all child objects. */ + /* */ + /* <Fields> */ + /* memory :: The library's memory object. Manages memory */ + /* allocation. */ + /* */ + /* generic :: Client data variable. Used to extend the */ + /* Library class by higher levels and clients. */ + /* */ + /* version_major :: The major version number of the library. */ + /* */ + /* version_minor :: The minor version number of the library. */ + /* */ + /* version_patch :: The current patch level of the library. */ + /* */ + /* num_modules :: The number of modules currently registered */ + /* within this library. This is set to 0 for new */ + /* libraries. New modules are added through the */ + /* FT_Add_Module() API function. */ + /* */ + /* modules :: A table used to store handles to the currently */ + /* registered modules. Note that each font driver */ + /* contains a list of its opened faces. */ + /* */ + /* renderers :: The list of renderers currently registered */ + /* within the library. */ + /* */ + /* cur_renderer :: The current outline renderer. This is a */ + /* shortcut used to avoid parsing the list on */ + /* each call to FT_Outline_Render(). It is a */ + /* handle to the current renderer for the */ + /* FT_GLYPH_FORMAT_OUTLINE format. */ + /* */ + /* auto_hinter :: XXX */ + /* */ + /* raster_pool :: The raster object's render pool. This can */ + /* ideally be changed dynamically at run-time. */ + /* */ + /* raster_pool_size :: The size of the render pool in bytes. */ + /* */ + /* debug_hooks :: XXX */ + /* */ + /* lcd_filter :: If subpixel rendering is activated, the */ + /* selected LCD filter mode. */ + /* */ + /* lcd_extra :: If subpixel rendering is activated, the number */ + /* of extra pixels needed for the LCD filter. */ + /* */ + /* lcd_weights :: If subpixel rendering is activated, the LCD */ + /* filter weights, if any. */ + /* */ + /* lcd_filter_func :: If subpixel rendering is activated, the LCD */ + /* filtering callback function. */ + /* */ + /* pic_container :: Contains global structs and tables, instead */ + /* of defining them globallly. */ + /* */ + /* refcount :: A counter initialized to~1 at the time an */ + /* @FT_Library structure is created. */ + /* @FT_Reference_Library increments this counter, */ + /* and @FT_Done_Library only destroys a library */ + /* if the counter is~1, otherwise it simply */ + /* decrements it. */ + /* */ + typedef struct FT_LibraryRec_ + { + FT_Memory memory; /* library's memory manager */ + + FT_Generic generic; + + FT_Int version_major; + FT_Int version_minor; + FT_Int version_patch; + + FT_UInt num_modules; + FT_Module modules[FT_MAX_MODULES]; /* module objects */ + + FT_ListRec renderers; /* list of renderers */ + FT_Renderer cur_renderer; /* current outline renderer */ + FT_Module auto_hinter; + + FT_Byte* raster_pool; /* scan-line conversion */ + /* render pool */ + FT_ULong raster_pool_size; /* size of render pool in bytes */ + + FT_DebugHook_Func debug_hooks[4]; + +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_LcdFilter lcd_filter; + FT_Int lcd_extra; /* number of extra pixels */ + FT_Byte lcd_weights[7]; /* filter weights, if any */ + FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ +#endif + +#ifdef FT_CONFIG_OPTION_PIC + FT_PIC_Container pic_container; +#endif + + FT_UInt refcount; + + } FT_LibraryRec; + + + FT_BASE( FT_Renderer ) + FT_Lookup_Renderer( FT_Library library, + FT_Glyph_Format format, + FT_ListNode* node ); + + FT_BASE( FT_Error ) + FT_Render_Glyph_Internal( FT_Library library, + FT_GlyphSlot slot, + FT_Render_Mode render_mode ); + + typedef const char* + (*FT_Face_GetPostscriptNameFunc)( FT_Face face ); + + typedef FT_Error + (*FT_Face_GetGlyphNameFunc)( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + typedef FT_UInt + (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, + FT_String* glyph_name ); + + +#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_New_Memory */ + /* */ + /* <Description> */ + /* Creates a new memory object. */ + /* */ + /* <Return> */ + /* A pointer to the new memory object. 0 in case of error. */ + /* */ + FT_BASE( FT_Memory ) + FT_New_Memory( void ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Done_Memory */ + /* */ + /* <Description> */ + /* Discards memory manager. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* */ + FT_BASE( void ) + FT_Done_Memory( FT_Memory memory ); + +#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ + + + /* Define default raster's interface. The default raster is located in */ + /* `src/base/ftraster.c'. */ + /* */ + /* Client applications can register new rasters through the */ + /* FT_Set_Raster() API. */ + +#ifndef FT_NO_DEFAULT_RASTER + FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; +#endif + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftimage.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_OUTLINE_FUNCS */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Outline_Funcs struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ + cubic_to_, shift_, delta_) \ + static const FT_Outline_Funcs class_ = \ + { \ + move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ + cubic_to_, shift_, delta_) \ + static FT_Error \ + Init_Class_##class_( FT_Outline_Funcs* clazz ) \ + { \ + clazz->move_to = move_to_; \ + clazz->line_to = line_to_; \ + clazz->conic_to = conic_to_; \ + clazz->cubic_to = cubic_to_; \ + clazz->shift = shift_; \ + clazz->delta = delta_; \ + return FT_Err_Ok; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_RASTER_FUNCS */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Raster_Funcs struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ + raster_reset_, raster_set_mode_, \ + raster_render_, raster_done_) \ + const FT_Raster_Funcs class_ = \ + { \ + glyph_format_, raster_new_, raster_reset_, \ + raster_set_mode_, raster_render_, raster_done_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ + raster_reset_, raster_set_mode_, raster_render_, raster_done_) \ + void \ + FT_Init_Class_##class_( FT_Raster_Funcs* clazz ) \ + { \ + clazz->glyph_format = glyph_format_; \ + clazz->raster_new = raster_new_; \ + clazz->raster_reset = raster_reset_; \ + clazz->raster_set_mode = raster_set_mode_; \ + clazz->raster_render = raster_render_; \ + clazz->raster_done = raster_done_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftrender.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_GLYPH */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Glyph_Class struct. */ + /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ + /* called with a pre-allocated stracture to be filled. */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ + transform_, bbox_, prepare_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Glyph_Class class_ = \ + { \ + size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ + transform_, bbox_, prepare_) \ + void \ + FT_Init_Class_##class_( FT_Glyph_Class* clazz ) \ + { \ + clazz->glyph_size = size_; \ + clazz->glyph_format = format_; \ + clazz->glyph_init = init_; \ + clazz->glyph_done = done_; \ + clazz->glyph_copy = copy_; \ + clazz->glyph_transform = transform_; \ + clazz->glyph_bbox = bbox_; \ + clazz->glyph_prepare = prepare_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_RENDERER */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Renderer_Class stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_RENDERER */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Renderer_Class struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_RENDERER(class_) \ + FT_EXPORT_VAR( const FT_Renderer_Class ) class_; + +#define FT_DEFINE_RENDERER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + glyph_format_, render_glyph_, transform_glyph_, \ + get_glyph_cbox_, set_mode_, raster_class_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Renderer_Class class_ = \ + { \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ + interface_,init_,done_,get_interface_) \ + glyph_format_, \ + \ + render_glyph_, \ + transform_glyph_, \ + get_glyph_cbox_, \ + set_mode_, \ + \ + raster_class_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_) + +#define FT_DEFINE_RENDERER(class_, \ + flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_, \ + glyph_format_, render_glyph_, transform_glyph_, \ + get_glyph_cbox_, set_mode_, raster_class_ ) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ + FT_Memory memory = library->memory; \ + class_##_pic_free( library ); \ + if ( rclazz ) \ + FT_FREE( rclazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Renderer_Class* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ + interface_,init_,done_,get_interface_) \ + \ + clazz->glyph_format = glyph_format_; \ + \ + clazz->render_glyph = render_glyph_; \ + clazz->transform_glyph = transform_glyph_; \ + clazz->get_glyph_cbox = get_glyph_cbox_; \ + clazz->set_mode = set_mode_; \ + \ + clazz->raster_class = raster_class_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + return FT_Err_Ok; \ + } + + + +#endif /* FT_CONFIG_OPTION_PIC */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** PIC-Support Macros for ftmodapi.h ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#ifdef FT_CONFIG_OPTION_PIC + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Creator */ + /* */ + /* <Description> */ + /* A function used to create (allocate) a new module class object. */ + /* The object's members are initialized, but the module itself is */ + /* not. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* output_class :: Initialized with the newly allocated class. */ + /* */ + typedef FT_Error + (*FT_Module_Creator)( FT_Memory memory, + FT_Module_Class** output_class ); + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Module_Destroyer */ + /* */ + /* <Description> */ + /* A function used to destroy (deallocate) a module class object. */ + /* */ + /* <Input> */ + /* memory :: A handle to the memory manager. */ + /* clazz :: Module class to destroy. */ + /* */ + typedef void + (*FT_Module_Destroyer)( FT_Memory memory, + FT_Module_Class* clazz ); + +#endif + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DECLARE_MODULE */ + /* */ + /* <Description> */ + /* Used to create a forward declaration of a */ + /* FT_Module_Class stract instance. */ + /* */ + /* <Macro> */ + /* FT_DEFINE_MODULE */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Module_Class struct. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated stracture is returned.*/ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* fcinit.c (ft_create_default_module_classes) already contains */ + /* a mechanism to call these functions for the default modules */ + /* described in ftmodule.h */ + /* */ + /* Notice that the created Create and Destroy functions call */ + /* pic_init and pic_free function to allow you to manually allocate */ + /* and initialize any additional global data, like module specific */ + /* interface, and put them in the global pic container defined in */ + /* ftpic.h. if you don't need them just implement the functions as */ + /* empty to resolve the link error. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ + /* <Macro> */ + /* FT_DEFINE_ROOT_MODULE */ + /* */ + /* <Description> */ + /* Used to initialize an instance of FT_Module_Class struct inside */ + /* another stract that contains it or in a function that initializes */ + /* that containing stract */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DECLARE_MODULE(class_) \ + FT_CALLBACK_TABLE \ + const FT_Module_Class class_; \ + +#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ + }, + +#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Module_Class class_ = \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ + }; + + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DECLARE_MODULE(class_) \ + FT_Error FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ); \ + void FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ); + +#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + clazz->root.module_flags = flags_; \ + clazz->root.module_size = size_; \ + clazz->root.module_name = name_; \ + clazz->root.module_version = version_; \ + clazz->root.module_requires = requires_; \ + \ + clazz->root.module_interface = interface_; \ + \ + clazz->root.module_init = init_; \ + clazz->root.module_done = done_; \ + clazz->root.get_interface = get_interface_; + +#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ + interface_, init_, done_, get_interface_) \ + void class_##_pic_free( FT_Library library ); \ + FT_Error class_##_pic_init( FT_Library library ); \ + \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + class_##_pic_free( library ); \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Module_Class* clazz; \ + FT_Error error; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ + return error; \ + error = class_##_pic_init( library ); \ + if(error) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + clazz->module_flags = flags_; \ + clazz->module_size = size_; \ + clazz->module_name = name_; \ + clazz->module_version = version_; \ + clazz->module_requires = requires_; \ + \ + clazz->module_interface = interface_; \ + \ + clazz->module_init = init_; \ + clazz->module_done = done_; \ + clazz->get_interface = get_interface_; \ + \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + +FT_END_HEADER + +#endif /* __FTOBJS_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftpic.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftpic.h new file mode 100644 index 0000000..1b31957 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftpic.h @@ -0,0 +1,67 @@ +/***************************************************************************/ +/* */ +/* ftpic.h */ +/* */ +/* The FreeType position independent code services (declaration). */ +/* */ +/* Copyright 2009 by */ +/* Oran Agra and Mickey Gabel. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Modules that ordinarily have const global data that need address */ + /* can instead define pointers here. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTPIC_H__ +#define __FTPIC_H__ + + +FT_BEGIN_HEADER + +#ifdef FT_CONFIG_OPTION_PIC + + typedef struct FT_PIC_Container_ + { + /* pic containers for base */ + void* base; + /* pic containers for modules */ + void* autofit; + void* cff; + void* pshinter; + void* psnames; + void* raster; + void* sfnt; + void* smooth; + void* truetype; + } FT_PIC_Container; + + /* Initialize the various function tables, structs, etc. stored in the container. */ + FT_BASE( FT_Error ) + ft_pic_container_init( FT_Library library ); + + + /* Destroy the contents of the container. */ + FT_BASE( void ) + ft_pic_container_destroy( FT_Library library ); + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + +FT_END_HEADER + +#endif /* __FTPIC_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftrfork.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftrfork.h new file mode 100644 index 0000000..aa573c8 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftrfork.h @@ -0,0 +1,196 @@ +/***************************************************************************/ +/* */ +/* ftrfork.h */ +/* */ +/* Embedded resource forks accessor (specification). */ +/* */ +/* Copyright 2004, 2006, 2007 by */ +/* Masatake YAMATO and Redhat K.K. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* Development of the code in this file is support of */ +/* Information-technology Promotion Agency, Japan. */ +/***************************************************************************/ + + +#ifndef __FTRFORK_H__ +#define __FTRFORK_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + + /* Number of guessing rules supported in `FT_Raccess_Guess'. */ + /* Don't forget to increment the number if you add a new guessing rule. */ +#define FT_RACCESS_N_RULES 9 + + + /* A structure to describe a reference in a resource by its resource ID */ + /* and internal offset. The `POST' resource expects to be concatenated */ + /* by the order of resource IDs instead of its appearance in the file. */ + + typedef struct FT_RFork_Ref_ + { + FT_UShort res_id; + FT_ULong offset; + + } FT_RFork_Ref; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Guess */ + /* */ + /* <Description> */ + /* Guess a file name and offset where the actual resource fork is */ + /* stored. The macro FT_RACCESS_N_RULES holds the number of */ + /* guessing rules; the guessed result for the Nth rule is */ + /* represented as a triplet: a new file name (new_names[N]), a file */ + /* offset (offsets[N]), and an error code (errors[N]). */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* base_name :: */ + /* The (base) file name of the resource fork used for some */ + /* guessing rules. */ + /* */ + /* <Output> */ + /* new_names :: */ + /* An array of guessed file names in which the resource forks may */ + /* exist. If `new_names[N]' is NULL, the guessed file name is */ + /* equal to `base_name'. */ + /* */ + /* offsets :: */ + /* An array of guessed file offsets. `offsets[N]' holds the file */ + /* offset of the possible start of the resource fork in file */ + /* `new_names[N]'. */ + /* */ + /* errors :: */ + /* An array of FreeType error codes. `errors[N]' is the error */ + /* code of Nth guessing rule function. If `errors[N]' is not */ + /* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */ + /* */ + FT_BASE( void ) + FT_Raccess_Guess( FT_Library library, + FT_Stream stream, + char* base_name, + char** new_names, + FT_Long* offsets, + FT_Error* errors ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Get_HeaderInfo */ + /* */ + /* <Description> */ + /* Get the information from the header of resource fork. The */ + /* information includes the file offset where the resource map */ + /* starts, and the file offset where the resource data starts. */ + /* `FT_Raccess_Get_DataOffsets' requires these two data. */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* rfork_offset :: */ + /* The file offset where the resource fork starts. */ + /* */ + /* <Output> */ + /* map_offset :: */ + /* The file offset where the resource map starts. */ + /* */ + /* rdata_pos :: */ + /* The file offset where the resource data starts. */ + /* */ + /* <Return> */ + /* FreeType error code. FT_Err_Ok means success. */ + /* */ + FT_BASE( FT_Error ) + FT_Raccess_Get_HeaderInfo( FT_Library library, + FT_Stream stream, + FT_Long rfork_offset, + FT_Long *map_offset, + FT_Long *rdata_pos ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Raccess_Get_DataOffsets */ + /* */ + /* <Description> */ + /* Get the data offsets for a tag in a resource fork. Offsets are */ + /* stored in an array because, in some cases, resources in a resource */ + /* fork have the same tag. */ + /* */ + /* <Input> */ + /* library :: */ + /* A FreeType library instance. */ + /* */ + /* stream :: */ + /* A file stream containing the resource fork. */ + /* */ + /* map_offset :: */ + /* The file offset where the resource map starts. */ + /* */ + /* rdata_pos :: */ + /* The file offset where the resource data starts. */ + /* */ + /* tag :: */ + /* The resource tag. */ + /* */ + /* <Output> */ + /* offsets :: */ + /* The stream offsets for the resource data specified by `tag'. */ + /* This array is allocated by the function, so you have to call */ + /* @ft_mem_free after use. */ + /* */ + /* count :: */ + /* The length of offsets array. */ + /* */ + /* <Return> */ + /* FreeType error code. FT_Err_Ok means success. */ + /* */ + /* <Note> */ + /* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */ + /* value for `map_offset' and `rdata_pos'. */ + /* */ + FT_BASE( FT_Error ) + FT_Raccess_Get_DataOffsets( FT_Library library, + FT_Stream stream, + FT_Long map_offset, + FT_Long rdata_pos, + FT_Long tag, + FT_Long **offsets, + FT_Long *count ); + + +FT_END_HEADER + +#endif /* __FTRFORK_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftserv.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftserv.h new file mode 100644 index 0000000..569b9f7 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftserv.h @@ -0,0 +1,620 @@ +/***************************************************************************/ +/* */ +/* ftserv.h */ +/* */ +/* The FreeType services (specification only). */ +/* */ +/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + /*************************************************************************/ + /* */ + /* Each module can export one or more `services'. Each service is */ + /* identified by a constant string and modeled by a pointer; the latter */ + /* generally corresponds to a structure containing function pointers. */ + /* */ + /* Note that a service's data cannot be a mere function pointer because */ + /* in C it is possible that function pointers might be implemented */ + /* differently than data pointers (e.g. 48 bits instead of 32). */ + /* */ + /*************************************************************************/ + + +#ifndef __FTSERV_H__ +#define __FTSERV_H__ + + +FT_BEGIN_HEADER + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + + /* we disable the warning `conditional expression is constant' here */ + /* in order to compile cleanly with the maximum level of warnings */ +#pragma warning( disable : 4127 ) + +#endif /* _MSC_VER */ + + /* + * @macro: + * FT_FACE_FIND_SERVICE + * + * @description: + * This macro is used to look up a service from a face's driver module. + * + * @input: + * face :: + * The source face handle. + * + * id :: + * A string describing the service as defined in the service's + * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to + * `multi-masters'). It is automatically prefixed with + * `FT_SERVICE_ID_'. + * + * @output: + * ptr :: + * A variable that receives the service pointer. Will be NULL + * if not found. + */ +#ifdef __cplusplus + +#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_ = NULL; \ + FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ + \ + \ + if ( module->clazz->get_interface ) \ + _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ + *_pptr_ = _tmp_; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_ = NULL; \ + \ + if ( module->clazz->get_interface ) \ + _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ + ptr = _tmp_; \ + FT_END_STMNT + +#endif /* !C++ */ + + /* + * @macro: + * FT_FACE_FIND_GLOBAL_SERVICE + * + * @description: + * This macro is used to look up a service from all modules. + * + * @input: + * face :: + * The source face handle. + * + * id :: + * A string describing the service as defined in the service's + * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to + * `multi-masters'). It is automatically prefixed with + * `FT_SERVICE_ID_'. + * + * @output: + * ptr :: + * A variable that receives the service pointer. Will be NULL + * if not found. + */ +#ifdef __cplusplus + +#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_; \ + FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ + \ + \ + _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ + *_pptr_ = _tmp_; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ + FT_Pointer _tmp_; \ + \ + \ + _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ + ptr = _tmp_; \ + FT_END_STMNT + +#endif /* !C++ */ + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S E R V I C E D E S C R I P T O R S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * The following structure is used to _describe_ a given service + * to the library. This is useful to build simple static service lists. + */ + typedef struct FT_ServiceDescRec_ + { + const char* serv_id; /* service name */ + const void* serv_data; /* service pointer/data */ + + } FT_ServiceDescRec; + + typedef const FT_ServiceDescRec* FT_ServiceDesc; + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */ + /* */ + /* <Description> */ + /* Used to initialize an array of FT_ServiceDescRec structs. */ + /* */ + /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ + /* to called with a pointer where the allocated array is returned. */ + /* And when it is no longer needed a Destroy function needs */ + /* to be called to release that allocation. */ + /* */ + /* These functions should be manyally called from the pic_init and */ + /* pic_free functions of your module (see FT_DEFINE_MODULE) */ + /* */ + /* When FT_CONFIG_OPTION_PIC is not defined the array will be */ + /* allocated in the global scope (or the scope where the macro */ + /* is used). */ + /* */ +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {serv_id_5, serv_data_5}, \ + {NULL, NULL} \ + }; +#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6) \ + static const FT_ServiceDescRec class_[] = \ + { \ + {serv_id_1, serv_data_1}, \ + {serv_id_2, serv_data_2}, \ + {serv_id_3, serv_data_3}, \ + {serv_id_4, serv_data_4}, \ + {serv_id_5, serv_data_5}, \ + {serv_id_6, serv_data_6}, \ + {NULL, NULL} \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*2 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = NULL; \ + clazz[1].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*3 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = NULL; \ + clazz[2].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*4 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = NULL; \ + clazz[3].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*5 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = NULL; \ + clazz[4].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, \ + serv_data_4, serv_id_5, serv_data_5) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*6 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = NULL; \ + clazz[5].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6) \ + void \ + FT_Destroy_Class_##class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_##class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + if ( FT_ALLOC( clazz, sizeof(*clazz)*7 ) ) \ + return error; \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = NULL; \ + clazz[6].serv_data = NULL; \ + *output_class = clazz; \ + return FT_Err_Ok; \ + } +#endif /* FT_CONFIG_OPTION_PIC */ + + /* + * Parse a list of FT_ServiceDescRec descriptors and look for + * a specific service by ID. Note that the last element in the + * array must be { NULL, NULL }, and that the function should + * return NULL if the service isn't available. + * + * This function can be used by modules to implement their + * `get_service' method. + */ + FT_BASE( FT_Pointer ) + ft_service_list_lookup( FT_ServiceDesc service_descriptors, + const char* service_id ); + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S E R V I C E S C A C H E *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * This structure is used to store a cache for several frequently used + * services. It is the type of `face->internal->services'. You + * should only use FT_FACE_LOOKUP_SERVICE to access it. + * + * All fields should have the type FT_Pointer to relax compilation + * dependencies. We assume the developer isn't completely stupid. + * + * Each field must be named `service_XXXX' where `XXX' corresponds to + * the correct FT_SERVICE_ID_XXXX macro. See the definition of + * FT_FACE_LOOKUP_SERVICE below how this is implemented. + * + */ + typedef struct FT_ServiceCacheRec_ + { + FT_Pointer service_POSTSCRIPT_FONT_NAME; + FT_Pointer service_MULTI_MASTERS; + FT_Pointer service_GLYPH_DICT; + FT_Pointer service_PFR_METRICS; + FT_Pointer service_WINFNT; + + } FT_ServiceCacheRec, *FT_ServiceCache; + + + /* + * A magic number used within the services cache. + */ +#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */ + + + /* + * @macro: + * FT_FACE_LOOKUP_SERVICE + * + * @description: + * This macro is used to lookup a service from a face's driver module + * using its cache. + * + * @input: + * face:: + * The source face handle containing the cache. + * + * field :: + * The field name in the cache. + * + * id :: + * The service ID. + * + * @output: + * ptr :: + * A variable receiving the service data. NULL if not available. + */ +#ifdef __cplusplus + +#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Pointer svc; \ + FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \ + \ + \ + svc = FT_FACE( face )->internal->services. service_ ## id; \ + if ( svc == FT_SERVICE_UNAVAILABLE ) \ + svc = NULL; \ + else if ( svc == NULL ) \ + { \ + FT_FACE_FIND_SERVICE( face, svc, id ); \ + \ + FT_FACE( face )->internal->services. service_ ## id = \ + (FT_Pointer)( svc != NULL ? svc \ + : FT_SERVICE_UNAVAILABLE ); \ + } \ + *Pptr = svc; \ + FT_END_STMNT + +#else /* !C++ */ + +#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ + FT_BEGIN_STMNT \ + FT_Pointer svc; \ + \ + \ + svc = FT_FACE( face )->internal->services. service_ ## id; \ + if ( svc == FT_SERVICE_UNAVAILABLE ) \ + svc = NULL; \ + else if ( svc == NULL ) \ + { \ + FT_FACE_FIND_SERVICE( face, svc, id ); \ + \ + FT_FACE( face )->internal->services. service_ ## id = \ + (FT_Pointer)( svc != NULL ? svc \ + : FT_SERVICE_UNAVAILABLE ); \ + } \ + ptr = svc; \ + FT_END_STMNT + +#endif /* !C++ */ + + /* + * A macro used to define new service structure types. + */ + +#define FT_DEFINE_SERVICE( name ) \ + typedef struct FT_Service_ ## name ## Rec_ \ + FT_Service_ ## name ## Rec ; \ + typedef struct FT_Service_ ## name ## Rec_ \ + const * FT_Service_ ## name ; \ + struct FT_Service_ ## name ## Rec_ + + /* */ + + /* + * The header files containing the services. + */ + +#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> +#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h> +#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> +#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h> +#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h> +#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> +#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h> +#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h> +#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h> +#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h> +#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> +#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> +#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h> +#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h> +#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h> +#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h> +#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h> + + /* */ + +FT_END_HEADER + +#endif /* __FTSERV_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftstream.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftstream.h new file mode 100644 index 0000000..8b18500 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftstream.h @@ -0,0 +1,539 @@ +/***************************************************************************/ +/* */ +/* ftstream.h */ +/* */ +/* Stream handling (specification). */ +/* */ +/* Copyright 1996-2002, 2004-2006, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTSTREAM_H__ +#define __FTSTREAM_H__ + + +#include <ft2build.h> +#include FT_SYSTEM_H +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + + /* format of an 8-bit frame_op value: */ + /* */ + /* bit 76543210 */ + /* xxxxxxes */ + /* */ + /* s is set to 1 if the value is signed. */ + /* e is set to 1 if the value is little-endian. */ + /* xxx is a command. */ + +#define FT_FRAME_OP_SHIFT 2 +#define FT_FRAME_OP_SIGNED 1 +#define FT_FRAME_OP_LITTLE 2 +#define FT_FRAME_OP_COMMAND( x ) ( x >> FT_FRAME_OP_SHIFT ) + +#define FT_MAKE_FRAME_OP( command, little, sign ) \ + ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign ) + +#define FT_FRAME_OP_END 0 +#define FT_FRAME_OP_START 1 /* start a new frame */ +#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */ +#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */ +#define FT_FRAME_OP_LONG 4 /* read 4-byte value */ +#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */ +#define FT_FRAME_OP_BYTES 6 /* read a bytes sequence */ + + + typedef enum FT_Frame_Op_ + { + ft_frame_end = 0, + ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ), + + ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ), + ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ), + + ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ), + ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ), + ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ), + ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ), + + ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ), + ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ), + ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ), + ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ), + + ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ), + ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ), + ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ), + ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ), + + ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ), + ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 ) + + } FT_Frame_Op; + + + typedef struct FT_Frame_Field_ + { + FT_Byte value; + FT_Byte size; + FT_UShort offset; + + } FT_Frame_Field; + + + /* Construct an FT_Frame_Field out of a structure type and a field name. */ + /* The structure type must be set in the FT_STRUCTURE macro before */ + /* calling the FT_FRAME_START() macro. */ + /* */ +#define FT_FIELD_SIZE( f ) \ + (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f ) + +#define FT_FIELD_SIZE_DELTA( f ) \ + (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] ) + +#define FT_FIELD_OFFSET( f ) \ + (FT_UShort)( offsetof( FT_STRUCTURE, f ) ) + +#define FT_FRAME_FIELD( frame_op, field ) \ + { \ + frame_op, \ + FT_FIELD_SIZE( field ), \ + FT_FIELD_OFFSET( field ) \ + } + +#define FT_MAKE_EMPTY_FIELD( frame_op ) { frame_op, 0, 0 } + +#define FT_FRAME_START( size ) { ft_frame_start, 0, size } +#define FT_FRAME_END { ft_frame_end, 0, 0 } + +#define FT_FRAME_LONG( f ) FT_FRAME_FIELD( ft_frame_long_be, f ) +#define FT_FRAME_ULONG( f ) FT_FRAME_FIELD( ft_frame_ulong_be, f ) +#define FT_FRAME_SHORT( f ) FT_FRAME_FIELD( ft_frame_short_be, f ) +#define FT_FRAME_USHORT( f ) FT_FRAME_FIELD( ft_frame_ushort_be, f ) +#define FT_FRAME_OFF3( f ) FT_FRAME_FIELD( ft_frame_off3_be, f ) +#define FT_FRAME_UOFF3( f ) FT_FRAME_FIELD( ft_frame_uoff3_be, f ) +#define FT_FRAME_BYTE( f ) FT_FRAME_FIELD( ft_frame_byte, f ) +#define FT_FRAME_CHAR( f ) FT_FRAME_FIELD( ft_frame_schar, f ) + +#define FT_FRAME_LONG_LE( f ) FT_FRAME_FIELD( ft_frame_long_le, f ) +#define FT_FRAME_ULONG_LE( f ) FT_FRAME_FIELD( ft_frame_ulong_le, f ) +#define FT_FRAME_SHORT_LE( f ) FT_FRAME_FIELD( ft_frame_short_le, f ) +#define FT_FRAME_USHORT_LE( f ) FT_FRAME_FIELD( ft_frame_ushort_le, f ) +#define FT_FRAME_OFF3_LE( f ) FT_FRAME_FIELD( ft_frame_off3_le, f ) +#define FT_FRAME_UOFF3_LE( f ) FT_FRAME_FIELD( ft_frame_uoff3_le, f ) + +#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 } +#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 } +#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 } + +#define FT_FRAME_BYTES( field, count ) \ + { \ + ft_frame_bytes, \ + count, \ + FT_FIELD_OFFSET( field ) \ + } + +#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 } + + + /*************************************************************************/ + /* */ + /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */ + /* type `char*' or equivalent (1-byte elements). */ + /* */ + +#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] ) +#define FT_INT8_( p, i ) ( ((const FT_Char*)(p))[(i)] ) + +#define FT_INT16( x ) ( (FT_Int16)(x) ) +#define FT_UINT16( x ) ( (FT_UInt16)(x) ) +#define FT_INT32( x ) ( (FT_Int32)(x) ) +#define FT_UINT32( x ) ( (FT_UInt32)(x) ) + +#define FT_BYTE_I16( p, i, s ) ( FT_INT16( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_I32( p, i, s ) ( FT_INT32( FT_BYTE_( p, i ) ) << (s) ) +#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) ) + +#define FT_INT8_I16( p, i, s ) ( FT_INT16( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_U16( p, i, s ) ( FT_UINT16( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_I32( p, i, s ) ( FT_INT32( FT_INT8_( p, i ) ) << (s) ) +#define FT_INT8_U32( p, i, s ) ( FT_UINT32( FT_INT8_( p, i ) ) << (s) ) + + +#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16( p, 0, 8) | \ + FT_BYTE_I16( p, 1, 0) ) + +#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \ + FT_BYTE_U16( p, 1, 0 ) ) + +#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32( p, 0, 24 ) | \ + FT_BYTE_I32( p, 1, 16 ) | \ + FT_BYTE_I32( p, 2, 8 ) | \ + FT_BYTE_I32( p, 3, 0 ) ) + +#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \ + FT_BYTE_U32( p, 1, 16 ) | \ + FT_BYTE_U32( p, 2, 8 ) | \ + FT_BYTE_U32( p, 3, 0 ) ) + +#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32( p, 0, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 2, 0 ) ) + +#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 2, 0 ) ) + +#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16( p, 1, 8 ) | \ + FT_BYTE_I16( p, 0, 0 ) ) + +#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \ + FT_BYTE_U16( p, 0, 0 ) ) + +#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32( p, 3, 24 ) | \ + FT_BYTE_I32( p, 2, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 0, 0 ) ) + +#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \ + FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) + +#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32( p, 2, 16 ) | \ + FT_BYTE_I32( p, 1, 8 ) | \ + FT_BYTE_I32( p, 0, 0 ) ) + +#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) + + +#define FT_NEXT_CHAR( buffer ) \ + ( (signed char)*buffer++ ) + +#define FT_NEXT_BYTE( buffer ) \ + ( (unsigned char)*buffer++ ) + +#define FT_NEXT_SHORT( buffer ) \ + ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) ) + +#define FT_NEXT_USHORT( buffer ) \ + ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) ) + +#define FT_NEXT_OFF3( buffer ) \ + ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) ) + +#define FT_NEXT_UOFF3( buffer ) \ + ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) ) + +#define FT_NEXT_LONG( buffer ) \ + ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) ) + +#define FT_NEXT_ULONG( buffer ) \ + ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) ) + + +#define FT_NEXT_SHORT_LE( buffer ) \ + ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) ) + +#define FT_NEXT_USHORT_LE( buffer ) \ + ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) ) + +#define FT_NEXT_OFF3_LE( buffer ) \ + ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) ) + +#define FT_NEXT_UOFF3_LE( buffer ) \ + ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) ) + +#define FT_NEXT_LONG_LE( buffer ) \ + ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) ) + +#define FT_NEXT_ULONG_LE( buffer ) \ + ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) ) + + + /*************************************************************************/ + /* */ + /* Each GET_xxxx() macro uses an implicit `stream' variable. */ + /* */ +#if 0 +#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor ) + +#define FT_GET_CHAR() FT_GET_MACRO( CHAR ) +#define FT_GET_BYTE() FT_GET_MACRO( BYTE ) +#define FT_GET_SHORT() FT_GET_MACRO( SHORT ) +#define FT_GET_USHORT() FT_GET_MACRO( USHORT ) +#define FT_GET_OFF3() FT_GET_MACRO( OFF3 ) +#define FT_GET_UOFF3() FT_GET_MACRO( UOFF3 ) +#define FT_GET_LONG() FT_GET_MACRO( LONG ) +#define FT_GET_ULONG() FT_GET_MACRO( ULONG ) +#define FT_GET_TAG4() FT_GET_MACRO( ULONG ) + +#define FT_GET_SHORT_LE() FT_GET_MACRO( SHORT_LE ) +#define FT_GET_USHORT_LE() FT_GET_MACRO( USHORT_LE ) +#define FT_GET_LONG_LE() FT_GET_MACRO( LONG_LE ) +#define FT_GET_ULONG_LE() FT_GET_MACRO( ULONG_LE ) + +#else +#define FT_GET_MACRO( func, type ) ( (type)func( stream ) ) + +#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char ) +#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte ) +#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short ) +#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort ) +#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long ) +#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong ) +#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long ) +#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) +#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) + +#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short ) +#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort ) +#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long ) +#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong ) +#endif + +#define FT_READ_MACRO( func, type, var ) \ + ( var = (type)func( stream, &error ), \ + error != FT_Err_Ok ) + +#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var ) +#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var ) +#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var ) +#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var ) +#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var ) +#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var ) +#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var ) +#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var ) + +#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var ) +#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var ) +#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var ) +#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var ) + + +#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM + + /* initialize a stream for reading a regular system stream */ + FT_BASE( FT_Error ) + FT_Stream_Open( FT_Stream stream, + const char* filepathname ); + +#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ + + + /* create a new (input) stream from an FT_Open_Args structure */ + FT_BASE( FT_Error ) + FT_Stream_New( FT_Library library, + const FT_Open_Args* args, + FT_Stream *astream ); + + /* free a stream */ + FT_BASE( void ) + FT_Stream_Free( FT_Stream stream, + FT_Int external ); + + /* initialize a stream for reading in-memory data */ + FT_BASE( void ) + FT_Stream_OpenMemory( FT_Stream stream, + const FT_Byte* base, + FT_ULong size ); + + /* close a stream (does not destroy the stream structure) */ + FT_BASE( void ) + FT_Stream_Close( FT_Stream stream ); + + + /* seek within a stream. position is relative to start of stream */ + FT_BASE( FT_Error ) + FT_Stream_Seek( FT_Stream stream, + FT_ULong pos ); + + /* skip bytes in a stream */ + FT_BASE( FT_Error ) + FT_Stream_Skip( FT_Stream stream, + FT_Long distance ); + + /* return current stream position */ + FT_BASE( FT_Long ) + FT_Stream_Pos( FT_Stream stream ); + + /* read bytes from a stream into a user-allocated buffer, returns an */ + /* error if not all bytes could be read. */ + FT_BASE( FT_Error ) + FT_Stream_Read( FT_Stream stream, + FT_Byte* buffer, + FT_ULong count ); + + /* read bytes from a stream at a given position */ + FT_BASE( FT_Error ) + FT_Stream_ReadAt( FT_Stream stream, + FT_ULong pos, + FT_Byte* buffer, + FT_ULong count ); + + /* try to read bytes at the end of a stream; return number of bytes */ + /* really available */ + FT_BASE( FT_ULong ) + FT_Stream_TryRead( FT_Stream stream, + FT_Byte* buffer, + FT_ULong count ); + + /* Enter a frame of `count' consecutive bytes in a stream. Returns an */ + /* error if the frame could not be read/accessed. The caller can use */ + /* the FT_Stream_Get_XXX functions to retrieve frame data without */ + /* error checks. */ + /* */ + /* You must _always_ call FT_Stream_ExitFrame() once you have entered */ + /* a stream frame! */ + /* */ + FT_BASE( FT_Error ) + FT_Stream_EnterFrame( FT_Stream stream, + FT_ULong count ); + + /* exit a stream frame */ + FT_BASE( void ) + FT_Stream_ExitFrame( FT_Stream stream ); + + /* Extract a stream frame. If the stream is disk-based, a heap block */ + /* is allocated and the frame bytes are read into it. If the stream */ + /* is memory-based, this function simply set a pointer to the data. */ + /* */ + /* Useful to optimize access to memory-based streams transparently. */ + /* */ + /* All extracted frames must be `freed' with a call to the function */ + /* FT_Stream_ReleaseFrame(). */ + /* */ + FT_BASE( FT_Error ) + FT_Stream_ExtractFrame( FT_Stream stream, + FT_ULong count, + FT_Byte** pbytes ); + + /* release an extract frame (see FT_Stream_ExtractFrame) */ + FT_BASE( void ) + FT_Stream_ReleaseFrame( FT_Stream stream, + FT_Byte** pbytes ); + + /* read a byte from an entered frame */ + FT_BASE( FT_Char ) + FT_Stream_GetChar( FT_Stream stream ); + + /* read a 16-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_UShort ) + FT_Stream_GetUShort( FT_Stream stream ); + + /* read a 24-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetUOffset( FT_Stream stream ); + + /* read a 32-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetULong( FT_Stream stream ); + + /* read a 16-bit little-endian unsigned integer from an entered frame */ + FT_BASE( FT_UShort ) + FT_Stream_GetUShortLE( FT_Stream stream ); + + /* read a 32-bit little-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetULongLE( FT_Stream stream ); + + + /* read a byte from a stream */ + FT_BASE( FT_Char ) + FT_Stream_ReadChar( FT_Stream stream, + FT_Error* error ); + + /* read a 16-bit big-endian unsigned integer from a stream */ + FT_BASE( FT_UShort ) + FT_Stream_ReadUShort( FT_Stream stream, + FT_Error* error ); + + /* read a 24-bit big-endian unsigned integer from a stream */ + FT_BASE( FT_ULong ) + FT_Stream_ReadUOffset( FT_Stream stream, + FT_Error* error ); + + /* read a 32-bit big-endian integer from a stream */ + FT_BASE( FT_ULong ) + FT_Stream_ReadULong( FT_Stream stream, + FT_Error* error ); + + /* read a 16-bit little-endian unsigned integer from a stream */ + FT_BASE( FT_UShort ) + FT_Stream_ReadUShortLE( FT_Stream stream, + FT_Error* error ); + + /* read a 32-bit little-endian unsigned integer from a stream */ + FT_BASE( FT_ULong ) + FT_Stream_ReadULongLE( FT_Stream stream, + FT_Error* error ); + + /* Read a structure from a stream. The structure must be described */ + /* by an array of FT_Frame_Field records. */ + FT_BASE( FT_Error ) + FT_Stream_ReadFields( FT_Stream stream, + const FT_Frame_Field* fields, + void* structure ); + + +#define FT_STREAM_POS() \ + FT_Stream_Pos( stream ) + +#define FT_STREAM_SEEK( position ) \ + FT_SET_ERROR( FT_Stream_Seek( stream, position ) ) + +#define FT_STREAM_SKIP( distance ) \ + FT_SET_ERROR( FT_Stream_Skip( stream, distance ) ) + +#define FT_STREAM_READ( buffer, count ) \ + FT_SET_ERROR( FT_Stream_Read( stream, \ + (FT_Byte*)buffer, \ + count ) ) + +#define FT_STREAM_READ_AT( position, buffer, count ) \ + FT_SET_ERROR( FT_Stream_ReadAt( stream, \ + position, \ + (FT_Byte*)buffer, \ + count ) ) + +#define FT_STREAM_READ_FIELDS( fields, object ) \ + FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) ) + + +#define FT_FRAME_ENTER( size ) \ + FT_SET_ERROR( \ + FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, size ) ) ) + +#define FT_FRAME_EXIT() \ + FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) ) + +#define FT_FRAME_EXTRACT( size, bytes ) \ + FT_SET_ERROR( \ + FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, size, \ + (FT_Byte**)&(bytes) ) ) ) + +#define FT_FRAME_RELEASE( bytes ) \ + FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream, \ + (FT_Byte**)&(bytes) ) ) + + +FT_END_HEADER + +#endif /* __FTSTREAM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/fttrace.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/fttrace.h new file mode 100644 index 0000000..fbefdbd --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/fttrace.h @@ -0,0 +1,144 @@ +/***************************************************************************/ +/* */ +/* fttrace.h */ +/* */ +/* Tracing handling (specification only). */ +/* */ +/* Copyright 2002, 2004-2007, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /* definitions of trace levels for FreeType 2 */ + + /* the first level must always be `trace_any' */ +FT_TRACE_DEF( any ) + + /* base components */ +FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */ +FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */ +FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */ +FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */ +FT_TRACE_DEF( list ) /* list management (ftlist.c) */ +FT_TRACE_DEF( init ) /* initialization (ftinit.c) */ +FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */ +FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */ +FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */ +FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */ + +FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */ +FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */ +FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */ +FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */ +FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */ + + /* Cache sub-system */ +FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */ + + /* SFNT driver components */ +FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */ +FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */ +FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */ +FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */ +FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */ +FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */ +FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */ +FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */ +FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */ + + /* TrueType driver components */ +FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */ +FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */ +FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */ +FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */ +FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */ +FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */ + + /* Type 1 driver components */ +FT_TRACE_DEF( t1afm ) +FT_TRACE_DEF( t1driver ) +FT_TRACE_DEF( t1gload ) +FT_TRACE_DEF( t1hint ) +FT_TRACE_DEF( t1load ) +FT_TRACE_DEF( t1objs ) +FT_TRACE_DEF( t1parse ) + + /* PostScript helper module `psaux' */ +FT_TRACE_DEF( t1decode ) +FT_TRACE_DEF( psobjs ) + + /* PostScript hinting module `pshinter' */ +FT_TRACE_DEF( pshrec ) +FT_TRACE_DEF( pshalgo1 ) +FT_TRACE_DEF( pshalgo2 ) + + /* Type 2 driver components */ +FT_TRACE_DEF( cffdriver ) +FT_TRACE_DEF( cffgload ) +FT_TRACE_DEF( cffload ) +FT_TRACE_DEF( cffobjs ) +FT_TRACE_DEF( cffparse ) + + /* Type 42 driver component */ +FT_TRACE_DEF( t42 ) + + /* CID driver components */ +FT_TRACE_DEF( cidafm ) +FT_TRACE_DEF( ciddriver ) +FT_TRACE_DEF( cidgload ) +FT_TRACE_DEF( cidload ) +FT_TRACE_DEF( cidobjs ) +FT_TRACE_DEF( cidparse ) + + /* Windows font component */ +FT_TRACE_DEF( winfnt ) + + /* PCF font components */ +FT_TRACE_DEF( pcfdriver ) +FT_TRACE_DEF( pcfread ) + + /* BDF font components */ +FT_TRACE_DEF( bdfdriver ) +FT_TRACE_DEF( bdflib ) + + /* PFR font component */ +FT_TRACE_DEF( pfr ) + + /* OpenType validation components */ +FT_TRACE_DEF( otvmodule ) +FT_TRACE_DEF( otvcommon ) +FT_TRACE_DEF( otvbase ) +FT_TRACE_DEF( otvgdef ) +FT_TRACE_DEF( otvgpos ) +FT_TRACE_DEF( otvgsub ) +FT_TRACE_DEF( otvjstf ) +FT_TRACE_DEF( otvmath ) + + /* TrueTypeGX/AAT validation components */ +FT_TRACE_DEF( gxvmodule ) +FT_TRACE_DEF( gxvcommon ) +FT_TRACE_DEF( gxvfeat ) +FT_TRACE_DEF( gxvmort ) +FT_TRACE_DEF( gxvmorx ) +FT_TRACE_DEF( gxvbsln ) +FT_TRACE_DEF( gxvjust ) +FT_TRACE_DEF( gxvkern ) +FT_TRACE_DEF( gxvopbd ) +FT_TRACE_DEF( gxvtrak ) +FT_TRACE_DEF( gxvprop ) +FT_TRACE_DEF( gxvlcar ) + + /* autofit components */ +FT_TRACE_DEF( afcjk ) +FT_TRACE_DEF( aflatin ) +FT_TRACE_DEF( aflatin2 ) +FT_TRACE_DEF( afwarp ) + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftvalid.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftvalid.h new file mode 100644 index 0000000..00cd85e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/ftvalid.h @@ -0,0 +1,150 @@ +/***************************************************************************/ +/* */ +/* ftvalid.h */ +/* */ +/* FreeType validation support (specification). */ +/* */ +/* Copyright 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTVALID_H__ +#define __FTVALID_H__ + +#include <ft2build.h> +#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */ + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** ****/ + /**** V A L I D A T I O N ****/ + /**** ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* handle to a validation object */ + typedef struct FT_ValidatorRec_ volatile* FT_Validator; + + + /*************************************************************************/ + /* */ + /* There are three distinct validation levels defined here: */ + /* */ + /* FT_VALIDATE_DEFAULT :: */ + /* A table that passes this validation level can be used reliably by */ + /* FreeType. It generally means that all offsets have been checked to */ + /* prevent out-of-bound reads, that array counts are correct, etc. */ + /* */ + /* FT_VALIDATE_TIGHT :: */ + /* A table that passes this validation level can be used reliably and */ + /* doesn't contain invalid data. For example, a charmap table that */ + /* returns invalid glyph indices will not pass, even though it can */ + /* be used with FreeType in default mode (the library will simply */ + /* return an error later when trying to load the glyph). */ + /* */ + /* It also checks that fields which must be a multiple of 2, 4, or 8, */ + /* don't have incorrect values, etc. */ + /* */ + /* FT_VALIDATE_PARANOID :: */ + /* Only for font debugging. Checks that a table follows the */ + /* specification by 100%. Very few fonts will be able to pass this */ + /* level anyway but it can be useful for certain tools like font */ + /* editors/converters. */ + /* */ + typedef enum FT_ValidationLevel_ + { + FT_VALIDATE_DEFAULT = 0, + FT_VALIDATE_TIGHT, + FT_VALIDATE_PARANOID + + } FT_ValidationLevel; + + + /* validator structure */ + typedef struct FT_ValidatorRec_ + { + const FT_Byte* base; /* address of table in memory */ + const FT_Byte* limit; /* `base' + sizeof(table) in memory */ + FT_ValidationLevel level; /* validation level */ + FT_Error error; /* error returned. 0 means success */ + + ft_jmp_buf jump_buffer; /* used for exception handling */ + + } FT_ValidatorRec; + + +#define FT_VALIDATOR( x ) ((FT_Validator)( x )) + + + FT_BASE( void ) + ft_validator_init( FT_Validator valid, + const FT_Byte* base, + const FT_Byte* limit, + FT_ValidationLevel level ); + + /* Do not use this. It's broken and will cause your validator to crash */ + /* if you run it on an invalid font. */ + FT_BASE( FT_Int ) + ft_validator_run( FT_Validator valid ); + + /* Sets the error field in a validator, then calls `longjmp' to return */ + /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */ + /* error checks within the validation routines. */ + /* */ + FT_BASE( void ) + ft_validator_error( FT_Validator valid, + FT_Error error ); + + + /* Calls ft_validate_error. Assumes that the `valid' local variable */ + /* holds a pointer to the current validator object. */ + /* */ + /* Use preprocessor prescan to pass FT_ERR_PREFIX. */ + /* */ +#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error ) +#define FT_INVALID_( _prefix, _error ) \ + ft_validator_error( valid, _prefix ## _error ) + + /* called when a broken table is detected */ +#define FT_INVALID_TOO_SHORT \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + /* called when an invalid offset is detected */ +#define FT_INVALID_OFFSET \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Offset ) + + /* called when an invalid format/value is detected */ +#define FT_INVALID_FORMAT \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + /* called when an invalid glyph index is detected */ +#define FT_INVALID_GLYPH_ID \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index ) + + /* called when an invalid field value is detected */ +#define FT_INVALID_DATA \ + FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + + +FT_END_HEADER + +#endif /* __FTVALID_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/internal.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/internal.h new file mode 100644 index 0000000..f500a65 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/internal.h @@ -0,0 +1,51 @@ +/***************************************************************************/ +/* */ +/* internal.h */ +/* */ +/* Internal header files (specification only). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is automatically included by `ft2build.h'. */ + /* Do not include it manually! */ + /* */ + /*************************************************************************/ + + +#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> +#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h> +#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> +#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> +#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> +#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h> +#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h> +#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h> +#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> +#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h> +#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h> +#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h> +#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h> + +#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h> +#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h> + +#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h> +#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h> +#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h> + +#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h> + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/psaux.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/psaux.h new file mode 100644 index 0000000..a96e0df --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/psaux.h @@ -0,0 +1,873 @@ +/***************************************************************************/ +/* */ +/* psaux.h */ +/* */ +/* Auxiliary functions and data structures related to PostScript fonts */ +/* (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __PSAUX_H__ +#define __PSAUX_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_TYPE1_TYPES_H +#include FT_SERVICE_POSTSCRIPT_CMAPS_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1_TABLE *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct PS_TableRec_* PS_Table; + typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Table_FuncsRec */ + /* */ + /* <Description> */ + /* A set of function pointers to manage PS_Table objects. */ + /* */ + /* <Fields> */ + /* table_init :: Used to initialize a table. */ + /* */ + /* table_done :: Finalizes resp. destroy a given table. */ + /* */ + /* table_add :: Adds a new object to a table. */ + /* */ + /* table_release :: Releases table data, then finalizes it. */ + /* */ + typedef struct PS_Table_FuncsRec_ + { + FT_Error + (*init)( PS_Table table, + FT_Int count, + FT_Memory memory ); + + void + (*done)( PS_Table table ); + + FT_Error + (*add)( PS_Table table, + FT_Int idx, + void* object, + FT_PtrDist length ); + + void + (*release)( PS_Table table ); + + } PS_Table_FuncsRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_TableRec */ + /* */ + /* <Description> */ + /* A PS_Table is a simple object used to store an array of objects in */ + /* a single memory block. */ + /* */ + /* <Fields> */ + /* block :: The address in memory of the growheap's block. This */ + /* can change between two object adds, due to */ + /* reallocation. */ + /* */ + /* cursor :: The current top of the grow heap within its block. */ + /* */ + /* capacity :: The current size of the heap block. Increments by */ + /* 1kByte chunks. */ + /* */ + /* max_elems :: The maximum number of elements in table. */ + /* */ + /* num_elems :: The current number of elements in table. */ + /* */ + /* elements :: A table of element addresses within the block. */ + /* */ + /* lengths :: A table of element sizes within the block. */ + /* */ + /* memory :: The object used for memory operations */ + /* (alloc/realloc). */ + /* */ + /* funcs :: A table of method pointers for this object. */ + /* */ + typedef struct PS_TableRec_ + { + FT_Byte* block; /* current memory block */ + FT_Offset cursor; /* current cursor in memory block */ + FT_Offset capacity; /* current size of memory block */ + FT_Long init; + + FT_Int max_elems; + FT_Int num_elems; + FT_Byte** elements; /* addresses of table elements */ + FT_PtrDist* lengths; /* lengths of table elements */ + + FT_Memory memory; + PS_Table_FuncsRec funcs; + + } PS_TableRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 FIELDS & TOKENS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PS_ParserRec_* PS_Parser; + + typedef struct T1_TokenRec_* T1_Token; + + typedef struct T1_FieldRec_* T1_Field; + + + /* simple enumeration type used to identify token types */ + typedef enum T1_TokenType_ + { + T1_TOKEN_TYPE_NONE = 0, + T1_TOKEN_TYPE_ANY, + T1_TOKEN_TYPE_STRING, + T1_TOKEN_TYPE_ARRAY, + T1_TOKEN_TYPE_KEY, /* aka `name' */ + + /* do not remove */ + T1_TOKEN_TYPE_MAX + + } T1_TokenType; + + + /* a simple structure used to identify tokens */ + typedef struct T1_TokenRec_ + { + FT_Byte* start; /* first character of token in input stream */ + FT_Byte* limit; /* first character after the token */ + T1_TokenType type; /* type of token */ + + } T1_TokenRec; + + + /* enumeration type used to identify object fields */ + typedef enum T1_FieldType_ + { + T1_FIELD_TYPE_NONE = 0, + T1_FIELD_TYPE_BOOL, + T1_FIELD_TYPE_INTEGER, + T1_FIELD_TYPE_FIXED, + T1_FIELD_TYPE_FIXED_1000, + T1_FIELD_TYPE_STRING, + T1_FIELD_TYPE_KEY, + T1_FIELD_TYPE_BBOX, + T1_FIELD_TYPE_INTEGER_ARRAY, + T1_FIELD_TYPE_FIXED_ARRAY, + T1_FIELD_TYPE_CALLBACK, + + /* do not remove */ + T1_FIELD_TYPE_MAX + + } T1_FieldType; + + + typedef enum T1_FieldLocation_ + { + T1_FIELD_LOCATION_CID_INFO, + T1_FIELD_LOCATION_FONT_DICT, + T1_FIELD_LOCATION_FONT_EXTRA, + T1_FIELD_LOCATION_FONT_INFO, + T1_FIELD_LOCATION_PRIVATE, + T1_FIELD_LOCATION_BBOX, + T1_FIELD_LOCATION_LOADER, + T1_FIELD_LOCATION_FACE, + T1_FIELD_LOCATION_BLEND, + + /* do not remove */ + T1_FIELD_LOCATION_MAX + + } T1_FieldLocation; + + + typedef void + (*T1_Field_ParseFunc)( FT_Face face, + FT_Pointer parser ); + + + /* structure type used to model object fields */ + typedef struct T1_FieldRec_ + { + const char* ident; /* field identifier */ + T1_FieldLocation location; + T1_FieldType type; /* type of field */ + T1_Field_ParseFunc reader; + FT_UInt offset; /* offset of field in object */ + FT_Byte size; /* size of field in bytes */ + FT_UInt array_max; /* maximal number of elements for */ + /* array */ + FT_UInt count_offset; /* offset of element count for */ + /* arrays; must not be zero if in */ + /* use -- in other words, a */ + /* `num_FOO' element must not */ + /* start the used structure if we */ + /* parse a `FOO' array */ + FT_UInt dict; /* where we expect it */ + } T1_FieldRec; + +#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */ +#define T1_FIELD_DICT_PRIVATE ( 1 << 1 ) + + + +#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE( _fname ), \ + 0, 0, \ + _dict \ + }, + +#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \ + { \ + _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \ + (T1_Field_ParseFunc)_reader, \ + 0, 0, \ + 0, 0, \ + _dict \ + }, + +#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE_DELTA( _fname ), \ + _max, \ + FT_FIELD_OFFSET( num_ ## _fname ), \ + _dict \ + }, + +#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \ + { \ + _ident, T1CODE, _type, \ + 0, \ + FT_FIELD_OFFSET( _fname ), \ + FT_FIELD_SIZE_DELTA( _fname ), \ + _max, 0, \ + _dict \ + }, + + +#define T1_FIELD_BOOL( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict ) + +#define T1_FIELD_NUM( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict ) + +#define T1_FIELD_FIXED( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict ) + +#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \ + _dict ) + +#define T1_FIELD_STRING( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict ) + +#define T1_FIELD_KEY( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict ) + +#define T1_FIELD_BBOX( _ident, _fname, _dict ) \ + T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict ) + + +#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \ + T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ + _fname, _fmax, _dict ) + +#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \ + T1_NEW_CALLBACK_FIELD( _ident, _name, _dict ) + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 PARSER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs; + + typedef struct PS_Parser_FuncsRec_ + { + void + (*init)( PS_Parser parser, + FT_Byte* base, + FT_Byte* limit, + FT_Memory memory ); + + void + (*done)( PS_Parser parser ); + + void + (*skip_spaces)( PS_Parser parser ); + void + (*skip_PS_token)( PS_Parser parser ); + + FT_Long + (*to_int)( PS_Parser parser ); + FT_Fixed + (*to_fixed)( PS_Parser parser, + FT_Int power_ten ); + + FT_Error + (*to_bytes)( PS_Parser parser, + FT_Byte* bytes, + FT_Offset max_bytes, + FT_Long* pnum_bytes, + FT_Bool delimiters ); + + FT_Int + (*to_coord_array)( PS_Parser parser, + FT_Int max_coords, + FT_Short* coords ); + FT_Int + (*to_fixed_array)( PS_Parser parser, + FT_Int max_values, + FT_Fixed* values, + FT_Int power_ten ); + + void + (*to_token)( PS_Parser parser, + T1_Token token ); + void + (*to_token_array)( PS_Parser parser, + T1_Token tokens, + FT_UInt max_tokens, + FT_Int* pnum_tokens ); + + FT_Error + (*load_field)( PS_Parser parser, + const T1_Field field, + void** objects, + FT_UInt max_objects, + FT_ULong* pflags ); + + FT_Error + (*load_field_table)( PS_Parser parser, + const T1_Field field, + void** objects, + FT_UInt max_objects, + FT_ULong* pflags ); + + } PS_Parser_FuncsRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_ParserRec */ + /* */ + /* <Description> */ + /* A PS_Parser is an object used to parse a Type 1 font very quickly. */ + /* */ + /* <Fields> */ + /* cursor :: The current position in the text. */ + /* */ + /* base :: Start of the processed text. */ + /* */ + /* limit :: End of the processed text. */ + /* */ + /* error :: The last error returned. */ + /* */ + /* memory :: The object used for memory operations (alloc/realloc). */ + /* */ + /* funcs :: A table of functions for the parser. */ + /* */ + typedef struct PS_ParserRec_ + { + FT_Byte* cursor; + FT_Byte* base; + FT_Byte* limit; + FT_Error error; + FT_Memory memory; + + PS_Parser_FuncsRec funcs; + + } PS_ParserRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 BUILDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct T1_BuilderRec_* T1_Builder; + + + typedef FT_Error + (*T1_Builder_Check_Points_Func)( T1_Builder builder, + FT_Int count ); + + typedef void + (*T1_Builder_Add_Point_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y, + FT_Byte flag ); + + typedef FT_Error + (*T1_Builder_Add_Point1_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y ); + + typedef FT_Error + (*T1_Builder_Add_Contour_Func)( T1_Builder builder ); + + typedef FT_Error + (*T1_Builder_Start_Point_Func)( T1_Builder builder, + FT_Pos x, + FT_Pos y ); + + typedef void + (*T1_Builder_Close_Contour_Func)( T1_Builder builder ); + + + typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs; + + typedef struct T1_Builder_FuncsRec_ + { + void + (*init)( T1_Builder builder, + FT_Face face, + FT_Size size, + FT_GlyphSlot slot, + FT_Bool hinting ); + + void + (*done)( T1_Builder builder ); + + T1_Builder_Check_Points_Func check_points; + T1_Builder_Add_Point_Func add_point; + T1_Builder_Add_Point1_Func add_point1; + T1_Builder_Add_Contour_Func add_contour; + T1_Builder_Start_Point_Func start_point; + T1_Builder_Close_Contour_Func close_contour; + + } T1_Builder_FuncsRec; + + + /* an enumeration type to handle charstring parsing states */ + typedef enum T1_ParseState_ + { + T1_Parse_Start, + T1_Parse_Have_Width, + T1_Parse_Have_Moveto, + T1_Parse_Have_Path + + } T1_ParseState; + + + /*************************************************************************/ + /* */ + /* <Structure> */ + /* T1_BuilderRec */ + /* */ + /* <Description> */ + /* A structure used during glyph loading to store its outline. */ + /* */ + /* <Fields> */ + /* memory :: The current memory object. */ + /* */ + /* face :: The current face object. */ + /* */ + /* glyph :: The current glyph slot. */ + /* */ + /* loader :: XXX */ + /* */ + /* base :: The base glyph outline. */ + /* */ + /* current :: The current glyph outline. */ + /* */ + /* max_points :: maximum points in builder outline */ + /* */ + /* max_contours :: Maximal number of contours in builder outline. */ + /* */ + /* pos_x :: The horizontal translation (if composite glyph). */ + /* */ + /* pos_y :: The vertical translation (if composite glyph). */ + /* */ + /* left_bearing :: The left side bearing point. */ + /* */ + /* advance :: The horizontal advance vector. */ + /* */ + /* bbox :: Unused. */ + /* */ + /* parse_state :: An enumeration which controls the charstring */ + /* parsing state. */ + /* */ + /* load_points :: If this flag is not set, no points are loaded. */ + /* */ + /* no_recurse :: Set but not used. */ + /* */ + /* metrics_only :: A boolean indicating that we only want to compute */ + /* the metrics of a given glyph, not load all of its */ + /* points. */ + /* */ + /* funcs :: An array of function pointers for the builder. */ + /* */ + typedef struct T1_BuilderRec_ + { + FT_Memory memory; + FT_Face face; + FT_GlyphSlot glyph; + FT_GlyphLoader loader; + FT_Outline* base; + FT_Outline* current; + + FT_Pos pos_x; + FT_Pos pos_y; + + FT_Vector left_bearing; + FT_Vector advance; + + FT_BBox bbox; /* bounding box */ + T1_ParseState parse_state; + FT_Bool load_points; + FT_Bool no_recurse; + + FT_Bool metrics_only; + + void* hints_funcs; /* hinter-specific */ + void* hints_globals; /* hinter-specific */ + + T1_Builder_FuncsRec funcs; + + } T1_BuilderRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** T1 DECODER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + +#if 0 + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 8 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 32 + +#endif /* 0 */ + + + typedef struct T1_Decoder_ZoneRec_ + { + FT_Byte* cursor; + FT_Byte* base; + FT_Byte* limit; + + } T1_Decoder_ZoneRec, *T1_Decoder_Zone; + + + typedef struct T1_DecoderRec_* T1_Decoder; + typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs; + + + typedef FT_Error + (*T1_Decoder_Callback)( T1_Decoder decoder, + FT_UInt glyph_index ); + + + typedef struct T1_Decoder_FuncsRec_ + { + FT_Error + (*init)( T1_Decoder decoder, + FT_Face face, + FT_Size size, + FT_GlyphSlot slot, + FT_Byte** glyph_names, + PS_Blend blend, + FT_Bool hinting, + FT_Render_Mode hint_mode, + T1_Decoder_Callback callback ); + + void + (*done)( T1_Decoder decoder ); + + FT_Error + (*parse_charstrings)( T1_Decoder decoder, + FT_Byte* base, + FT_UInt len ); + + } T1_Decoder_FuncsRec; + + + typedef struct T1_DecoderRec_ + { + T1_BuilderRec builder; + + FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS]; + FT_Long* top; + + T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1]; + T1_Decoder_Zone zone; + + FT_Service_PsCMaps psnames; /* for seac */ + FT_UInt num_glyphs; + FT_Byte** glyph_names; + + FT_Int lenIV; /* internal for sub routine calls */ + FT_UInt num_subrs; + FT_Byte** subrs; + FT_PtrDist* subrs_len; /* array of subrs length (optional) */ + + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_Int flex_state; + FT_Int num_flex_vectors; + FT_Vector flex_vectors[7]; + + PS_Blend blend; /* for multiple master support */ + + FT_Render_Mode hint_mode; + + T1_Decoder_Callback parse_callback; + T1_Decoder_FuncsRec funcs; + + FT_Long* buildchar; + FT_UInt len_buildchar; + + FT_Bool seac; + + } T1_DecoderRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** AFM PARSER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct AFM_ParserRec_* AFM_Parser; + + typedef struct AFM_Parser_FuncsRec_ + { + FT_Error + (*init)( AFM_Parser parser, + FT_Memory memory, + FT_Byte* base, + FT_Byte* limit ); + + void + (*done)( AFM_Parser parser ); + + FT_Error + (*parse)( AFM_Parser parser ); + + } AFM_Parser_FuncsRec; + + + typedef struct AFM_StreamRec_* AFM_Stream; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* AFM_ParserRec */ + /* */ + /* <Description> */ + /* An AFM_Parser is a parser for the AFM files. */ + /* */ + /* <Fields> */ + /* memory :: The object used for memory operations (alloc and */ + /* realloc). */ + /* */ + /* stream :: This is an opaque object. */ + /* */ + /* FontInfo :: The result will be stored here. */ + /* */ + /* get_index :: A user provided function to get a glyph index by its */ + /* name. */ + /* */ + typedef struct AFM_ParserRec_ + { + FT_Memory memory; + AFM_Stream stream; + + AFM_FontInfo FontInfo; + + FT_Int + (*get_index)( const char* name, + FT_Offset len, + void* user_data ); + + void* user_data; + + } AFM_ParserRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** TYPE1 CHARMAPS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes; + + typedef struct T1_CMap_ClassesRec_ + { + FT_CMap_Class standard; + FT_CMap_Class expert; + FT_CMap_Class custom; + FT_CMap_Class unicode; + + } T1_CMap_ClassesRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PSAux Module Interface *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PSAux_ServiceRec_ + { + /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */ + const PS_Table_FuncsRec* ps_table_funcs; + const PS_Parser_FuncsRec* ps_parser_funcs; + const T1_Builder_FuncsRec* t1_builder_funcs; + const T1_Decoder_FuncsRec* t1_decoder_funcs; + + void + (*t1_decrypt)( FT_Byte* buffer, + FT_Offset length, + FT_UShort seed ); + + T1_CMap_Classes t1_cmap_classes; + + /* fields after this comment line were added after version 2.1.10 */ + const AFM_Parser_FuncsRec* afm_parser_funcs; + + } PSAux_ServiceRec, *PSAux_Service; + + /* backwards-compatible type definition */ + typedef PSAux_ServiceRec PSAux_Interface; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** Some convenience functions *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + +#define IS_PS_NEWLINE( ch ) \ + ( (ch) == '\r' || \ + (ch) == '\n' ) + +#define IS_PS_SPACE( ch ) \ + ( (ch) == ' ' || \ + IS_PS_NEWLINE( ch ) || \ + (ch) == '\t' || \ + (ch) == '\f' || \ + (ch) == '\0' ) + +#define IS_PS_SPECIAL( ch ) \ + ( (ch) == '/' || \ + (ch) == '(' || (ch) == ')' || \ + (ch) == '<' || (ch) == '>' || \ + (ch) == '[' || (ch) == ']' || \ + (ch) == '{' || (ch) == '}' || \ + (ch) == '%' ) + +#define IS_PS_DELIM( ch ) \ + ( IS_PS_SPACE( ch ) || \ + IS_PS_SPECIAL( ch ) ) + +#define IS_PS_DIGIT( ch ) \ + ( (ch) >= '0' && (ch) <= '9' ) + +#define IS_PS_XDIGIT( ch ) \ + ( IS_PS_DIGIT( ch ) || \ + ( (ch) >= 'A' && (ch) <= 'F' ) || \ + ( (ch) >= 'a' && (ch) <= 'f' ) ) + +#define IS_PS_BASE85( ch ) \ + ( (ch) >= '!' && (ch) <= 'u' ) + +#define IS_PS_TOKEN( cur, limit, token ) \ + ( (char)(cur)[0] == (token)[0] && \ + ( (cur) + sizeof ( (token) ) == (limit) || \ + ( (cur) + sizeof( (token) ) < (limit) && \ + IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \ + ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 ) + + +FT_END_HEADER + +#endif /* __PSAUX_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/pshints.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/pshints.h new file mode 100644 index 0000000..0c35765 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/pshints.h @@ -0,0 +1,712 @@ +/***************************************************************************/ +/* */ +/* pshints.h */ +/* */ +/* Interface to Postscript-specific (Type 1 and Type 2) hints */ +/* recorders (specification only). These are used to support native */ +/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ +/* */ +/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __PSHINTS_H__ +#define __PSHINTS_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H +#include FT_TYPE1_TABLES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** INTERNAL REPRESENTATION OF GLOBALS *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct PSH_GlobalsRec_* PSH_Globals; + + typedef FT_Error + (*PSH_Globals_NewFunc)( FT_Memory memory, + T1_Private* private_dict, + PSH_Globals* aglobals ); + + typedef FT_Error + (*PSH_Globals_SetScaleFunc)( PSH_Globals globals, + FT_Fixed x_scale, + FT_Fixed y_scale, + FT_Fixed x_delta, + FT_Fixed y_delta ); + + typedef void + (*PSH_Globals_DestroyFunc)( PSH_Globals globals ); + + + typedef struct PSH_Globals_FuncsRec_ + { + PSH_Globals_NewFunc create; + PSH_Globals_SetScaleFunc set_scale; + PSH_Globals_DestroyFunc destroy; + + } PSH_Globals_FuncsRec, *PSH_Globals_Funcs; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PUBLIC TYPE 1 HINTS RECORDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * T1_Hints + * + * @description: + * This is a handle to an opaque structure used to record glyph hints + * from a Type 1 character glyph character string. + * + * The methods used to operate on this object are defined by the + * @T1_Hints_FuncsRec structure. Recording glyph hints is normally + * achieved through the following scheme: + * + * - Open a new hint recording session by calling the `open' method. + * This rewinds the recorder and prepare it for new input. + * + * - For each hint found in the glyph charstring, call the corresponding + * method (`stem', `stem3', or `reset'). Note that these functions do + * not return an error code. + * + * - Close the recording session by calling the `close' method. It + * returns an error code if the hints were invalid or something + * strange happened (e.g., memory shortage). + * + * The hints accumulated in the object can later be used by the + * PostScript hinter. + * + */ + typedef struct T1_HintsRec_* T1_Hints; + + + /************************************************************************* + * + * @type: + * T1_Hints_Funcs + * + * @description: + * A pointer to the @T1_Hints_FuncsRec structure that defines the API of + * a given @T1_Hints object. + * + */ + typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs; + + + /************************************************************************* + * + * @functype: + * T1_Hints_OpenFunc + * + * @description: + * A method of the @T1_Hints class used to prepare it for a new Type 1 + * hints recording session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * @note: + * You should always call the @T1_Hints_CloseFunc method in order to + * close an opened recording session. + * + */ + typedef void + (*T1_Hints_OpenFunc)( T1_Hints hints ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_SetStemFunc + * + * @description: + * A method of the @T1_Hints class used to record a new horizontal or + * vertical stem. This corresponds to the Type 1 `hstem' and `vstem' + * operators. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * dimension :: + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). + * + * coords :: + * Array of 2 coordinates in 16.16 format, used as (position,length) + * stem descriptor. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * `coords[0]' is the absolute stem position (lowest coordinate); + * `coords[1]' is the length. + * + * The length can be negative, in which case it must be either -20 or + * -21. It is interpreted as a `ghost' stem, according to the Type 1 + * specification. + * + * If the length is -21 (corresponding to a bottom ghost stem), then + * the real stem position is `coords[0]+coords[1]'. + * + */ + typedef void + (*T1_Hints_SetStemFunc)( T1_Hints hints, + FT_UInt dimension, + FT_Fixed* coords ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_SetStem3Func + * + * @description: + * A method of the @T1_Hints class used to record three + * counter-controlled horizontal or vertical stems at once. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * dimension :: + * 0 for horizontal stems, 1 for vertical ones. + * + * coords :: + * An array of 6 values in 16.16 format, holding 3 (position,length) + * pairs for the counter-controlled stems. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * The lengths cannot be negative (ghost stems are never + * counter-controlled). + * + */ + typedef void + (*T1_Hints_SetStem3Func)( T1_Hints hints, + FT_UInt dimension, + FT_Fixed* coords ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_ResetFunc + * + * @description: + * A method of the @T1_Hints class used to reset the stems hints in a + * recording session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph in which the + * previously defined hints apply. + * + */ + typedef void + (*T1_Hints_ResetFunc)( T1_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_CloseFunc + * + * @description: + * A method of the @T1_Hints class used to close a hint recording + * session. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * The error code is set to indicate that an error occurred during the + * recording session. + * + */ + typedef FT_Error + (*T1_Hints_CloseFunc)( T1_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T1_Hints_ApplyFunc + * + * @description: + * A method of the @T1_Hints class used to apply hints to the + * corresponding glyph outline. Must be called once all hints have been + * recorded. + * + * @input: + * hints :: + * A handle to the Type 1 hints recorder. + * + * outline :: + * A pointer to the target outline descriptor. + * + * globals :: + * The hinter globals for this font. + * + * hint_mode :: + * Hinting information. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * On input, all points within the outline are in font coordinates. On + * output, they are in 1/64th of pixels. + * + * The scaling transformation is taken from the `globals' object which + * must correspond to the same font as the glyph. + * + */ + typedef FT_Error + (*T1_Hints_ApplyFunc)( T1_Hints hints, + FT_Outline* outline, + PSH_Globals globals, + FT_Render_Mode hint_mode ); + + + /************************************************************************* + * + * @struct: + * T1_Hints_FuncsRec + * + * @description: + * The structure used to provide the API to @T1_Hints objects. + * + * @fields: + * hints :: + * A handle to the T1 Hints recorder. + * + * open :: + * The function to open a recording session. + * + * close :: + * The function to close a recording session. + * + * stem :: + * The function to set a simple stem. + * + * stem3 :: + * The function to set counter-controlled stems. + * + * reset :: + * The function to reset stem hints. + * + * apply :: + * The function to apply the hints to the corresponding glyph outline. + * + */ + typedef struct T1_Hints_FuncsRec_ + { + T1_Hints hints; + T1_Hints_OpenFunc open; + T1_Hints_CloseFunc close; + T1_Hints_SetStemFunc stem; + T1_Hints_SetStem3Func stem3; + T1_Hints_ResetFunc reset; + T1_Hints_ApplyFunc apply; + + } T1_Hints_FuncsRec; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** PUBLIC TYPE 2 HINTS RECORDER *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /************************************************************************* + * + * @type: + * T2_Hints + * + * @description: + * This is a handle to an opaque structure used to record glyph hints + * from a Type 2 character glyph character string. + * + * The methods used to operate on this object are defined by the + * @T2_Hints_FuncsRec structure. Recording glyph hints is normally + * achieved through the following scheme: + * + * - Open a new hint recording session by calling the `open' method. + * This rewinds the recorder and prepare it for new input. + * + * - For each hint found in the glyph charstring, call the corresponding + * method (`stems', `hintmask', `counters'). Note that these + * functions do not return an error code. + * + * - Close the recording session by calling the `close' method. It + * returns an error code if the hints were invalid or something + * strange happened (e.g., memory shortage). + * + * The hints accumulated in the object can later be used by the + * Postscript hinter. + * + */ + typedef struct T2_HintsRec_* T2_Hints; + + + /************************************************************************* + * + * @type: + * T2_Hints_Funcs + * + * @description: + * A pointer to the @T2_Hints_FuncsRec structure that defines the API of + * a given @T2_Hints object. + * + */ + typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs; + + + /************************************************************************* + * + * @functype: + * T2_Hints_OpenFunc + * + * @description: + * A method of the @T2_Hints class used to prepare it for a new Type 2 + * hints recording session. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * @note: + * You should always call the @T2_Hints_CloseFunc method in order to + * close an opened recording session. + * + */ + typedef void + (*T2_Hints_OpenFunc)( T2_Hints hints ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_StemsFunc + * + * @description: + * A method of the @T2_Hints class used to set the table of stems in + * either the vertical or horizontal dimension. Equivalent to the + * `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * dimension :: + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). + * + * count :: + * The number of stems. + * + * coords :: + * An array of `count' (position,length) pairs in 16.16 format. + * + * @note: + * Use vertical coordinates (y) for horizontal stems (dim=0). Use + * horizontal coordinates (x) for vertical stems (dim=1). + * + * There are `2*count' elements in the `coords' array. Each even + * element is an absolute position in font units, each odd element is a + * length in font units. + * + * A length can be negative, in which case it must be either -20 or + * -21. It is interpreted as a `ghost' stem, according to the Type 1 + * specification. + * + */ + typedef void + (*T2_Hints_StemsFunc)( T2_Hints hints, + FT_UInt dimension, + FT_UInt count, + FT_Fixed* coordinates ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_MaskFunc + * + * @description: + * A method of the @T2_Hints class used to set a given hintmask (this + * corresponds to the `hintmask' Type 2 operator). + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * The glyph index of the last point to which the previously defined + * or activated hints apply. + * + * bit_count :: + * The number of bits in the hint mask. + * + * bytes :: + * An array of bytes modelling the hint mask. + * + * @note: + * If the hintmask starts the charstring (before any glyph point + * definition), the value of `end_point' should be 0. + * + * `bit_count' is the number of meaningful bits in the `bytes' array; it + * must be equal to the total number of hints defined so far (i.e., + * horizontal+verticals). + * + * The `bytes' array can come directly from the Type 2 charstring and + * respects the same format. + * + */ + typedef void + (*T2_Hints_MaskFunc)( T2_Hints hints, + FT_UInt end_point, + FT_UInt bit_count, + const FT_Byte* bytes ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_CounterFunc + * + * @description: + * A method of the @T2_Hints class used to set a given counter mask + * (this corresponds to the `hintmask' Type 2 operator). + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * A glyph index of the last point to which the previously defined or + * active hints apply. + * + * bit_count :: + * The number of bits in the hint mask. + * + * bytes :: + * An array of bytes modelling the hint mask. + * + * @note: + * If the hintmask starts the charstring (before any glyph point + * definition), the value of `end_point' should be 0. + * + * `bit_count' is the number of meaningful bits in the `bytes' array; it + * must be equal to the total number of hints defined so far (i.e., + * horizontal+verticals). + * + * The `bytes' array can come directly from the Type 2 charstring and + * respects the same format. + * + */ + typedef void + (*T2_Hints_CounterFunc)( T2_Hints hints, + FT_UInt bit_count, + const FT_Byte* bytes ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_CloseFunc + * + * @description: + * A method of the @T2_Hints class used to close a hint recording + * session. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * end_point :: + * The index of the last point in the input glyph. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * The error code is set to indicate that an error occurred during the + * recording session. + * + */ + typedef FT_Error + (*T2_Hints_CloseFunc)( T2_Hints hints, + FT_UInt end_point ); + + + /************************************************************************* + * + * @functype: + * T2_Hints_ApplyFunc + * + * @description: + * A method of the @T2_Hints class used to apply hints to the + * corresponding glyph outline. Must be called after the `close' + * method. + * + * @input: + * hints :: + * A handle to the Type 2 hints recorder. + * + * outline :: + * A pointer to the target outline descriptor. + * + * globals :: + * The hinter globals for this font. + * + * hint_mode :: + * Hinting information. + * + * @return: + * FreeType error code. 0 means success. + * + * @note: + * On input, all points within the outline are in font coordinates. On + * output, they are in 1/64th of pixels. + * + * The scaling transformation is taken from the `globals' object which + * must correspond to the same font than the glyph. + * + */ + typedef FT_Error + (*T2_Hints_ApplyFunc)( T2_Hints hints, + FT_Outline* outline, + PSH_Globals globals, + FT_Render_Mode hint_mode ); + + + /************************************************************************* + * + * @struct: + * T2_Hints_FuncsRec + * + * @description: + * The structure used to provide the API to @T2_Hints objects. + * + * @fields: + * hints :: + * A handle to the T2 hints recorder object. + * + * open :: + * The function to open a recording session. + * + * close :: + * The function to close a recording session. + * + * stems :: + * The function to set the dimension's stems table. + * + * hintmask :: + * The function to set hint masks. + * + * counter :: + * The function to set counter masks. + * + * apply :: + * The function to apply the hints on the corresponding glyph outline. + * + */ + typedef struct T2_Hints_FuncsRec_ + { + T2_Hints hints; + T2_Hints_OpenFunc open; + T2_Hints_CloseFunc close; + T2_Hints_StemsFunc stems; + T2_Hints_MaskFunc hintmask; + T2_Hints_CounterFunc counter; + T2_Hints_ApplyFunc apply; + + } T2_Hints_FuncsRec; + + + /* */ + + + typedef struct PSHinter_Interface_ + { + PSH_Globals_Funcs (*get_globals_funcs)( FT_Module module ); + T1_Hints_Funcs (*get_t1_funcs) ( FT_Module module ); + T2_Hints_Funcs (*get_t2_funcs) ( FT_Module module ); + + } PSHinter_Interface; + + typedef PSHinter_Interface* PSHinter_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ + get_t1_funcs_, get_t2_funcs_) \ + static const PSHinter_Interface class_ = \ + { \ + get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ + get_t1_funcs_, get_t2_funcs_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + PSHinter_Interface* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_globals_funcs = get_globals_funcs_; \ + clazz->get_t1_funcs = get_t1_funcs_; \ + clazz->get_t2_funcs = get_t2_funcs_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __PSHINTS_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svbdf.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svbdf.h new file mode 100644 index 0000000..9264239 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svbdf.h @@ -0,0 +1,77 @@ +/***************************************************************************/ +/* */ +/* svbdf.h */ +/* */ +/* The FreeType BDF services (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVBDF_H__ +#define __SVBDF_H__ + +#include FT_BDF_H +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_BDF "bdf" + + typedef FT_Error + (*FT_BDF_GetCharsetIdFunc)( FT_Face face, + const char* *acharset_encoding, + const char* *acharset_registry ); + + typedef FT_Error + (*FT_BDF_GetPropertyFunc)( FT_Face face, + const char* prop_name, + BDF_PropertyRec *aproperty ); + + + FT_DEFINE_SERVICE( BDF ) + { + FT_BDF_GetCharsetIdFunc get_charset_id; + FT_BDF_GetPropertyFunc get_property; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ + static const FT_Service_BDFRec class_ = \ + { \ + get_charset_id_, get_property_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ + void \ + FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ + { \ + clazz->get_charset_id = get_charset_id_; \ + clazz->get_property = get_property_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVBDF_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svcid.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svcid.h new file mode 100644 index 0000000..9b874b5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svcid.h @@ -0,0 +1,83 @@ +/***************************************************************************/ +/* */ +/* svcid.h */ +/* */ +/* The FreeType CID font services (specification). */ +/* */ +/* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVCID_H__ +#define __SVCID_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_CID "CID" + + typedef FT_Error + (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, + const char* *registry, + const char* *ordering, + FT_Int *supplement ); + typedef FT_Error + (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, + FT_Bool *is_cid ); + typedef FT_Error + (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, + FT_UInt glyph_index, + FT_UInt *cid ); + + FT_DEFINE_SERVICE( CID ) + { + FT_CID_GetRegistryOrderingSupplementFunc get_ros; + FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; + FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ + get_is_cid_, get_cid_from_glyph_index_ ) \ + static const FT_Service_CIDRec class_ = \ + { \ + get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ + get_is_cid_, get_cid_from_glyph_index_ ) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_CIDRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_ros = get_ros_; \ + clazz->get_is_cid = get_is_cid_; \ + clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVCID_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgldict.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgldict.h new file mode 100644 index 0000000..d66a41d --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgldict.h @@ -0,0 +1,82 @@ +/***************************************************************************/ +/* */ +/* svgldict.h */ +/* */ +/* The FreeType glyph dictionary services (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVGLDICT_H__ +#define __SVGLDICT_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A service used to retrieve glyph names, as well as to find the + * index of a given glyph name in a font. + * + */ + +#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" + + + typedef FT_Error + (*FT_GlyphDict_GetNameFunc)( FT_Face face, + FT_UInt glyph_index, + FT_Pointer buffer, + FT_UInt buffer_max ); + + typedef FT_UInt + (*FT_GlyphDict_NameIndexFunc)( FT_Face face, + FT_String* glyph_name ); + + + FT_DEFINE_SERVICE( GlyphDict ) + { + FT_GlyphDict_GetNameFunc get_name; + FT_GlyphDict_NameIndexFunc name_index; /* optional */ + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ + static const FT_Service_GlyphDictRec class_ = \ + { \ + get_name_, name_index_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_GlyphDictRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_name = get_name_; \ + clazz->name_index = name_index_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVGLDICT_H__ */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgxval.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgxval.h new file mode 100644 index 0000000..2cdab50 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svgxval.h @@ -0,0 +1,72 @@ +/***************************************************************************/ +/* */ +/* svgxval.h */ +/* */ +/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ +/* */ +/* Copyright 2004, 2005 by */ +/* Masatake YAMATO, Red Hat K.K., */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/***************************************************************************/ +/* */ +/* gxvalid is derived from both gxlayout module and otvalid module. */ +/* Development of gxlayout is supported by the Information-technology */ +/* Promotion Agency(IPA), Japan. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVGXVAL_H__ +#define __SVGXVAL_H__ + +#include FT_GX_VALIDATE_H +#include FT_INTERNAL_VALIDATE_H + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" +#define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" + + typedef FT_Error + (*gxv_validate_func)( FT_Face face, + FT_UInt gx_flags, + FT_Bytes tables[FT_VALIDATE_GX_LENGTH], + FT_UInt table_length ); + + + typedef FT_Error + (*ckern_validate_func)( FT_Face face, + FT_UInt ckern_flags, + FT_Bytes *ckern_table ); + + + FT_DEFINE_SERVICE( GXvalidate ) + { + gxv_validate_func validate; + }; + + FT_DEFINE_SERVICE( CKERNvalidate ) + { + ckern_validate_func validate; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVGXVAL_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svkern.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svkern.h new file mode 100644 index 0000000..1488adf --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svkern.h @@ -0,0 +1,51 @@ +/***************************************************************************/ +/* */ +/* svkern.h */ +/* */ +/* The FreeType Kerning service (specification). */ +/* */ +/* Copyright 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVKERN_H__ +#define __SVKERN_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + +#define FT_SERVICE_ID_KERNING "kerning" + + + typedef FT_Error + (*FT_Kerning_TrackGetFunc)( FT_Face face, + FT_Fixed point_size, + FT_Int degree, + FT_Fixed* akerning ); + + FT_DEFINE_SERVICE( Kerning ) + { + FT_Kerning_TrackGetFunc get_track; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVKERN_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svmm.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svmm.h new file mode 100644 index 0000000..66e1da2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svmm.h @@ -0,0 +1,104 @@ +/***************************************************************************/ +/* */ +/* svmm.h */ +/* */ +/* The FreeType Multiple Masters and GX var services (specification). */ +/* */ +/* Copyright 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVMM_H__ +#define __SVMM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A service used to manage multiple-masters data in a given face. + * + * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H). + * + */ + +#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" + + + typedef FT_Error + (*FT_Get_MM_Func)( FT_Face face, + FT_Multi_Master* master ); + + typedef FT_Error + (*FT_Get_MM_Var_Func)( FT_Face face, + FT_MM_Var* *master ); + + typedef FT_Error + (*FT_Set_MM_Design_Func)( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + typedef FT_Error + (*FT_Set_Var_Design_Func)( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ); + + typedef FT_Error + (*FT_Set_MM_Blend_Func)( FT_Face face, + FT_UInt num_coords, + FT_Long* coords ); + + + FT_DEFINE_SERVICE( MultiMasters ) + { + FT_Get_MM_Func get_mm; + FT_Set_MM_Design_Func set_mm_design; + FT_Set_MM_Blend_Func set_mm_blend; + FT_Get_MM_Var_Func get_mm_var; + FT_Set_Var_Design_Func set_var_design; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ + set_mm_blend_, get_mm_var_, set_var_design_) \ + static const FT_Service_MultiMastersRec class_ = \ + { \ + get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ + set_mm_blend_, get_mm_var_, set_var_design_) \ + void \ + FT_Init_Class_##class_( FT_Service_MultiMastersRec* clazz ) \ + { \ + clazz->get_mm = get_mm_; \ + clazz->set_mm_design = set_mm_design_; \ + clazz->set_mm_blend = set_mm_blend_; \ + clazz->get_mm_var = get_mm_var_; \ + clazz->set_var_design = set_var_design_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVMM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svotval.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svotval.h new file mode 100644 index 0000000..970bbd5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svotval.h @@ -0,0 +1,55 @@ +/***************************************************************************/ +/* */ +/* svotval.h */ +/* */ +/* The FreeType OpenType validation service (specification). */ +/* */ +/* Copyright 2004, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVOTVAL_H__ +#define __SVOTVAL_H__ + +#include FT_OPENTYPE_VALIDATE_H +#include FT_INTERNAL_VALIDATE_H + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" + + + typedef FT_Error + (*otv_validate_func)( FT_Face volatile face, + FT_UInt ot_flags, + FT_Bytes *base, + FT_Bytes *gdef, + FT_Bytes *gpos, + FT_Bytes *gsub, + FT_Bytes *jstf ); + + + FT_DEFINE_SERVICE( OTvalidate ) + { + otv_validate_func validate; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVOTVAL_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpfr.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpfr.h new file mode 100644 index 0000000..462786f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpfr.h @@ -0,0 +1,66 @@ +/***************************************************************************/ +/* */ +/* svpfr.h */ +/* */ +/* Internal PFR service functions (specification). */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPFR_H__ +#define __SVPFR_H__ + +#include FT_PFR_H +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" + + + typedef FT_Error + (*FT_PFR_GetMetricsFunc)( FT_Face face, + FT_UInt *aoutline, + FT_UInt *ametrics, + FT_Fixed *ax_scale, + FT_Fixed *ay_scale ); + + typedef FT_Error + (*FT_PFR_GetKerningFunc)( FT_Face face, + FT_UInt left, + FT_UInt right, + FT_Vector *avector ); + + typedef FT_Error + (*FT_PFR_GetAdvanceFunc)( FT_Face face, + FT_UInt gindex, + FT_Pos *aadvance ); + + + FT_DEFINE_SERVICE( PfrMetrics ) + { + FT_PFR_GetMetricsFunc get_metrics; + FT_PFR_GetKerningFunc get_kerning; + FT_PFR_GetAdvanceFunc get_advance; + + }; + + /* */ + +FT_END_HEADER + +#endif /* __SVPFR_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpostnm.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpostnm.h new file mode 100644 index 0000000..106c54f --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpostnm.h @@ -0,0 +1,79 @@ +/***************************************************************************/ +/* */ +/* svpostnm.h */ +/* */ +/* The FreeType PostScript name services (specification). */ +/* */ +/* Copyright 2003, 2007 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPOSTNM_H__ +#define __SVPOSTNM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + /* + * A trivial service used to retrieve the PostScript name of a given + * font when available. The `get_name' field should never be NULL. + * + * The corresponding function can return NULL to indicate that the + * PostScript name is not available. + * + * The name is owned by the face and will be destroyed with it. + */ + +#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" + + + typedef const char* + (*FT_PsName_GetFunc)( FT_Face face ); + + + FT_DEFINE_SERVICE( PsFontName ) + { + FT_PsName_GetFunc get_ps_font_name; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ + static const FT_Service_PsFontNameRec class_ = \ + { \ + get_ps_font_name_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsFontNameRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_ps_font_name = get_ps_font_name_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPOSTNM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpscmap.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpscmap.h new file mode 100644 index 0000000..961030c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpscmap.h @@ -0,0 +1,164 @@ +/***************************************************************************/ +/* */ +/* svpscmap.h */ +/* */ +/* The FreeType PostScript charmap service (specification). */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPSCMAP_H__ +#define __SVPSCMAP_H__ + +#include FT_INTERNAL_OBJECTS_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps" + + + /* + * Adobe glyph name to unicode value. + */ + typedef FT_UInt32 + (*PS_Unicode_ValueFunc)( const char* glyph_name ); + + /* + * Macintosh name id to glyph name. NULL if invalid index. + */ + typedef const char* + (*PS_Macintosh_NameFunc)( FT_UInt name_index ); + + /* + * Adobe standard string ID to glyph name. NULL if invalid index. + */ + typedef const char* + (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index ); + + + /* + * Simple unicode -> glyph index charmap built from font glyph names + * table. + */ + typedef struct PS_UniMap_ + { + FT_UInt32 unicode; /* bit 31 set: is glyph variant */ + FT_UInt glyph_index; + + } PS_UniMap; + + + typedef struct PS_UnicodesRec_* PS_Unicodes; + + typedef struct PS_UnicodesRec_ + { + FT_CMapRec cmap; + FT_UInt num_maps; + PS_UniMap* maps; + + } PS_UnicodesRec; + + + /* + * A function which returns a glyph name for a given index. Returns + * NULL if invalid index. + */ + typedef const char* + (*PS_GetGlyphNameFunc)( FT_Pointer data, + FT_UInt string_index ); + + /* + * A function used to release the glyph name returned by + * PS_GetGlyphNameFunc, when needed + */ + typedef void + (*PS_FreeGlyphNameFunc)( FT_Pointer data, + const char* name ); + + typedef FT_Error + (*PS_Unicodes_InitFunc)( FT_Memory memory, + PS_Unicodes unicodes, + FT_UInt num_glyphs, + PS_GetGlyphNameFunc get_glyph_name, + PS_FreeGlyphNameFunc free_glyph_name, + FT_Pointer glyph_data ); + + typedef FT_UInt + (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes, + FT_UInt32 unicode ); + + typedef FT_UInt32 + (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes, + FT_UInt32 *unicode ); + + + FT_DEFINE_SERVICE( PsCMaps ) + { + PS_Unicode_ValueFunc unicode_value; + + PS_Unicodes_InitFunc unicodes_init; + PS_Unicodes_CharIndexFunc unicodes_char_index; + PS_Unicodes_CharNextFunc unicodes_char_next; + + PS_Macintosh_NameFunc macintosh_name; + PS_Adobe_Std_StringsFunc adobe_std_strings; + const unsigned short* adobe_std_encoding; + const unsigned short* adobe_expert_encoding; + }; + + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ + static const FT_Service_PsCMapsRec class_ = \ + { \ + unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsCMapsRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->unicode_value = unicode_value_; \ + clazz->unicodes_init = unicodes_init_; \ + clazz->unicodes_char_index = unicodes_char_index_; \ + clazz->unicodes_char_next = unicodes_char_next_; \ + clazz->macintosh_name = macintosh_name_; \ + clazz->adobe_std_strings = adobe_std_strings_; \ + clazz->adobe_std_encoding = adobe_std_encoding_; \ + clazz->adobe_expert_encoding = adobe_expert_encoding_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPSCMAP_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpsinfo.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpsinfo.h new file mode 100644 index 0000000..84d6a78 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svpsinfo.h @@ -0,0 +1,103 @@ +/***************************************************************************/ +/* */ +/* svpsinfo.h */ +/* */ +/* The FreeType PostScript info service (specification). */ +/* */ +/* Copyright 2003, 2004, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPSINFO_H__ +#define __SVPSINFO_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_INTERNAL_TYPE1_TYPES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" + + + typedef FT_Error + (*PS_GetFontInfoFunc)( FT_Face face, + PS_FontInfoRec* afont_info ); + + typedef FT_Error + (*PS_GetFontExtraFunc)( FT_Face face, + PS_FontExtraRec* afont_extra ); + + typedef FT_Int + (*PS_HasGlyphNamesFunc)( FT_Face face ); + + typedef FT_Error + (*PS_GetFontPrivateFunc)( FT_Face face, + PS_PrivateRec* afont_private ); + + typedef FT_Long + (*PS_GetFontValueFunc)( FT_Face face, + PS_Dict_Keys key, + FT_UInt idx, + void *value, + FT_Long value_len ); + + + FT_DEFINE_SERVICE( PsInfo ) + { + PS_GetFontInfoFunc ps_get_font_info; + PS_GetFontExtraFunc ps_get_font_extra; + PS_HasGlyphNamesFunc ps_has_glyph_names; + PS_GetFontPrivateFunc ps_get_font_private; + PS_GetFontValueFunc ps_get_font_value; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ + ps_get_font_extra_, has_glyph_names_, get_font_private_, \ + get_font_value_) \ + static const FT_Service_PsInfoRec class_ = \ + { \ + get_font_info_, ps_get_font_extra_, has_glyph_names_, \ + get_font_private_, get_font_value_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ + ps_get_font_extra_, has_glyph_names_, get_font_private_, \ + get_font_value_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_PsInfoRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->ps_get_font_info = get_font_info_; \ + clazz->ps_get_font_extra = ps_get_font_extra_; \ + clazz->ps_has_glyph_names = has_glyph_names_; \ + clazz->ps_get_font_private = get_font_private_; \ + clazz->ps_get_font_value = get_font_value_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPSINFO_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svsfnt.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svsfnt.h new file mode 100644 index 0000000..30bb162 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svsfnt.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* svsfnt.h */ +/* */ +/* The FreeType SFNT table loading service (specification). */ +/* */ +/* Copyright 2003, 2004 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVSFNT_H__ +#define __SVSFNT_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + + /* + * SFNT table loading service. + */ + +#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" + + + /* + * Used to implement FT_Load_Sfnt_Table(). + */ + typedef FT_Error + (*FT_SFNT_TableLoadFunc)( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + /* + * Used to implement FT_Get_Sfnt_Table(). + */ + typedef void* + (*FT_SFNT_TableGetFunc)( FT_Face face, + FT_Sfnt_Tag tag ); + + + /* + * Used to implement FT_Sfnt_Table_Info(). + */ + typedef FT_Error + (*FT_SFNT_TableInfoFunc)( FT_Face face, + FT_UInt idx, + FT_ULong *tag, + FT_ULong *offset, + FT_ULong *length ); + + + FT_DEFINE_SERVICE( SFNT_Table ) + { + FT_SFNT_TableLoadFunc load_table; + FT_SFNT_TableGetFunc get_table; + FT_SFNT_TableInfoFunc table_info; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ + static const FT_Service_SFNT_TableRec class_ = \ + { \ + load_, get_, info_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ + void \ + FT_Init_Class_##class_( FT_Service_SFNT_TableRec* clazz ) \ + { \ + clazz->load_table = load_; \ + clazz->get_table = get_; \ + clazz->table_info = info_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVSFNT_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttcmap.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttcmap.h new file mode 100644 index 0000000..8af0035 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttcmap.h @@ -0,0 +1,106 @@ +/***************************************************************************/ +/* */ +/* svttcmap.h */ +/* */ +/* The FreeType TrueType/sfnt cmap extra information service. */ +/* */ +/* Copyright 2003 by */ +/* Masatake YAMATO, Redhat K.K. */ +/* */ +/* Copyright 2003, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/* Development of this service is support of + Information-technology Promotion Agency, Japan. */ + +#ifndef __SVTTCMAP_H__ +#define __SVTTCMAP_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_TT_CMAP "tt-cmaps" + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_CMapInfo */ + /* */ + /* <Description> */ + /* A structure used to store TrueType/sfnt specific cmap information */ + /* which is not covered by the generic @FT_CharMap structure. This */ + /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */ + /* */ + /* <Fields> */ + /* language :: */ + /* The language ID used in Mac fonts. Definitions of values are in */ + /* freetype/ttnameid.h. */ + /* */ + /* format :: */ + /* The cmap format. OpenType 1.5 defines the formats 0 (byte */ + /* encoding table), 2~(high-byte mapping through table), 4~(segment */ + /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */ + /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */ + /* coverage), and 14 (Unicode Variation Sequences). */ + /* */ + typedef struct TT_CMapInfo_ + { + FT_ULong language; + FT_Long format; + + } TT_CMapInfo; + + + typedef FT_Error + (*TT_CMap_Info_GetFunc)( FT_CharMap charmap, + TT_CMapInfo *cmap_info ); + + + FT_DEFINE_SERVICE( TTCMaps ) + { + TT_CMap_Info_GetFunc get_cmap_info; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ + static const FT_Service_TTCMapsRec class_ = \ + { \ + get_cmap_info_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ + void \ + FT_Init_Class_##class_( FT_Library library, \ + FT_Service_TTCMapsRec* clazz) \ + { \ + FT_UNUSED(library); \ + clazz->get_cmap_info = get_cmap_info_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVTTCMAP_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svtteng.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svtteng.h new file mode 100644 index 0000000..58e02a6 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svtteng.h @@ -0,0 +1,53 @@ +/***************************************************************************/ +/* */ +/* svtteng.h */ +/* */ +/* The FreeType TrueType engine query service (specification). */ +/* */ +/* Copyright 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVTTENG_H__ +#define __SVTTENG_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_MODULE_H + + +FT_BEGIN_HEADER + + + /* + * SFNT table loading service. + */ + +#define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" + + /* + * Used to implement FT_Get_TrueType_Engine_Type + */ + + FT_DEFINE_SERVICE( TrueTypeEngine ) + { + FT_TrueTypeEngineType engine_type; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVTTENG_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttglyf.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttglyf.h new file mode 100644 index 0000000..ab2dc9a --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svttglyf.h @@ -0,0 +1,67 @@ +/***************************************************************************/ +/* */ +/* svttglyf.h */ +/* */ +/* The FreeType TrueType glyph service. */ +/* */ +/* Copyright 2007 by David Turner. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#ifndef __SVTTGLYF_H__ +#define __SVTTGLYF_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_TRUETYPE_TABLES_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_TT_GLYF "tt-glyf" + + + typedef FT_ULong + (*TT_Glyf_GetLocationFunc)( FT_Face face, + FT_UInt gindex, + FT_ULong *psize ); + + FT_DEFINE_SERVICE( TTGlyf ) + { + TT_Glyf_GetLocationFunc get_location; + }; + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ + static const FT_Service_TTGlyfRec class_ = \ + { \ + get_location_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ + void \ + FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ + { \ + clazz->get_location = get_location_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + +#endif /* __SVTTGLYF_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svwinfnt.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svwinfnt.h new file mode 100644 index 0000000..57f7765 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svwinfnt.h @@ -0,0 +1,50 @@ +/***************************************************************************/ +/* */ +/* svwinfnt.h */ +/* */ +/* The FreeType Windows FNT/FONT service (specification). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVWINFNT_H__ +#define __SVWINFNT_H__ + +#include FT_INTERNAL_SERVICE_H +#include FT_WINFONTS_H + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_WINFNT "winfonts" + + typedef FT_Error + (*FT_WinFnt_GetHeaderFunc)( FT_Face face, + FT_WinFNT_HeaderRec *aheader ); + + + FT_DEFINE_SERVICE( WinFnt ) + { + FT_WinFnt_GetHeaderFunc get_header; + }; + + /* */ + + +FT_END_HEADER + + +#endif /* __SVWINFNT_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svxf86nm.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svxf86nm.h new file mode 100644 index 0000000..ca5d884 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/services/svxf86nm.h @@ -0,0 +1,55 @@ +/***************************************************************************/ +/* */ +/* svxf86nm.h */ +/* */ +/* The FreeType XFree86 services (specification only). */ +/* */ +/* Copyright 2003 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVXF86NM_H__ +#define __SVXF86NM_H__ + +#include FT_INTERNAL_SERVICE_H + + +FT_BEGIN_HEADER + + + /* + * A trivial service used to return the name of a face's font driver, + * according to the XFree86 nomenclature. Note that the service data + * is a simple constant string pointer. + */ + +#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" + +#define FT_XF86_FORMAT_TRUETYPE "TrueType" +#define FT_XF86_FORMAT_TYPE_1 "Type 1" +#define FT_XF86_FORMAT_BDF "BDF" +#define FT_XF86_FORMAT_PCF "PCF" +#define FT_XF86_FORMAT_TYPE_42 "Type 42" +#define FT_XF86_FORMAT_CID "CID Type 1" +#define FT_XF86_FORMAT_CFF "CFF" +#define FT_XF86_FORMAT_PFR "PFR" +#define FT_XF86_FORMAT_WINFNT "Windows FNT" + + /* */ + + +FT_END_HEADER + + +#endif /* __SVXF86NM_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/sfnt.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/sfnt.h new file mode 100644 index 0000000..6326deb --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/sfnt.h @@ -0,0 +1,897 @@ +/***************************************************************************/ +/* */ +/* sfnt.h */ +/* */ +/* High-level `sfnt' driver interface (specification). */ +/* */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SFNT_H__ +#define __SFNT_H__ + + +#include <ft2build.h> +#include FT_INTERNAL_DRIVER_H +#include FT_INTERNAL_TRUETYPE_TYPES_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Init_Face_Func */ + /* */ + /* <Description> */ + /* First part of the SFNT face object initialization. This finds */ + /* the face in a SFNT file or collection, and load its format tag in */ + /* face->format_tag. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* face :: A handle to the target face object. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* params :: Optional additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + /* This function recognizes fonts embedded in a `TrueType */ + /* collection'. */ + /* */ + /* Once the format tag has been validated by the font driver, it */ + /* should then call the TT_Load_Face_Func() callback to read the rest */ + /* of the SFNT tables in the object. */ + /* */ + typedef FT_Error + (*TT_Init_Face_Func)( FT_Stream stream, + TT_Face face, + FT_Int face_index, + FT_Int num_params, + FT_Parameter* params ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Face_Func */ + /* */ + /* <Description> */ + /* Second part of the SFNT face object initialization. This loads */ + /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */ + /* face object. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* face :: A handle to the target face object. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* num_params :: The number of additional parameters. */ + /* */ + /* params :: Optional additional parameters. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function must be called after TT_Init_Face_Func(). */ + /* */ + typedef FT_Error + (*TT_Load_Face_Func)( FT_Stream stream, + TT_Face face, + FT_Int face_index, + FT_Int num_params, + FT_Parameter* params ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Done_Face_Func */ + /* */ + /* <Description> */ + /* A callback used to delete the common SFNT data from a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* <Note> */ + /* This function does NOT destroy the face object. */ + /* */ + typedef void + (*TT_Done_Face_Func)( TT_Face face ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SFNT_HeaderRec_Func */ + /* */ + /* <Description> */ + /* Loads the header of a SFNT font file. Supports collections. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* face_index :: The index of the TrueType font, if we are opening a */ + /* collection. */ + /* */ + /* <Output> */ + /* sfnt :: The SFNT header. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + /* This function recognizes fonts embedded in a `TrueType */ + /* collection'. */ + /* */ + /* This function checks that the header is valid by looking at the */ + /* values of `search_range', `entry_selector', and `range_shift'. */ + /* */ + typedef FT_Error + (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face, + FT_Stream stream, + FT_Long face_index, + SFNT_Header sfnt ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Directory_Func */ + /* */ + /* <Description> */ + /* Loads the table directory into a face object. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* sfnt :: The SFNT header. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be on the first byte after the 4-byte font */ + /* format tag. This is the case just after a call to */ + /* TT_Load_Format_Tag(). */ + /* */ + typedef FT_Error + (*TT_Load_Directory_Func)( TT_Face face, + FT_Stream stream, + SFNT_Header sfnt ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Any_Func */ + /* */ + /* <Description> */ + /* Load any font table into client memory. */ + /* */ + /* <Input> */ + /* face :: The face object to look for. */ + /* */ + /* tag :: The tag of table to load. Use the value 0 if you want */ + /* to access the whole font file, else set this parameter */ + /* to a valid TrueType table tag that you can forge with */ + /* the MAKE_TT_TAG macro. */ + /* */ + /* offset :: The starting offset in the table (or the file if */ + /* tag == 0). */ + /* */ + /* length :: The address of the decision variable: */ + /* */ + /* If length == NULL: */ + /* Loads the whole table. Returns an error if */ + /* `offset' == 0! */ + /* */ + /* If *length == 0: */ + /* Exits immediately; returning the length of the given */ + /* table or of the font file, depending on the value of */ + /* `tag'. */ + /* */ + /* If *length != 0: */ + /* Loads the next `length' bytes of table or font, */ + /* starting at offset `offset' (in table or font too). */ + /* */ + /* <Output> */ + /* buffer :: The address of target buffer. */ + /* */ + /* <Return> */ + /* TrueType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Load_Any_Func)( TT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte *buffer, + FT_ULong* length ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Find_SBit_Image_Func */ + /* */ + /* <Description> */ + /* Check whether an embedded bitmap (an `sbit') exists for a given */ + /* glyph, at a given strike. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* glyph_index :: The glyph index. */ + /* */ + /* strike_index :: The current strike index. */ + /* */ + /* <Output> */ + /* arange :: The SBit range containing the glyph index. */ + /* */ + /* astrike :: The SBit strike containing the glyph index. */ + /* */ + /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns */ + /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */ + /* glyph. */ + /* */ + typedef FT_Error + (*TT_Find_SBit_Image_Func)( TT_Face face, + FT_UInt glyph_index, + FT_ULong strike_index, + TT_SBit_Range *arange, + TT_SBit_Strike *astrike, + FT_ULong *aglyph_offset ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SBit_Metrics_Func */ + /* */ + /* <Description> */ + /* Get the big metrics for a given embedded bitmap. */ + /* */ + /* <Input> */ + /* stream :: The input stream. */ + /* */ + /* range :: The SBit range containing the glyph. */ + /* */ + /* <Output> */ + /* big_metrics :: A big SBit metrics structure for the glyph. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be positioned at the glyph's offset within */ + /* the `EBDT' table before the call. */ + /* */ + /* If the image format uses variable metrics, the stream cursor is */ + /* positioned just after the metrics header in the `EBDT' table on */ + /* function exit. */ + /* */ + typedef FT_Error + (*TT_Load_SBit_Metrics_Func)( FT_Stream stream, + TT_SBit_Range range, + TT_SBit_Metrics metrics ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_SBit_Image_Func */ + /* */ + /* <Description> */ + /* Load a given glyph sbit image from the font resource. This also */ + /* returns its metrics. */ + /* */ + /* <Input> */ + /* face :: */ + /* The target face object. */ + /* */ + /* strike_index :: */ + /* The strike index. */ + /* */ + /* glyph_index :: */ + /* The current glyph index. */ + /* */ + /* load_flags :: */ + /* The current load flags. */ + /* */ + /* stream :: */ + /* The input stream. */ + /* */ + /* <Output> */ + /* amap :: */ + /* The target pixmap. */ + /* */ + /* ametrics :: */ + /* A big sbit metrics structure for the glyph image. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* glyph sbit exists for the index. */ + /* */ + /* <Note> */ + /* The `map.buffer' field is always freed before the glyph is loaded. */ + /* */ + typedef FT_Error + (*TT_Load_SBit_Image_Func)( TT_Face face, + FT_ULong strike_index, + FT_UInt glyph_index, + FT_UInt load_flags, + FT_Stream stream, + FT_Bitmap *amap, + TT_SBit_MetricsRec *ametrics ); + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Set_SBit_Strike_OldFunc */ + /* */ + /* <Description> */ + /* Select an sbit strike for a given size request. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* req :: The size request. */ + /* */ + /* <Output> */ + /* astrike_index :: The index of the sbit strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* sbit strike exists for the selected ppem values. */ + /* */ + typedef FT_Error + (*TT_Set_SBit_Strike_OldFunc)( TT_Face face, + FT_UInt x_ppem, + FT_UInt y_ppem, + FT_ULong* astrike_index ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_CharMap_Load_Func */ + /* */ + /* <Description> */ + /* Loads a given TrueType character map into memory. */ + /* */ + /* <Input> */ + /* face :: A handle to the parent face object. */ + /* */ + /* stream :: A handle to the current stream object. */ + /* */ + /* <InOut> */ + /* cmap :: A pointer to a cmap object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The function assumes that the stream is already in use (i.e., */ + /* opened). In case of error, all partially allocated tables are */ + /* released. */ + /* */ + typedef FT_Error + (*TT_CharMap_Load_Func)( TT_Face face, + void* cmap, + FT_Stream input ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_CharMap_Free_Func */ + /* */ + /* <Description> */ + /* Destroys a character mapping table. */ + /* */ + /* <Input> */ + /* face :: A handle to the parent face object. */ + /* */ + /* cmap :: A handle to a cmap object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_CharMap_Free_Func)( TT_Face face, + void* cmap ); + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Set_SBit_Strike_Func */ + /* */ + /* <Description> */ + /* Select an sbit strike for a given size request. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* req :: The size request. */ + /* */ + /* <Output> */ + /* astrike_index :: The index of the sbit strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* sbit strike exists for the selected ppem values. */ + /* */ + typedef FT_Error + (*TT_Set_SBit_Strike_Func)( TT_Face face, + FT_Size_Request req, + FT_ULong* astrike_index ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Strike_Metrics_Func */ + /* */ + /* <Description> */ + /* Load the metrics of a given strike. */ + /* */ + /* <Input> */ + /* face :: The target face object. */ + /* */ + /* strike_index :: The strike index. */ + /* */ + /* <Output> */ + /* metrics :: the metrics of the strike. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. Returns an error if no */ + /* such sbit strike exists. */ + /* */ + typedef FT_Error + (*TT_Load_Strike_Metrics_Func)( TT_Face face, + FT_ULong strike_index, + FT_Size_Metrics* metrics ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Get_PS_Name_Func */ + /* */ + /* <Description> */ + /* Get the PostScript glyph name of a glyph. */ + /* */ + /* <Input> */ + /* idx :: The glyph index. */ + /* */ + /* PSname :: The address of a string pointer. Will be NULL in case */ + /* of error, otherwise it is a pointer to the glyph name. */ + /* */ + /* You must not modify the returned string! */ + /* */ + /* <Output> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Get_PS_Name_Func)( TT_Face face, + FT_UInt idx, + FT_String** PSname ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Metrics_Func */ + /* */ + /* <Description> */ + /* Load a metrics table, which is a table with a horizontal and a */ + /* vertical version. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* vertical :: A boolean flag. If set, load the vertical one. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Load_Metrics_Func)( TT_Face face, + FT_Stream stream, + FT_Bool vertical ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Get_Metrics_Func */ + /* */ + /* <Description> */ + /* Load the horizontal or vertical header in a face object. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* vertical :: A boolean flag. If set, load vertical metrics. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Get_Metrics_Func)( TT_Face face, + FT_Bool vertical, + FT_UInt gindex, + FT_Short* abearing, + FT_UShort* aadvance ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Load_Table_Func */ + /* */ + /* <Description> */ + /* Load a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The function uses `face->goto_table' to seek the stream to the */ + /* start of the table, except while loading the font directory. */ + /* */ + typedef FT_Error + (*TT_Load_Table_Func)( TT_Face face, + FT_Stream stream ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Free_Table_Func */ + /* */ + /* <Description> */ + /* Free a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + typedef void + (*TT_Free_Table_Func)( TT_Face face ); + + + /* + * @functype: + * TT_Face_GetKerningFunc + * + * @description: + * Return the horizontal kerning value between two glyphs. + * + * @input: + * face :: A handle to the source face object. + * left_glyph :: The left glyph index. + * right_glyph :: The right glyph index. + * + * @return: + * The kerning value in font units. + */ + typedef FT_Int + (*TT_Face_GetKerningFunc)( TT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph ); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* SFNT_Interface */ + /* */ + /* <Description> */ + /* This structure holds pointers to the functions used to load and */ + /* free the basic tables that are required in a `sfnt' font file. */ + /* */ + /* <Fields> */ + /* Check the various xxx_Func() descriptions for details. */ + /* */ + typedef struct SFNT_Interface_ + { + TT_Loader_GotoTableFunc goto_table; + + TT_Init_Face_Func init_face; + TT_Load_Face_Func load_face; + TT_Done_Face_Func done_face; + FT_Module_Requester get_interface; + + TT_Load_Any_Func load_any; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Load_SFNT_HeaderRec_Func load_sfnt_header; + TT_Load_Directory_Func load_directory; +#endif + + /* these functions are called by `load_face' but they can also */ + /* be called from external modules, if there is a need to do so */ + TT_Load_Table_Func load_head; + TT_Load_Metrics_Func load_hhea; + TT_Load_Table_Func load_cmap; + TT_Load_Table_Func load_maxp; + TT_Load_Table_Func load_os2; + TT_Load_Table_Func load_post; + + TT_Load_Table_Func load_name; + TT_Free_Table_Func free_name; + + /* optional tables */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Load_Table_Func load_hdmx_stub; + TT_Free_Table_Func free_hdmx_stub; +#endif + + /* this field was called `load_kerning' up to version 2.1.10 */ + TT_Load_Table_Func load_kern; + + TT_Load_Table_Func load_gasp; + TT_Load_Table_Func load_pclt; + + /* see `ttload.h'; this field was called `load_bitmap_header' up to */ + /* version 2.1.10 */ + TT_Load_Table_Func load_bhed; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /* see `ttsbit.h' */ + TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub; + TT_Load_Table_Func load_sbits_stub; + + /* + * The following two fields appeared in version 2.1.8, and were placed + * between `load_sbits' and `load_sbit_image'. We support them as a + * special exception since they are used by Xfont library within the + * X.Org xserver, and because the probability that other rogue clients + * use the other version 2.1.7 fields below is _extremely_ low. + * + * Note that this forces us to disable an interesting memory-saving + * optimization though... + */ + + TT_Find_SBit_Image_Func find_sbit_image; + TT_Load_SBit_Metrics_Func load_sbit_metrics; + +#endif + + TT_Load_SBit_Image_Func load_sbit_image; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_Free_Table_Func free_sbits_stub; +#endif + + /* see `ttpost.h' */ + TT_Get_PS_Name_Func get_psname; + TT_Free_Table_Func free_psnames; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_CharMap_Load_Func load_charmap_stub; + TT_CharMap_Free_Func free_charmap_stub; +#endif + + /* starting here, the structure differs from version 2.1.7 */ + + /* this field was introduced in version 2.1.8, named `get_psname' */ + TT_Face_GetKerningFunc get_kerning; + + /* new elements introduced after version 2.1.10 */ + + /* load the font directory, i.e., the offset table and */ + /* the table directory */ + TT_Load_Table_Func load_font_dir; + TT_Load_Metrics_Func load_hmtx; + + TT_Load_Table_Func load_eblc; + TT_Free_Table_Func free_eblc; + + TT_Set_SBit_Strike_Func set_sbit_strike; + TT_Load_Strike_Metrics_Func load_strike_metrics; + + TT_Get_Metrics_Func get_metrics; + + } SFNT_Interface; + + + /* transitional */ + typedef SFNT_Interface* SFNT_Service; + +#ifndef FT_CONFIG_OPTION_PIC + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \ + a, +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) +#endif +#define FT_INTERNAL(a) \ + a, + +#define FT_DEFINE_SFNT_INTERFACE(class_, \ + goto_table_, init_face_, load_face_, done_face_, get_interface_, \ + load_any_, load_sfnt_header_, load_directory_, load_head_, \ + load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ + load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ + load_kern_, load_gasp_, load_pclt_, load_bhed_, \ + set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ + load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ + get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ + get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ + set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ + static const SFNT_Interface class_ = \ + { \ + FT_INTERNAL(goto_table_) \ + FT_INTERNAL(init_face_) \ + FT_INTERNAL(load_face_) \ + FT_INTERNAL(done_face_) \ + FT_INTERNAL(get_interface_) \ + FT_INTERNAL(load_any_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \ + FT_INTERNAL(load_head_) \ + FT_INTERNAL(load_hhea_) \ + FT_INTERNAL(load_cmap_) \ + FT_INTERNAL(load_maxp_) \ + FT_INTERNAL(load_os2_) \ + FT_INTERNAL(load_post_) \ + FT_INTERNAL(load_name_) \ + FT_INTERNAL(free_name_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \ + FT_INTERNAL(load_kern_) \ + FT_INTERNAL(load_gasp_) \ + FT_INTERNAL(load_pclt_) \ + FT_INTERNAL(load_bhed_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \ + FT_INTERNAL(load_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \ + FT_INTERNAL(get_psname_) \ + FT_INTERNAL(free_psnames_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \ + FT_INTERNAL(get_kerning_) \ + FT_INTERNAL(load_font_dir_) \ + FT_INTERNAL(load_hmtx_) \ + FT_INTERNAL(load_eblc_) \ + FT_INTERNAL(free_eblc_) \ + FT_INTERNAL(set_sbit_strike_) \ + FT_INTERNAL(load_strike_metrics_) \ + FT_INTERNAL(get_metrics_) \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \ + clazz->a = a_; +#else + #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) +#endif +#define FT_INTERNAL(a, a_) \ + clazz->a = a_; + +#define FT_DEFINE_SFNT_INTERFACE(class_, \ + goto_table_, init_face_, load_face_, done_face_, get_interface_, \ + load_any_, load_sfnt_header_, load_directory_, load_head_, \ + load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ + load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ + load_kern_, load_gasp_, load_pclt_, load_bhed_, \ + set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ + load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ + get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ + get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ + set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ + void \ + FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \ + { \ + FT_UNUSED(library); \ + FT_INTERNAL(goto_table,goto_table_) \ + FT_INTERNAL(init_face,init_face_) \ + FT_INTERNAL(load_face,load_face_) \ + FT_INTERNAL(done_face,done_face_) \ + FT_INTERNAL(get_interface,get_interface_) \ + FT_INTERNAL(load_any,load_any_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \ + FT_INTERNAL(load_head,load_head_) \ + FT_INTERNAL(load_hhea,load_hhea_) \ + FT_INTERNAL(load_cmap,load_cmap_) \ + FT_INTERNAL(load_maxp,load_maxp_) \ + FT_INTERNAL(load_os2,load_os2_) \ + FT_INTERNAL(load_post,load_post_) \ + FT_INTERNAL(load_name,load_name_) \ + FT_INTERNAL(free_name,free_name_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \ + FT_INTERNAL(load_kern,load_kern_) \ + FT_INTERNAL(load_gasp,load_gasp_) \ + FT_INTERNAL(load_pclt,load_pclt_) \ + FT_INTERNAL(load_bhed,load_bhed_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \ + FT_INTERNAL(load_sbit_image,load_sbit_image_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \ + FT_INTERNAL(get_psname,get_psname_) \ + FT_INTERNAL(free_psnames,free_psnames_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \ + FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \ + FT_INTERNAL(get_kerning,get_kerning_) \ + FT_INTERNAL(load_font_dir,load_font_dir_) \ + FT_INTERNAL(load_hmtx,load_hmtx_) \ + FT_INTERNAL(load_eblc,load_eblc_) \ + FT_INTERNAL(free_eblc,free_eblc_) \ + FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \ + FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \ + FT_INTERNAL(get_metrics,get_metrics_) \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + +FT_END_HEADER + +#endif /* __SFNT_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/t1types.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/t1types.h new file mode 100644 index 0000000..f859de2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/t1types.h @@ -0,0 +1,259 @@ +/***************************************************************************/ +/* */ +/* t1types.h */ +/* */ +/* Basic Type1/Type2 type definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __T1TYPES_H__ +#define __T1TYPES_H__ + + +#include <ft2build.h> +#include FT_TYPE1_TABLES_H +#include FT_INTERNAL_POSTSCRIPT_HINTS_H +#include FT_INTERNAL_SERVICE_H +#include FT_SERVICE_POSTSCRIPT_CMAPS_H + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_EncodingRec */ + /* */ + /* <Description> */ + /* A structure modeling a custom encoding. */ + /* */ + /* <Fields> */ + /* num_chars :: The number of character codes in the encoding. */ + /* Usually 256. */ + /* */ + /* code_first :: The lowest valid character code in the encoding. */ + /* */ + /* code_last :: The highest valid character code in the encoding */ + /* + 1. When equal to code_first there are no valid */ + /* character codes. */ + /* */ + /* char_index :: An array of corresponding glyph indices. */ + /* */ + /* char_name :: An array of corresponding glyph names. */ + /* */ + typedef struct T1_EncodingRecRec_ + { + FT_Int num_chars; + FT_Int code_first; + FT_Int code_last; + + FT_UShort* char_index; + FT_String** char_name; + + } T1_EncodingRec, *T1_Encoding; + + + /* used to hold extra data of PS_FontInfoRec that + * cannot be stored in the publicly defined structure. + * + * Note these can't be blended with multiple-masters. + */ + typedef struct PS_FontExtraRec_ + { + FT_UShort fs_type; + + } PS_FontExtraRec; + + + typedef struct T1_FontRec_ + { + PS_FontInfoRec font_info; /* font info dictionary */ + PS_FontExtraRec font_extra; /* font info extra fields */ + PS_PrivateRec private_dict; /* private dictionary */ + FT_String* font_name; /* top-level dictionary */ + + T1_EncodingType encoding_type; + T1_EncodingRec encoding; + + FT_Byte* subrs_block; + FT_Byte* charstrings_block; + FT_Byte* glyph_names_block; + + FT_Int num_subrs; + FT_Byte** subrs; + FT_PtrDist* subrs_len; + + FT_Int num_glyphs; + FT_String** glyph_names; /* array of glyph names */ + FT_Byte** charstrings; /* array of glyph charstrings */ + FT_PtrDist* charstrings_len; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + FT_BBox font_bbox; + FT_Long font_id; + + FT_Fixed stroke_width; + + } T1_FontRec, *T1_Font; + + + typedef struct CID_SubrsRec_ + { + FT_UInt num_subrs; + FT_Byte** code; + + } CID_SubrsRec, *CID_Subrs; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** AFM FONT INFORMATION STRUCTURES ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct AFM_TrackKernRec_ + { + FT_Int degree; + FT_Fixed min_ptsize; + FT_Fixed min_kern; + FT_Fixed max_ptsize; + FT_Fixed max_kern; + + } AFM_TrackKernRec, *AFM_TrackKern; + + typedef struct AFM_KernPairRec_ + { + FT_Int index1; + FT_Int index2; + FT_Int x; + FT_Int y; + + } AFM_KernPairRec, *AFM_KernPair; + + typedef struct AFM_FontInfoRec_ + { + FT_Bool IsCIDFont; + FT_BBox FontBBox; + FT_Fixed Ascender; + FT_Fixed Descender; + AFM_TrackKern TrackKerns; /* free if non-NULL */ + FT_Int NumTrackKern; + AFM_KernPair KernPairs; /* free if non-NULL */ + FT_Int NumKernPair; + + } AFM_FontInfoRec, *AFM_FontInfo; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** ORIGINAL T1_FACE CLASS DEFINITION ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + typedef struct T1_FaceRec_* T1_Face; + typedef struct CID_FaceRec_* CID_Face; + + + typedef struct T1_FaceRec_ + { + FT_FaceRec root; + T1_FontRec type1; + const void* psnames; + const void* psaux; + const void* afm_data; + FT_CharMapRec charmaprecs[2]; + FT_CharMap charmaps[2]; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + PS_Unicodes unicode_map; +#endif + + /* support for Multiple Masters fonts */ + PS_Blend blend; + + /* undocumented, optional: indices of subroutines that express */ + /* the NormalizeDesignVector and the ConvertDesignVector procedure, */ + /* respectively, as Type 2 charstrings; -1 if keywords not present */ + FT_Int ndv_idx; + FT_Int cdv_idx; + + /* undocumented, optional: has the same meaning as len_buildchar */ + /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */ + FT_UInt len_buildchar; + FT_Long* buildchar; + + /* since version 2.1 - interface to PostScript hinter */ + const void* pshinter; + + } T1_FaceRec; + + + typedef struct CID_FaceRec_ + { + FT_FaceRec root; + void* psnames; + void* psaux; + CID_FaceInfoRec cid; + PS_FontExtraRec font_extra; +#if 0 + void* afm_data; +#endif + CID_Subrs subrs; + + /* since version 2.1 - interface to PostScript hinter */ + void* pshinter; + + /* since version 2.1.8, but was originally positioned after `afm_data' */ + FT_Byte* binary_data; /* used if hex data has been converted */ + FT_Stream cid_stream; + + } CID_FaceRec; + + +FT_END_HEADER + +#endif /* __T1TYPES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/tttypes.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/tttypes.h new file mode 100644 index 0000000..acbb863 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/internal/tttypes.h @@ -0,0 +1,1543 @@ +/***************************************************************************/ +/* */ +/* tttypes.h */ +/* */ +/* Basic SFNT/TrueType type definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTTYPES_H__ +#define __TTTYPES_H__ + + +#include <ft2build.h> +#include FT_TRUETYPE_TABLES_H +#include FT_INTERNAL_OBJECTS_H + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#include FT_MULTIPLE_MASTERS_H +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TTC_HeaderRec */ + /* */ + /* <Description> */ + /* TrueType collection header. This table contains the offsets of */ + /* the font headers of each distinct TrueType face in the file. */ + /* */ + /* <Fields> */ + /* tag :: Must be `ttc ' to indicate a TrueType collection. */ + /* */ + /* version :: The version number. */ + /* */ + /* count :: The number of faces in the collection. The */ + /* specification says this should be an unsigned long, but */ + /* we use a signed long since we need the value -1 for */ + /* specific purposes. */ + /* */ + /* offsets :: The offsets of the font headers, one per face. */ + /* */ + typedef struct TTC_HeaderRec_ + { + FT_ULong tag; + FT_Fixed version; + FT_Long count; + FT_ULong* offsets; + + } TTC_HeaderRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* SFNT_HeaderRec */ + /* */ + /* <Description> */ + /* SFNT file format header. */ + /* */ + /* <Fields> */ + /* format_tag :: The font format tag. */ + /* */ + /* num_tables :: The number of tables in file. */ + /* */ + /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */ + /* */ + /* entry_selector :: Must be log2 of `search_range / 16'. */ + /* */ + /* range_shift :: Must be `num_tables * 16 - search_range'. */ + /* */ + typedef struct SFNT_HeaderRec_ + { + FT_ULong format_tag; + FT_UShort num_tables; + FT_UShort search_range; + FT_UShort entry_selector; + FT_UShort range_shift; + + FT_ULong offset; /* not in file */ + + } SFNT_HeaderRec, *SFNT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_TableRec */ + /* */ + /* <Description> */ + /* This structure describes a given table of a TrueType font. */ + /* */ + /* <Fields> */ + /* Tag :: A four-bytes tag describing the table. */ + /* */ + /* CheckSum :: The table checksum. This value can be ignored. */ + /* */ + /* Offset :: The offset of the table from the start of the TrueType */ + /* font in its resource. */ + /* */ + /* Length :: The table length (in bytes). */ + /* */ + typedef struct TT_TableRec_ + { + FT_ULong Tag; /* table type */ + FT_ULong CheckSum; /* table checksum */ + FT_ULong Offset; /* table file offset */ + FT_ULong Length; /* table length */ + + } TT_TableRec, *TT_Table; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_LongMetricsRec */ + /* */ + /* <Description> */ + /* A structure modeling the long metrics of the `hmtx' and `vmtx' */ + /* TrueType tables. The values are expressed in font units. */ + /* */ + /* <Fields> */ + /* advance :: The advance width or height for the glyph. */ + /* */ + /* bearing :: The left-side or top-side bearing for the glyph. */ + /* */ + typedef struct TT_LongMetricsRec_ + { + FT_UShort advance; + FT_Short bearing; + + } TT_LongMetricsRec, *TT_LongMetrics; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* TT_ShortMetrics */ + /* */ + /* <Description> */ + /* A simple type to model the short metrics of the `hmtx' and `vmtx' */ + /* tables. */ + /* */ + typedef FT_Short TT_ShortMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_NameEntryRec */ + /* */ + /* <Description> */ + /* A structure modeling TrueType name records. Name records are used */ + /* to store important strings like family name, style name, */ + /* copyright, etc. in _localized_ versions (i.e., language, encoding, */ + /* etc). */ + /* */ + /* <Fields> */ + /* platformID :: The ID of the name's encoding platform. */ + /* */ + /* encodingID :: The platform-specific ID for the name's encoding. */ + /* */ + /* languageID :: The platform-specific ID for the name's language. */ + /* */ + /* nameID :: The ID specifying what kind of name this is. */ + /* */ + /* stringLength :: The length of the string in bytes. */ + /* */ + /* stringOffset :: The offset to the string in the `name' table. */ + /* */ + /* string :: A pointer to the string's bytes. Note that these */ + /* are usually UTF-16 encoded characters. */ + /* */ + typedef struct TT_NameEntryRec_ + { + FT_UShort platformID; + FT_UShort encodingID; + FT_UShort languageID; + FT_UShort nameID; + FT_UShort stringLength; + FT_ULong stringOffset; + + /* this last field is not defined in the spec */ + /* but used by the FreeType engine */ + + FT_Byte* string; + + } TT_NameEntryRec, *TT_NameEntry; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_NameTableRec */ + /* */ + /* <Description> */ + /* A structure modeling the TrueType name table. */ + /* */ + /* <Fields> */ + /* format :: The format of the name table. */ + /* */ + /* numNameRecords :: The number of names in table. */ + /* */ + /* storageOffset :: The offset of the name table in the `name' */ + /* TrueType table. */ + /* */ + /* names :: An array of name records. */ + /* */ + /* stream :: the file's input stream. */ + /* */ + typedef struct TT_NameTableRec_ + { + FT_UShort format; + FT_UInt numNameRecords; + FT_UInt storageOffset; + TT_NameEntryRec* names; + FT_Stream stream; + + } TT_NameTableRec, *TT_NameTable; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GaspRangeRec */ + /* */ + /* <Description> */ + /* A tiny structure used to model a gasp range according to the */ + /* TrueType specification. */ + /* */ + /* <Fields> */ + /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */ + /* */ + /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */ + /* modes to be used. */ + /* */ + typedef struct TT_GaspRangeRec_ + { + FT_UShort maxPPEM; + FT_UShort gaspFlag; + + } TT_GaspRangeRec, *TT_GaspRange; + + +#define TT_GASP_GRIDFIT 0x01 +#define TT_GASP_DOGRAY 0x02 + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GaspRec */ + /* */ + /* <Description> */ + /* A structure modeling the TrueType `gasp' table used to specify */ + /* grid-fitting and anti-aliasing behaviour. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numRanges :: The number of gasp ranges in table. */ + /* */ + /* gaspRanges :: An array of gasp ranges. */ + /* */ + typedef struct TT_Gasp_ + { + FT_UShort version; + FT_UShort numRanges; + TT_GaspRange gaspRanges; + + } TT_GaspRec; + + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HdmxEntryRec */ + /* */ + /* <Description> */ + /* A small structure used to model the pre-computed widths of a given */ + /* size. They are found in the `hdmx' table. */ + /* */ + /* <Fields> */ + /* ppem :: The pixels per EM value at which these metrics apply. */ + /* */ + /* max_width :: The maximum advance width for this metric. */ + /* */ + /* widths :: An array of widths. Note: These are 8-bit bytes. */ + /* */ + typedef struct TT_HdmxEntryRec_ + { + FT_Byte ppem; + FT_Byte max_width; + FT_Byte* widths; + + } TT_HdmxEntryRec, *TT_HdmxEntry; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HdmxRec */ + /* */ + /* <Description> */ + /* A structure used to model the `hdmx' table, which contains */ + /* pre-computed widths for a set of given sizes/dimensions. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* num_records :: The number of hdmx records. */ + /* */ + /* records :: An array of hdmx records. */ + /* */ + typedef struct TT_HdmxRec_ + { + FT_UShort version; + FT_Short num_records; + TT_HdmxEntry records; + + } TT_HdmxRec, *TT_Hdmx; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Kern0_PairRec */ + /* */ + /* <Description> */ + /* A structure used to model a kerning pair for the kerning table */ + /* format 0. The engine now loads this table if it finds one in the */ + /* font file. */ + /* */ + /* <Fields> */ + /* left :: The index of the left glyph in pair. */ + /* */ + /* right :: The index of the right glyph in pair. */ + /* */ + /* value :: The kerning distance. A positive value spaces the */ + /* glyphs, a negative one makes them closer. */ + /* */ + typedef struct TT_Kern0_PairRec_ + { + FT_UShort left; /* index of left glyph in pair */ + FT_UShort right; /* index of right glyph in pair */ + FT_FWord value; /* kerning value */ + + } TT_Kern0_PairRec, *TT_Kern0_Pair; + +#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** EMBEDDED BITMAPS SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_MetricsRec */ + /* */ + /* <Description> */ + /* A structure used to hold the big metrics of a given glyph bitmap */ + /* in a TrueType or OpenType font. These are usually found in the */ + /* `EBDT' (Microsoft) or `bloc' (Apple) table. */ + /* */ + /* <Fields> */ + /* height :: The glyph height in pixels. */ + /* */ + /* width :: The glyph width in pixels. */ + /* */ + /* horiBearingX :: The horizontal left bearing. */ + /* */ + /* horiBearingY :: The horizontal top bearing. */ + /* */ + /* horiAdvance :: The horizontal advance. */ + /* */ + /* vertBearingX :: The vertical left bearing. */ + /* */ + /* vertBearingY :: The vertical top bearing. */ + /* */ + /* vertAdvance :: The vertical advance. */ + /* */ + typedef struct TT_SBit_MetricsRec_ + { + FT_Byte height; + FT_Byte width; + + FT_Char horiBearingX; + FT_Char horiBearingY; + FT_Byte horiAdvance; + + FT_Char vertBearingX; + FT_Char vertBearingY; + FT_Byte vertAdvance; + + } TT_SBit_MetricsRec, *TT_SBit_Metrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_SmallMetricsRec */ + /* */ + /* <Description> */ + /* A structure used to hold the small metrics of a given glyph bitmap */ + /* in a TrueType or OpenType font. These are usually found in the */ + /* `EBDT' (Microsoft) or the `bdat' (Apple) table. */ + /* */ + /* <Fields> */ + /* height :: The glyph height in pixels. */ + /* */ + /* width :: The glyph width in pixels. */ + /* */ + /* bearingX :: The left-side bearing. */ + /* */ + /* bearingY :: The top-side bearing. */ + /* */ + /* advance :: The advance width or height. */ + /* */ + typedef struct TT_SBit_Small_Metrics_ + { + FT_Byte height; + FT_Byte width; + + FT_Char bearingX; + FT_Char bearingY; + FT_Byte advance; + + } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_LineMetricsRec */ + /* */ + /* <Description> */ + /* A structure used to describe the text line metrics of a given */ + /* bitmap strike, for either a horizontal or vertical layout. */ + /* */ + /* <Fields> */ + /* ascender :: The ascender in pixels. */ + /* */ + /* descender :: The descender in pixels. */ + /* */ + /* max_width :: The maximum glyph width in pixels. */ + /* */ + /* caret_slope_enumerator :: Rise of the caret slope, typically set */ + /* to 1 for non-italic fonts. */ + /* */ + /* caret_slope_denominator :: Rise of the caret slope, typically set */ + /* to 0 for non-italic fonts. */ + /* */ + /* caret_offset :: Offset in pixels to move the caret for */ + /* proper positioning. */ + /* */ + /* min_origin_SB :: Minimum of horiBearingX (resp. */ + /* vertBearingY). */ + /* min_advance_SB :: Minimum of */ + /* */ + /* horizontal advance - */ + /* ( horiBearingX + width ) */ + /* */ + /* resp. */ + /* */ + /* vertical advance - */ + /* ( vertBearingY + height ) */ + /* */ + /* max_before_BL :: Maximum of horiBearingY (resp. */ + /* vertBearingY). */ + /* */ + /* min_after_BL :: Minimum of */ + /* */ + /* horiBearingY - height */ + /* */ + /* resp. */ + /* */ + /* vertBearingX - width */ + /* */ + /* pads :: Unused (to make the size of the record */ + /* a multiple of 32 bits. */ + /* */ + typedef struct TT_SBit_LineMetricsRec_ + { + FT_Char ascender; + FT_Char descender; + FT_Byte max_width; + FT_Char caret_slope_numerator; + FT_Char caret_slope_denominator; + FT_Char caret_offset; + FT_Char min_origin_SB; + FT_Char min_advance_SB; + FT_Char max_before_BL; + FT_Char min_after_BL; + FT_Char pads[2]; + + } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_RangeRec */ + /* */ + /* <Description> */ + /* A TrueType/OpenType subIndexTable as defined in the `EBLC' */ + /* (Microsoft) or `bloc' (Apple) tables. */ + /* */ + /* <Fields> */ + /* first_glyph :: The first glyph index in the range. */ + /* */ + /* last_glyph :: The last glyph index in the range. */ + /* */ + /* index_format :: The format of index table. Valid values are 1 */ + /* to 5. */ + /* */ + /* image_format :: The format of `EBDT' image data. */ + /* */ + /* image_offset :: The offset to image data in `EBDT'. */ + /* */ + /* image_size :: For index formats 2 and 5. This is the size in */ + /* bytes of each glyph bitmap. */ + /* */ + /* big_metrics :: For index formats 2 and 5. This is the big */ + /* metrics for each glyph bitmap. */ + /* */ + /* num_glyphs :: For index formats 4 and 5. This is the number of */ + /* glyphs in the code array. */ + /* */ + /* glyph_offsets :: For index formats 1 and 3. */ + /* */ + /* glyph_codes :: For index formats 4 and 5. */ + /* */ + /* table_offset :: The offset of the index table in the `EBLC' */ + /* table. Only used during strike loading. */ + /* */ + typedef struct TT_SBit_RangeRec_ + { + FT_UShort first_glyph; + FT_UShort last_glyph; + + FT_UShort index_format; + FT_UShort image_format; + FT_ULong image_offset; + + FT_ULong image_size; + TT_SBit_MetricsRec metrics; + FT_ULong num_glyphs; + + FT_ULong* glyph_offsets; + FT_UShort* glyph_codes; + + FT_ULong table_offset; + + } TT_SBit_RangeRec, *TT_SBit_Range; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_StrikeRec */ + /* */ + /* <Description> */ + /* A structure used describe a given bitmap strike in the `EBLC' */ + /* (Microsoft) or `bloc' (Apple) tables. */ + /* */ + /* <Fields> */ + /* num_index_ranges :: The number of index ranges. */ + /* */ + /* index_ranges :: An array of glyph index ranges. */ + /* */ + /* color_ref :: Unused. `color_ref' is put in for future */ + /* enhancements, but these fields are already */ + /* in use by other platforms (e.g. Newton). */ + /* For details, please see */ + /* */ + /* http://fonts.apple.com/ */ + /* TTRefMan/RM06/Chap6bloc.html */ + /* */ + /* hori :: The line metrics for horizontal layouts. */ + /* */ + /* vert :: The line metrics for vertical layouts. */ + /* */ + /* start_glyph :: The lowest glyph index for this strike. */ + /* */ + /* end_glyph :: The highest glyph index for this strike. */ + /* */ + /* x_ppem :: The number of horizontal pixels per EM. */ + /* */ + /* y_ppem :: The number of vertical pixels per EM. */ + /* */ + /* bit_depth :: The bit depth. Valid values are 1, 2, 4, */ + /* and 8. */ + /* */ + /* flags :: Is this a vertical or horizontal strike? For */ + /* details, please see */ + /* */ + /* http://fonts.apple.com/ */ + /* TTRefMan/RM06/Chap6bloc.html */ + /* */ + typedef struct TT_SBit_StrikeRec_ + { + FT_Int num_ranges; + TT_SBit_Range sbit_ranges; + FT_ULong ranges_offset; + + FT_ULong color_ref; + + TT_SBit_LineMetricsRec hori; + TT_SBit_LineMetricsRec vert; + + FT_UShort start_glyph; + FT_UShort end_glyph; + + FT_Byte x_ppem; + FT_Byte y_ppem; + + FT_Byte bit_depth; + FT_Char flags; + + } TT_SBit_StrikeRec, *TT_SBit_Strike; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_ComponentRec */ + /* */ + /* <Description> */ + /* A simple structure to describe a compound sbit element. */ + /* */ + /* <Fields> */ + /* glyph_code :: The element's glyph index. */ + /* */ + /* x_offset :: The element's left bearing. */ + /* */ + /* y_offset :: The element's top bearing. */ + /* */ + typedef struct TT_SBit_ComponentRec_ + { + FT_UShort glyph_code; + FT_Char x_offset; + FT_Char y_offset; + + } TT_SBit_ComponentRec, *TT_SBit_Component; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_SBit_ScaleRec */ + /* */ + /* <Description> */ + /* A structure used describe a given bitmap scaling table, as defined */ + /* in the `EBSC' table. */ + /* */ + /* <Fields> */ + /* hori :: The horizontal line metrics. */ + /* */ + /* vert :: The vertical line metrics. */ + /* */ + /* x_ppem :: The number of horizontal pixels per EM. */ + /* */ + /* y_ppem :: The number of vertical pixels per EM. */ + /* */ + /* x_ppem_substitute :: Substitution x_ppem value. */ + /* */ + /* y_ppem_substitute :: Substitution y_ppem value. */ + /* */ + typedef struct TT_SBit_ScaleRec_ + { + TT_SBit_LineMetricsRec hori; + TT_SBit_LineMetricsRec vert; + + FT_Byte x_ppem; + FT_Byte y_ppem; + + FT_Byte x_ppem_substitute; + FT_Byte y_ppem_substitute; + + } TT_SBit_ScaleRec, *TT_SBit_Scale; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_20Rec */ + /* */ + /* <Description> */ + /* Postscript names sub-table, format 2.0. Stores the PS name of */ + /* each glyph in the font face. */ + /* */ + /* <Fields> */ + /* num_glyphs :: The number of named glyphs in the table. */ + /* */ + /* num_names :: The number of PS names stored in the table. */ + /* */ + /* glyph_indices :: The indices of the glyphs in the names arrays. */ + /* */ + /* glyph_names :: The PS names not in Mac Encoding. */ + /* */ + typedef struct TT_Post_20Rec_ + { + FT_UShort num_glyphs; + FT_UShort num_names; + FT_UShort* glyph_indices; + FT_Char** glyph_names; + + } TT_Post_20Rec, *TT_Post_20; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_25Rec */ + /* */ + /* <Description> */ + /* Postscript names sub-table, format 2.5. Stores the PS name of */ + /* each glyph in the font face. */ + /* */ + /* <Fields> */ + /* num_glyphs :: The number of glyphs in the table. */ + /* */ + /* offsets :: An array of signed offsets in a normal Mac */ + /* Postscript name encoding. */ + /* */ + typedef struct TT_Post_25_ + { + FT_UShort num_glyphs; + FT_Char* offsets; + + } TT_Post_25Rec, *TT_Post_25; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Post_NamesRec */ + /* */ + /* <Description> */ + /* Postscript names table, either format 2.0 or 2.5. */ + /* */ + /* <Fields> */ + /* loaded :: A flag to indicate whether the PS names are loaded. */ + /* */ + /* format_20 :: The sub-table used for format 2.0. */ + /* */ + /* format_25 :: The sub-table used for format 2.5. */ + /* */ + typedef struct TT_Post_NamesRec_ + { + FT_Bool loaded; + + union + { + TT_Post_20Rec format_20; + TT_Post_25Rec format_25; + + } names; + + } TT_Post_NamesRec, *TT_Post_Names; + + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** GX VARIATION TABLE SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + typedef struct GX_BlendRec_ *GX_Blend; +#endif + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * These types are used to support a `BDF ' table that isn't part of the + * official TrueType specification. It is mainly used in SFNT-based + * bitmap fonts that were generated from a set of BDF fonts. + * + * The format of the table is as follows. + * + * USHORT version `BDF ' table version number, should be 0x0001. + * USHORT strikeCount Number of strikes (bitmap sizes) in this table. + * ULONG stringTable Offset (from start of BDF table) to string + * table. + * + * This is followed by an array of `strikeCount' descriptors, having the + * following format. + * + * USHORT ppem Vertical pixels per EM for this strike. + * USHORT numItems Number of items for this strike (properties and + * atoms). Maximum is 255. + * + * This array in turn is followed by `strikeCount' value sets. Each + * `value set' is an array of `numItems' items with the following format. + * + * ULONG item_name Offset in string table to item name. + * USHORT item_type The item type. Possible values are + * 0 => string (e.g., COMMENT) + * 1 => atom (e.g., FONT or even SIZE) + * 2 => int32 + * 3 => uint32 + * 0x10 => A flag to indicate a properties. This + * is ORed with the above values. + * ULONG item_value For strings => Offset into string table without + * the corresponding double quotes. + * For atoms => Offset into string table. + * For integers => Direct value. + * + * All strings in the string table consist of bytes and are + * zero-terminated. + * + */ + +#ifdef TT_CONFIG_OPTION_BDF + + typedef struct TT_BDFRec_ + { + FT_Byte* table; + FT_Byte* table_end; + FT_Byte* strings; + FT_ULong strings_size; + FT_UInt num_strikes; + FT_Bool loaded; + + } TT_BDFRec, *TT_BDF; + +#endif /* TT_CONFIG_OPTION_BDF */ + + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + /*** ***/ + /*** ***/ + /*** ORIGINAL TT_FACE CLASS DEFINITION ***/ + /*** ***/ + /*** ***/ + /*************************************************************************/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This structure/class is defined here because it is common to the */ + /* following formats: TTF, OpenType-TT, and OpenType-CFF. */ + /* */ + /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */ + /* shared between font drivers, and are thus defined in `ttobjs.h'. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* TT_Face */ + /* */ + /* <Description> */ + /* A handle to a TrueType face/font object. A TT_Face encapsulates */ + /* the resolution and scaling independent parts of a TrueType font */ + /* resource. */ + /* */ + /* <Note> */ + /* The TT_Face structure is also used as a `parent class' for the */ + /* OpenType-CFF class (T2_Face). */ + /* */ + typedef struct TT_FaceRec_* TT_Face; + + + /* a function type used for the truetype bytecode interpreter hooks */ + typedef FT_Error + (*TT_Interpreter)( void* exec_context ); + + /* forward declaration */ + typedef struct TT_LoaderRec_* TT_Loader; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_GotoTableFunc */ + /* */ + /* <Description> */ + /* Seeks a stream to the start of a given TrueType table. */ + /* */ + /* <Input> */ + /* face :: A handle to the target face object. */ + /* */ + /* tag :: A 4-byte tag used to name the table. */ + /* */ + /* stream :: The input stream. */ + /* */ + /* <Output> */ + /* length :: The length of the table in bytes. Set to 0 if not */ + /* needed. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* The stream cursor must be at the font file's origin. */ + /* */ + typedef FT_Error + (*TT_Loader_GotoTableFunc)( TT_Face face, + FT_ULong tag, + FT_Stream stream, + FT_ULong* length ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_StartGlyphFunc */ + /* */ + /* <Description> */ + /* Seeks a stream to the start of a given glyph element, and opens a */ + /* frame for it. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + /* glyph index :: The index of the glyph to access. */ + /* */ + /* offset :: The offset of the glyph according to the */ + /* `locations' table. */ + /* */ + /* byte_count :: The size of the frame in bytes. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + /* <Note> */ + /* This function is normally equivalent to FT_STREAM_SEEK(offset) */ + /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */ + /* but alternative formats (e.g. compressed ones) might use something */ + /* different. */ + /* */ + typedef FT_Error + (*TT_Loader_StartGlyphFunc)( TT_Loader loader, + FT_UInt glyph_index, + FT_ULong offset, + FT_UInt byte_count ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_ReadGlyphFunc */ + /* */ + /* <Description> */ + /* Reads one glyph element (its header, a simple glyph, or a */ + /* composite) from the loader's current stream frame. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + typedef FT_Error + (*TT_Loader_ReadGlyphFunc)( TT_Loader loader ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Loader_EndGlyphFunc */ + /* */ + /* <Description> */ + /* Closes the current loader stream frame for the glyph. */ + /* */ + /* <Input> */ + /* loader :: The current TrueType glyph loader object. */ + /* */ + typedef void + (*TT_Loader_EndGlyphFunc)( TT_Loader loader ); + + + /*************************************************************************/ + /* */ + /* TrueType Face Type */ + /* */ + /* <Struct> */ + /* TT_Face */ + /* */ + /* <Description> */ + /* The TrueType face class. These objects model the resolution and */ + /* point-size independent data found in a TrueType font file. */ + /* */ + /* <Fields> */ + /* root :: The base FT_Face structure, managed by the */ + /* base layer. */ + /* */ + /* ttc_header :: The TrueType collection header, used when */ + /* the file is a `ttc' rather than a `ttf'. */ + /* For ordinary font files, the field */ + /* `ttc_header.count' is set to 0. */ + /* */ + /* format_tag :: The font format tag. */ + /* */ + /* num_tables :: The number of TrueType tables in this font */ + /* file. */ + /* */ + /* dir_tables :: The directory of TrueType tables for this */ + /* font file. */ + /* */ + /* header :: The font's font header (`head' table). */ + /* Read on font opening. */ + /* */ + /* horizontal :: The font's horizontal header (`hhea' */ + /* table). This field also contains the */ + /* associated horizontal metrics table */ + /* (`hmtx'). */ + /* */ + /* max_profile :: The font's maximum profile table. Read on */ + /* font opening. Note that some maximum */ + /* values cannot be taken directly from this */ + /* table. We thus define additional fields */ + /* below to hold the computed maxima. */ + /* */ + /* vertical_info :: A boolean which is set when the font file */ + /* contains vertical metrics. If not, the */ + /* value of the `vertical' field is */ + /* undefined. */ + /* */ + /* vertical :: The font's vertical header (`vhea' table). */ + /* This field also contains the associated */ + /* vertical metrics table (`vmtx'), if found. */ + /* IMPORTANT: The contents of this field is */ + /* undefined if the `verticalInfo' field is */ + /* unset. */ + /* */ + /* num_names :: The number of name records within this */ + /* TrueType font. */ + /* */ + /* name_table :: The table of name records (`name'). */ + /* */ + /* os2 :: The font's OS/2 table (`OS/2'). */ + /* */ + /* postscript :: The font's PostScript table (`post' */ + /* table). The PostScript glyph names are */ + /* not loaded by the driver on face opening. */ + /* See the `ttpost' module for more details. */ + /* */ + /* cmap_table :: Address of the face's `cmap' SFNT table */ + /* in memory (it's an extracted frame). */ + /* */ + /* cmap_size :: The size in bytes of the `cmap_table' */ + /* described above. */ + /* */ + /* goto_table :: A function called by each TrueType table */ + /* loader to position a stream's cursor to */ + /* the start of a given table according to */ + /* its tag. It defaults to TT_Goto_Face but */ + /* can be different for strange formats (e.g. */ + /* Type 42). */ + /* */ + /* access_glyph_frame :: A function used to access the frame of a */ + /* given glyph within the face's font file. */ + /* */ + /* forget_glyph_frame :: A function used to forget the frame of a */ + /* given glyph when all data has been loaded. */ + /* */ + /* read_glyph_header :: A function used to read a glyph header. */ + /* It must be called between an `access' and */ + /* `forget'. */ + /* */ + /* read_simple_glyph :: A function used to read a simple glyph. */ + /* It must be called after the header was */ + /* read, and before the `forget'. */ + /* */ + /* read_composite_glyph :: A function used to read a composite glyph. */ + /* It must be called after the header was */ + /* read, and before the `forget'. */ + /* */ + /* sfnt :: A pointer to the SFNT service. */ + /* */ + /* psnames :: A pointer to the PostScript names service. */ + /* */ + /* hdmx :: The face's horizontal device metrics */ + /* (`hdmx' table). This table is optional in */ + /* TrueType/OpenType fonts. */ + /* */ + /* gasp :: The grid-fitting and scaling properties */ + /* table (`gasp'). This table is optional in */ + /* TrueType/OpenType fonts. */ + /* */ + /* pclt :: The `pclt' SFNT table. */ + /* */ + /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */ + /* sizes, embedded in this font. */ + /* */ + /* sbit_strikes :: An array of sbit strikes embedded in this */ + /* font. This table is optional in a */ + /* TrueType/OpenType font. */ + /* */ + /* num_sbit_scales :: The number of sbit scales for this font. */ + /* */ + /* sbit_scales :: Array of sbit scales embedded in this */ + /* font. This table is optional in a */ + /* TrueType/OpenType font. */ + /* */ + /* postscript_names :: A table used to store the Postscript names */ + /* of the glyphs for this font. See the */ + /* file `ttconfig.h' for comments on the */ + /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */ + /* */ + /* num_locations :: The number of glyph locations in this */ + /* TrueType file. This should be */ + /* identical to the number of glyphs. */ + /* Ignored for Type 2 fonts. */ + /* */ + /* glyph_locations :: An array of longs. These are offsets to */ + /* glyph data within the `glyf' table. */ + /* Ignored for Type 2 font faces. */ + /* */ + /* glyf_len :: The length of the `glyf' table. Needed */ + /* for malformed `loca' tables. */ + /* */ + /* font_program_size :: Size in bytecodes of the face's font */ + /* program. 0 if none defined. Ignored for */ + /* Type 2 fonts. */ + /* */ + /* font_program :: The face's font program (bytecode stream) */ + /* executed at load time, also used during */ + /* glyph rendering. Comes from the `fpgm' */ + /* table. Ignored for Type 2 font fonts. */ + /* */ + /* cvt_program_size :: The size in bytecodes of the face's cvt */ + /* program. Ignored for Type 2 fonts. */ + /* */ + /* cvt_program :: The face's cvt program (bytecode stream) */ + /* executed each time an instance/size is */ + /* changed/reset. Comes from the `prep' */ + /* table. Ignored for Type 2 fonts. */ + /* */ + /* cvt_size :: Size of the control value table (in */ + /* entries). Ignored for Type 2 fonts. */ + /* */ + /* cvt :: The face's original control value table. */ + /* Coordinates are expressed in unscaled font */ + /* units. Comes from the `cvt ' table. */ + /* Ignored for Type 2 fonts. */ + /* */ + /* num_kern_pairs :: The number of kerning pairs present in the */ + /* font file. The engine only loads the */ + /* first horizontal format 0 kern table it */ + /* finds in the font file. Ignored for */ + /* Type 2 fonts. */ + /* */ + /* kern_table_index :: The index of the kerning table in the font */ + /* kerning directory. Ignored for Type 2 */ + /* fonts. */ + /* */ + /* interpreter :: A pointer to the TrueType bytecode */ + /* interpreters field is also used to hook */ + /* the debugger in `ttdebug'. */ + /* */ + /* unpatented_hinting :: If true, use only unpatented methods in */ + /* the bytecode interpreter. */ + /* */ + /* doblend :: A boolean which is set if the font should */ + /* be blended (this is for GX var). */ + /* */ + /* blend :: Contains the data needed to control GX */ + /* variation tables (rather like Multiple */ + /* Master data). */ + /* */ + /* extra :: Reserved for third-party font drivers. */ + /* */ + /* postscript_name :: The PS name of the font. Used by the */ + /* postscript name service. */ + /* */ + typedef struct TT_FaceRec_ + { + FT_FaceRec root; + + TTC_HeaderRec ttc_header; + + FT_ULong format_tag; + FT_UShort num_tables; + TT_Table dir_tables; + + TT_Header header; /* TrueType header table */ + TT_HoriHeader horizontal; /* TrueType horizontal header */ + + TT_MaxProfile max_profile; +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_ULong max_components; /* stubbed to 0 */ +#endif + + FT_Bool vertical_info; + TT_VertHeader vertical; /* TT Vertical header, if present */ + + FT_UShort num_names; /* number of name records */ + TT_NameTableRec name_table; /* name table */ + + TT_OS2 os2; /* TrueType OS/2 table */ + TT_Postscript postscript; /* TrueType Postscript table */ + + FT_Byte* cmap_table; /* extracted `cmap' table */ + FT_ULong cmap_size; + + TT_Loader_GotoTableFunc goto_table; + + TT_Loader_StartGlyphFunc access_glyph_frame; + TT_Loader_EndGlyphFunc forget_glyph_frame; + TT_Loader_ReadGlyphFunc read_glyph_header; + TT_Loader_ReadGlyphFunc read_simple_glyph; + TT_Loader_ReadGlyphFunc read_composite_glyph; + + /* a typeless pointer to the SFNT_Interface table used to load */ + /* the basic TrueType tables in the face object */ + void* sfnt; + + /* a typeless pointer to the FT_Service_PsCMapsRec table used to */ + /* handle glyph names <-> unicode & Mac values */ + void* psnames; + + + /***********************************************************************/ + /* */ + /* Optional TrueType/OpenType tables */ + /* */ + /***********************************************************************/ + + /* horizontal device metrics */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + TT_HdmxRec hdmx; +#endif + + /* grid-fitting and scaling table */ + TT_GaspRec gasp; /* the `gasp' table */ + + /* PCL 5 table */ + TT_PCLT pclt; + + /* embedded bitmaps support */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_ULong num_sbit_strikes; + TT_SBit_Strike sbit_strikes; +#endif + + FT_ULong num_sbit_scales; + TT_SBit_Scale sbit_scales; + + /* postscript names table */ + TT_Post_NamesRec postscript_names; + + + /***********************************************************************/ + /* */ + /* TrueType-specific fields (ignored by the OTF-Type2 driver) */ + /* */ + /***********************************************************************/ + + /* the glyph locations */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_UShort num_locations_stub; + FT_Long* glyph_locations_stub; +#endif + + /* the font program, if any */ + FT_ULong font_program_size; + FT_Byte* font_program; + + /* the cvt program, if any */ + FT_ULong cvt_program_size; + FT_Byte* cvt_program; + + /* the original, unscaled, control value table */ + FT_ULong cvt_size; + FT_Short* cvt; + +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + /* the format 0 kerning table, if any */ + FT_Int num_kern_pairs; + FT_Int kern_table_index; + TT_Kern0_Pair kern_pairs; +#endif + + /* A pointer to the bytecode interpreter to use. This is also */ + /* used to hook the debugger for the `ttdebug' utility. */ + TT_Interpreter interpreter; + +#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + /* Use unpatented hinting only. */ + FT_Bool unpatented_hinting; +#endif + + /***********************************************************************/ + /* */ + /* Other tables or fields. This is used by derivative formats like */ + /* OpenType. */ + /* */ + /***********************************************************************/ + + FT_Generic extra; + + const char* postscript_name; + + /* since version 2.1.8, but was originally placed after */ + /* `glyph_locations_stub' */ + FT_ULong glyf_len; + + /* since version 2.1.8, but was originally placed before `extra' */ +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + FT_Bool doblend; + GX_Blend blend; +#endif + + /* since version 2.2 */ + + FT_Byte* horz_metrics; + FT_ULong horz_metrics_size; + + FT_Byte* vert_metrics; + FT_ULong vert_metrics_size; + + FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */ + FT_Byte* glyph_locations; + + FT_Byte* hdmx_table; + FT_ULong hdmx_table_size; + FT_UInt hdmx_record_count; + FT_ULong hdmx_record_size; + FT_Byte* hdmx_record_sizes; + + FT_Byte* sbit_table; + FT_ULong sbit_table_size; + FT_UInt sbit_num_strikes; + + FT_Byte* kern_table; + FT_ULong kern_table_size; + FT_UInt num_kern_tables; + FT_UInt32 kern_avail_bits; + FT_UInt32 kern_order_bits; + +#ifdef TT_CONFIG_OPTION_BDF + TT_BDFRec bdf; +#endif /* TT_CONFIG_OPTION_BDF */ + + /* since 2.3.0 */ + FT_ULong horz_metrics_offset; + FT_ULong vert_metrics_offset; + + } TT_FaceRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_GlyphZoneRec */ + /* */ + /* <Description> */ + /* A glyph zone is used to load, scale and hint glyph outline */ + /* coordinates. */ + /* */ + /* <Fields> */ + /* memory :: A handle to the memory manager. */ + /* */ + /* max_points :: The maximal size in points of the zone. */ + /* */ + /* max_contours :: Max size in links contours of the zone. */ + /* */ + /* n_points :: The current number of points in the zone. */ + /* */ + /* n_contours :: The current number of contours in the zone. */ + /* */ + /* org :: The original glyph coordinates (font */ + /* units/scaled). */ + /* */ + /* cur :: The current glyph coordinates (scaled/hinted). */ + /* */ + /* tags :: The point control tags. */ + /* */ + /* contours :: The contours end points. */ + /* */ + /* first_point :: Offset of the current subglyph's first point. */ + /* */ + typedef struct TT_GlyphZoneRec_ + { + FT_Memory memory; + FT_UShort max_points; + FT_UShort max_contours; + FT_UShort n_points; /* number of points in zone */ + FT_Short n_contours; /* number of contours */ + + FT_Vector* org; /* original point coordinates */ + FT_Vector* cur; /* current point coordinates */ + FT_Vector* orus; /* original (unscaled) point coordinates */ + + FT_Byte* tags; /* current touch flags */ + FT_UShort* contours; /* contour end points */ + + FT_UShort first_point; /* offset of first (#0) point */ + + } TT_GlyphZoneRec, *TT_GlyphZone; + + + /* handle to execution context */ + typedef struct TT_ExecContextRec_* TT_ExecContext; + + /* glyph loader structure */ + typedef struct TT_LoaderRec_ + { + FT_Face face; + FT_Size size; + FT_GlyphSlot glyph; + FT_GlyphLoader gloader; + + FT_ULong load_flags; + FT_UInt glyph_index; + + FT_Stream stream; + FT_Int byte_len; + + FT_Short n_contours; + FT_BBox bbox; + FT_Int left_bearing; + FT_Int advance; + FT_Int linear; + FT_Bool linear_def; + FT_Bool preserve_pps; + FT_Vector pp1; + FT_Vector pp2; + + FT_ULong glyf_offset; + + /* the zone where we load our glyphs */ + TT_GlyphZoneRec base; + TT_GlyphZoneRec zone; + + TT_ExecContext exec; + FT_Byte* instructions; + FT_ULong ins_pos; + + /* for possible extensibility in other formats */ + void* other; + + /* since version 2.1.8 */ + FT_Int top_bearing; + FT_Int vadvance; + FT_Vector pp3; + FT_Vector pp4; + + /* since version 2.2.1 */ + FT_Byte* cursor; + FT_Byte* limit; + + } TT_LoaderRec; + + +FT_END_HEADER + +#endif /* __TTTYPES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/t1tables.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/t1tables.h new file mode 100644 index 0000000..db1a91e --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/t1tables.h @@ -0,0 +1,662 @@ +/***************************************************************************/ +/* */ +/* t1tables.h */ +/* */ +/* Basic Type 1/Type 2 tables definitions and interface (specification */ +/* only). */ +/* */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __T1TABLES_H__ +#define __T1TABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* type1_tables */ + /* */ + /* <Title> */ + /* Type 1 Tables */ + /* */ + /* <Abstract> */ + /* Type~1 (PostScript) specific font tables. */ + /* */ + /* <Description> */ + /* This section contains the definition of Type 1-specific tables, */ + /* including structures related to other PostScript font formats. */ + /* */ + /*************************************************************************/ + + + /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ + /* structures in order to support Multiple Master fonts. */ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfoRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* FontInfo dictionary. */ + /* */ + typedef struct PS_FontInfoRec_ + { + FT_String* version; + FT_String* notice; + FT_String* full_name; + FT_String* family_name; + FT_String* weight; + FT_Long italic_angle; + FT_Bool is_fixed_pitch; + FT_Short underline_position; + FT_UShort underline_thickness; + + } PS_FontInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_FontInfo */ + /* */ + /* <Description> */ + /* A handle to a @PS_FontInfoRec structure. */ + /* */ + typedef struct PS_FontInfoRec_* PS_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_FontInfo */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_FontInfoRec T1_FontInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_PrivateRec */ + /* */ + /* <Description> */ + /* A structure used to model a Type~1 or Type~2 private dictionary. */ + /* Note that for Multiple Master fonts, each instance has its own */ + /* Private dictionary. */ + /* */ + typedef struct PS_PrivateRec_ + { + FT_Int unique_id; + FT_Int lenIV; + + FT_Byte num_blue_values; + FT_Byte num_other_blues; + FT_Byte num_family_blues; + FT_Byte num_family_other_blues; + + FT_Short blue_values[14]; + FT_Short other_blues[10]; + + FT_Short family_blues [14]; + FT_Short family_other_blues[10]; + + FT_Fixed blue_scale; + FT_Int blue_shift; + FT_Int blue_fuzz; + + FT_UShort standard_width[1]; + FT_UShort standard_height[1]; + + FT_Byte num_snap_widths; + FT_Byte num_snap_heights; + FT_Bool force_bold; + FT_Bool round_stem_up; + + FT_Short snap_widths [13]; /* including std width */ + FT_Short snap_heights[13]; /* including std height */ + + FT_Fixed expansion_factor; + + FT_Long language_group; + FT_Long password; + + FT_Short min_feature[2]; + + } PS_PrivateRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* PS_Private */ + /* */ + /* <Description> */ + /* A handle to a @PS_PrivateRec structure. */ + /* */ + typedef struct PS_PrivateRec_* PS_Private; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* T1_Private */ + /* */ + /* <Description> */ + /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef PS_PrivateRec T1_Private; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_Blend_Flags */ + /* */ + /* <Description> */ + /* A set of flags used to indicate which fields are present in a */ + /* given blend dictionary (font info or private). Used to support */ + /* Multiple Masters fonts. */ + /* */ + typedef enum T1_Blend_Flags_ + { + /*# required fields in a FontInfo blend dictionary */ + T1_BLEND_UNDERLINE_POSITION = 0, + T1_BLEND_UNDERLINE_THICKNESS, + T1_BLEND_ITALIC_ANGLE, + + /*# required fields in a Private blend dictionary */ + T1_BLEND_BLUE_VALUES, + T1_BLEND_OTHER_BLUES, + T1_BLEND_STANDARD_WIDTH, + T1_BLEND_STANDARD_HEIGHT, + T1_BLEND_STEM_SNAP_WIDTHS, + T1_BLEND_STEM_SNAP_HEIGHTS, + T1_BLEND_BLUE_SCALE, + T1_BLEND_BLUE_SHIFT, + T1_BLEND_FAMILY_BLUES, + T1_BLEND_FAMILY_OTHER_BLUES, + T1_BLEND_FORCE_BOLD, + + /*# never remove */ + T1_BLEND_MAX + + } T1_Blend_Flags; + + /* */ + + + /*# backwards compatible definitions */ +#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION +#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS +#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE +#define t1_blend_blue_values T1_BLEND_BLUE_VALUES +#define t1_blend_other_blues T1_BLEND_OTHER_BLUES +#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH +#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT +#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS +#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS +#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE +#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT +#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES +#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES +#define t1_blend_force_bold T1_BLEND_FORCE_BOLD +#define t1_blend_max T1_BLEND_MAX + + + /* maximum number of Multiple Masters designs, as defined in the spec */ +#define T1_MAX_MM_DESIGNS 16 + + /* maximum number of Multiple Masters axes, as defined in the spec */ +#define T1_MAX_MM_AXIS 4 + + /* maximum number of elements in a design map */ +#define T1_MAX_MM_MAP_POINTS 20 + + + /* this structure is used to store the BlendDesignMap entry for an axis */ + typedef struct PS_DesignMap_ + { + FT_Byte num_points; + FT_Long* design_points; + FT_Fixed* blend_points; + + } PS_DesignMapRec, *PS_DesignMap; + + /* backwards-compatible definition */ + typedef PS_DesignMapRec T1_DesignMap; + + + typedef struct PS_BlendRec_ + { + FT_UInt num_designs; + FT_UInt num_axis; + + FT_String* axis_names[T1_MAX_MM_AXIS]; + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; + + FT_Fixed* weight_vector; + FT_Fixed* default_weight_vector; + + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; + + FT_ULong blend_bitflags; + + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; + + /* since 2.3.0 */ + + /* undocumented, optional: the default design instance; */ + /* corresponds to default_weight_vector -- */ + /* num_default_design_vector == 0 means it is not present */ + /* in the font and associated metrics files */ + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; + FT_UInt num_default_design_vector; + + } PS_BlendRec, *PS_Blend; + + + /* backwards-compatible definition */ + typedef PS_BlendRec T1_Blend; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDictRec */ + /* */ + /* <Description> */ + /* A structure used to represent data in a CID top-level dictionary. */ + /* */ + typedef struct CID_FaceDictRec_ + { + PS_PrivateRec private_dict; + + FT_UInt len_buildchar; + FT_Fixed forcebold_threshold; + FT_Pos stroke_width; + FT_Fixed expansion_factor; + + FT_Byte paint_type; + FT_Byte font_type; + FT_Matrix font_matrix; + FT_Vector font_offset; + + FT_UInt num_subrs; + FT_ULong subrmap_offset; + FT_Int sd_bytes; + + } CID_FaceDictRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceDict */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceDictRec structure. */ + /* */ + typedef struct CID_FaceDictRec_* CID_FaceDict; + + /* */ + + + /* backwards-compatible definition */ + typedef CID_FaceDictRec CID_FontDict; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfoRec */ + /* */ + /* <Description> */ + /* A structure used to represent CID Face information. */ + /* */ + typedef struct CID_FaceInfoRec_ + { + FT_String* cid_font_name; + FT_Fixed cid_version; + FT_Int cid_font_type; + + FT_String* registry; + FT_String* ordering; + FT_Int supplement; + + PS_FontInfoRec font_info; + FT_BBox font_bbox; + FT_ULong uid_base; + + FT_Int num_xuid; + FT_ULong xuid[16]; + + FT_ULong cidmap_offset; + FT_Int fd_bytes; + FT_Int gd_bytes; + FT_ULong cid_count; + + FT_Int num_dicts; + CID_FaceDict font_dicts; + + FT_ULong data_offset; + + } CID_FaceInfoRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FaceInfo */ + /* */ + /* <Description> */ + /* A handle to a @CID_FaceInfoRec structure. */ + /* */ + typedef struct CID_FaceInfoRec_* CID_FaceInfo; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_Info */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ + typedef CID_FaceInfoRec CID_Info; + + + /************************************************************************ + * + * @function: + * FT_Has_PS_Glyph_Names + * + * @description: + * Return true if a given face provides reliable PostScript glyph + * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, + * except that certain fonts (mostly TrueType) contain incorrect + * glyph name tables. + * + * When this function returns true, the caller is sure that the glyph + * names returned by @FT_Get_Glyph_Name are reliable. + * + * @input: + * face :: + * face handle + * + * @return: + * Boolean. True if glyph names are reliable. + * + */ + FT_EXPORT( FT_Int ) + FT_Has_PS_Glyph_Names( FT_Face face ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Info + * + * @description: + * Retrieve the @PS_FontInfoRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_info :: + * Output font info structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the font info structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function will + * return the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Info( FT_Face face, + PS_FontInfo afont_info ); + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Private + * + * @description: + * Retrieve the @PS_PrivateRec structure corresponding to a given + * PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * @output: + * afont_private :: + * Output private dictionary structure pointer. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The string pointers within the @PS_PrivateRec structure are owned by + * the face and don't need to be freed by the caller. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Error ) + FT_Get_PS_Font_Private( FT_Face face, + PS_Private afont_private ); + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* T1_EncodingType */ + /* */ + /* <Description> */ + /* An enumeration describing the `Encoding' entry in a Type 1 */ + /* dictionary. */ + /* */ + typedef enum T1_EncodingType_ + { + T1_ENCODING_TYPE_NONE = 0, + T1_ENCODING_TYPE_ARRAY, + T1_ENCODING_TYPE_STANDARD, + T1_ENCODING_TYPE_ISOLATIN1, + T1_ENCODING_TYPE_EXPERT + + } T1_EncodingType; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* PS_Dict_Keys */ + /* */ + /* <Description> */ + /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ + /* the Type~1 dictionary entry to retrieve. */ + /* */ + typedef enum PS_Dict_Keys_ + { + /* conventionally in the font dictionary */ + PS_DICT_FONT_TYPE, /* FT_Byte */ + PS_DICT_FONT_MATRIX, /* FT_Fixed */ + PS_DICT_FONT_BBOX, /* FT_Fixed */ + PS_DICT_PAINT_TYPE, /* FT_Byte */ + PS_DICT_FONT_NAME, /* FT_String* */ + PS_DICT_UNIQUE_ID, /* FT_Int */ + PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */ + PS_DICT_CHAR_STRING_KEY, /* FT_String* */ + PS_DICT_CHAR_STRING, /* FT_String* */ + PS_DICT_ENCODING_TYPE, /* T1_EncodingType */ + PS_DICT_ENCODING_ENTRY, /* FT_String* */ + + /* conventionally in the font Private dictionary */ + PS_DICT_NUM_SUBRS, /* FT_Int */ + PS_DICT_SUBR, /* FT_String* */ + PS_DICT_STD_HW, /* FT_UShort */ + PS_DICT_STD_VW, /* FT_UShort */ + PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */ + PS_DICT_BLUE_VALUE, /* FT_Short */ + PS_DICT_BLUE_FUZZ, /* FT_Int */ + PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */ + PS_DICT_OTHER_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_BLUE, /* FT_Short */ + PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */ + PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */ + PS_DICT_BLUE_SCALE, /* FT_Fixed */ + PS_DICT_BLUE_SHIFT, /* FT_Int */ + PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */ + PS_DICT_STEM_SNAP_H, /* FT_Short */ + PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */ + PS_DICT_STEM_SNAP_V, /* FT_Short */ + PS_DICT_FORCE_BOLD, /* FT_Bool */ + PS_DICT_RND_STEM_UP, /* FT_Bool */ + PS_DICT_MIN_FEATURE, /* FT_Short */ + PS_DICT_LEN_IV, /* FT_Int */ + PS_DICT_PASSWORD, /* FT_Long */ + PS_DICT_LANGUAGE_GROUP, /* FT_Long */ + + /* conventionally in the font FontInfo dictionary */ + PS_DICT_VERSION, /* FT_String* */ + PS_DICT_NOTICE, /* FT_String* */ + PS_DICT_FULL_NAME, /* FT_String* */ + PS_DICT_FAMILY_NAME, /* FT_String* */ + PS_DICT_WEIGHT, /* FT_String */ + PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ + PS_DICT_UNDERLINE_POSITION, /* FT_Short */ + PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ + PS_DICT_FS_TYPE, /* FT_UShort */ + PS_DICT_ITALIC_ANGLE, /* FT_Long */ + + PS_DICT_MAX = PS_DICT_ITALIC_ANGLE + + } PS_Dict_Keys; + + + /************************************************************************ + * + * @function: + * FT_Get_PS_Font_Value + * + * @description: + * Retrieve the value for the supplied key from a PostScript font. + * + * @input: + * face :: + * PostScript face handle. + * + * key :: + * An enumeration value representing the dictionary key to retrieve. + * + * idx :: + * For array values, this specifies the index to be returned. + * + * value :: + * A pointer to memory into which to write the value. + * + * valen_len :: + * The size, in bytes, of the memory supplied for the value. + * + * @output: + * value :: + * The value matching the above key, if it exists. + * + * @return: + * The amount of memory (in bytes) required to hold the requested + * value (if it exists, -1 otherwise). + * + * @note: + * The values returned are not pointers into the internal structures of + * the face, but are `fresh' copies, so that the memory containing them + * belongs to the calling application. This also enforces the + * `read-only' nature of these values, i.e., this function cannot be + * used to manipulate the face. + * + * `value' is a void pointer because the values returned can be of + * various types. + * + * If either `value' is NULL or `value_len' is too small, just the + * required memory size for the requested entry is returned. + * + * The `idx' parameter is used, not only to retrieve elements of, for + * example, the FontMatrix or FontBBox, but also to retrieve name keys + * from the CharStrings dictionary, and the charstrings themselves. It + * is ignored for atomic values. + * + * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To + * get the value as in the font stream, you need to divide by + * 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). + * + * IMPORTANT: Only key/value pairs read by the FreeType interpreter can + * be retrieved. So, for example, PostScript procedures such as NP, + * ND, and RD are not available. Arbitrary keys are, obviously, not be + * available either. + * + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument' error code. + * + */ + FT_EXPORT( FT_Long ) + FT_Get_PS_Font_Value( FT_Face face, + PS_Dict_Keys key, + FT_UInt idx, + void *value, + FT_Long value_len ); + + /* */ + +FT_END_HEADER + +#endif /* __T1TABLES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ttnameid.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ttnameid.h new file mode 100644 index 0000000..66aef04 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ttnameid.h @@ -0,0 +1,1247 @@ +/***************************************************************************/ +/* */ +/* ttnameid.h */ +/* */ +/* TrueType name ID definitions (specification only). */ +/* */ +/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTNAMEID_H__ +#define __TTNAMEID_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + + + /*************************************************************************/ + /* */ + /* Possible values for the `platform' identifier code in the name */ + /* records of the TTF `name' table. */ + /* */ + /*************************************************************************/ + + + /*********************************************************************** + * + * @enum: + * TT_PLATFORM_XXX + * + * @description: + * A list of valid values for the `platform_id' identifier code in + * @FT_CharMapRec and @FT_SfntName structures. + * + * @values: + * TT_PLATFORM_APPLE_UNICODE :: + * Used by Apple to indicate a Unicode character map and/or name entry. + * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note + * that name entries in this format are coded as big-endian UCS-2 + * character codes _only_. + * + * TT_PLATFORM_MACINTOSH :: + * Used by Apple to indicate a MacOS-specific charmap and/or name entry. + * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that + * most TrueType fonts contain an Apple roman charmap to be usable on + * MacOS systems (even if they contain a Microsoft charmap as well). + * + * TT_PLATFORM_ISO :: + * This value was used to specify ISO/IEC 10646 charmaps. It is however + * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding + * `encoding_id' values. + * + * TT_PLATFORM_MICROSOFT :: + * Used by Microsoft to indicate Windows-specific charmaps. See + * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. + * Note that most fonts contain a Unicode charmap using + * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). + * + * TT_PLATFORM_CUSTOM :: + * Used to indicate application-specific charmaps. + * + * TT_PLATFORM_ADOBE :: + * This value isn't part of any font format specification, but is used + * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec + * structure. See @TT_ADOBE_ID_XXX. + */ + +#define TT_PLATFORM_APPLE_UNICODE 0 +#define TT_PLATFORM_MACINTOSH 1 +#define TT_PLATFORM_ISO 2 /* deprecated */ +#define TT_PLATFORM_MICROSOFT 3 +#define TT_PLATFORM_CUSTOM 4 +#define TT_PLATFORM_ADOBE 7 /* artificial */ + + + /*********************************************************************** + * + * @enum: + * TT_APPLE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. + * + * @values: + * TT_APPLE_ID_DEFAULT :: + * Unicode version 1.0. + * + * TT_APPLE_ID_UNICODE_1_1 :: + * Unicode 1.1; specifies Hangul characters starting at U+34xx. + * + * TT_APPLE_ID_ISO_10646 :: + * Deprecated (identical to preceding). + * + * TT_APPLE_ID_UNICODE_2_0 :: + * Unicode 2.0 and beyond (UTF-16 BMP only). + * + * TT_APPLE_ID_UNICODE_32 :: + * Unicode 3.1 and beyond, using UTF-32. + * + * TT_APPLE_ID_VARIANT_SELECTOR :: + * From Adobe, not Apple. Not a normal cmap. Specifies variations + * on a real cmap. + */ + +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ + + + /*********************************************************************** + * + * @enum: + * TT_MAC_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MACINTOSH charmaps and name entries. + * + * @values: + * TT_MAC_ID_ROMAN :: + * TT_MAC_ID_JAPANESE :: + * TT_MAC_ID_TRADITIONAL_CHINESE :: + * TT_MAC_ID_KOREAN :: + * TT_MAC_ID_ARABIC :: + * TT_MAC_ID_HEBREW :: + * TT_MAC_ID_GREEK :: + * TT_MAC_ID_RUSSIAN :: + * TT_MAC_ID_RSYMBOL :: + * TT_MAC_ID_DEVANAGARI :: + * TT_MAC_ID_GURMUKHI :: + * TT_MAC_ID_GUJARATI :: + * TT_MAC_ID_ORIYA :: + * TT_MAC_ID_BENGALI :: + * TT_MAC_ID_TAMIL :: + * TT_MAC_ID_TELUGU :: + * TT_MAC_ID_KANNADA :: + * TT_MAC_ID_MALAYALAM :: + * TT_MAC_ID_SINHALESE :: + * TT_MAC_ID_BURMESE :: + * TT_MAC_ID_KHMER :: + * TT_MAC_ID_THAI :: + * TT_MAC_ID_LAOTIAN :: + * TT_MAC_ID_GEORGIAN :: + * TT_MAC_ID_ARMENIAN :: + * TT_MAC_ID_MALDIVIAN :: + * TT_MAC_ID_SIMPLIFIED_CHINESE :: + * TT_MAC_ID_TIBETAN :: + * TT_MAC_ID_MONGOLIAN :: + * TT_MAC_ID_GEEZ :: + * TT_MAC_ID_SLAVIC :: + * TT_MAC_ID_VIETNAMESE :: + * TT_MAC_ID_SINDHI :: + * TT_MAC_ID_UNINTERP :: + */ + +#define TT_MAC_ID_ROMAN 0 +#define TT_MAC_ID_JAPANESE 1 +#define TT_MAC_ID_TRADITIONAL_CHINESE 2 +#define TT_MAC_ID_KOREAN 3 +#define TT_MAC_ID_ARABIC 4 +#define TT_MAC_ID_HEBREW 5 +#define TT_MAC_ID_GREEK 6 +#define TT_MAC_ID_RUSSIAN 7 +#define TT_MAC_ID_RSYMBOL 8 +#define TT_MAC_ID_DEVANAGARI 9 +#define TT_MAC_ID_GURMUKHI 10 +#define TT_MAC_ID_GUJARATI 11 +#define TT_MAC_ID_ORIYA 12 +#define TT_MAC_ID_BENGALI 13 +#define TT_MAC_ID_TAMIL 14 +#define TT_MAC_ID_TELUGU 15 +#define TT_MAC_ID_KANNADA 16 +#define TT_MAC_ID_MALAYALAM 17 +#define TT_MAC_ID_SINHALESE 18 +#define TT_MAC_ID_BURMESE 19 +#define TT_MAC_ID_KHMER 20 +#define TT_MAC_ID_THAI 21 +#define TT_MAC_ID_LAOTIAN 22 +#define TT_MAC_ID_GEORGIAN 23 +#define TT_MAC_ID_ARMENIAN 24 +#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 +#define TT_MAC_ID_TIBETAN 26 +#define TT_MAC_ID_MONGOLIAN 27 +#define TT_MAC_ID_GEEZ 28 +#define TT_MAC_ID_SLAVIC 29 +#define TT_MAC_ID_VIETNAMESE 30 +#define TT_MAC_ID_SINDHI 31 +#define TT_MAC_ID_UNINTERP 32 + + + /*********************************************************************** + * + * @enum: + * TT_ISO_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ISO charmaps and name entries. + * + * Their use is now deprecated. + * + * @values: + * TT_ISO_ID_7BIT_ASCII :: + * ASCII. + * TT_ISO_ID_10646 :: + * ISO/10646. + * TT_ISO_ID_8859_1 :: + * Also known as Latin-1. + */ + +#define TT_ISO_ID_7BIT_ASCII 0 +#define TT_ISO_ID_10646 1 +#define TT_ISO_ID_8859_1 2 + + + /*********************************************************************** + * + * @enum: + * TT_MS_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_MICROSOFT charmaps and name entries. + * + * @values: + * TT_MS_ID_SYMBOL_CS :: + * Corresponds to Microsoft symbol encoding. See + * @FT_ENCODING_MS_SYMBOL. + * + * TT_MS_ID_UNICODE_CS :: + * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See + * @FT_ENCODING_UNICODE. + * + * TT_MS_ID_SJIS :: + * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. + * + * TT_MS_ID_GB2312 :: + * Corresponds to Simplified Chinese as used in Mainland China. See + * @FT_ENCODING_GB2312. + * + * TT_MS_ID_BIG_5 :: + * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. + * See @FT_ENCODING_BIG5. + * + * TT_MS_ID_WANSUNG :: + * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. + * + * TT_MS_ID_JOHAB :: + * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. + * + * TT_MS_ID_UCS_4 :: + * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to + * the OpenType specification version 1.4 (mid-2001.) + */ + +#define TT_MS_ID_SYMBOL_CS 0 +#define TT_MS_ID_UNICODE_CS 1 +#define TT_MS_ID_SJIS 2 +#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_BIG_5 4 +#define TT_MS_ID_WANSUNG 5 +#define TT_MS_ID_JOHAB 6 +#define TT_MS_ID_UCS_4 10 + + + /*********************************************************************** + * + * @enum: + * TT_ADOBE_ID_XXX + * + * @description: + * A list of valid values for the `encoding_id' for + * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! + * + * @values: + * TT_ADOBE_ID_STANDARD :: + * Adobe standard encoding. + * TT_ADOBE_ID_EXPERT :: + * Adobe expert encoding. + * TT_ADOBE_ID_CUSTOM :: + * Adobe custom encoding. + * TT_ADOBE_ID_LATIN_1 :: + * Adobe Latin~1 encoding. + */ + +#define TT_ADOBE_ID_STANDARD 0 +#define TT_ADOBE_ID_EXPERT 1 +#define TT_ADOBE_ID_CUSTOM 2 +#define TT_ADOBE_ID_LATIN_1 3 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MACINTOSH. */ + /* */ + /* The canonical source for the Apple assigned Language ID's is at */ + /* */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */ + /* */ +#define TT_MAC_LANGID_ENGLISH 0 +#define TT_MAC_LANGID_FRENCH 1 +#define TT_MAC_LANGID_GERMAN 2 +#define TT_MAC_LANGID_ITALIAN 3 +#define TT_MAC_LANGID_DUTCH 4 +#define TT_MAC_LANGID_SWEDISH 5 +#define TT_MAC_LANGID_SPANISH 6 +#define TT_MAC_LANGID_DANISH 7 +#define TT_MAC_LANGID_PORTUGUESE 8 +#define TT_MAC_LANGID_NORWEGIAN 9 +#define TT_MAC_LANGID_HEBREW 10 +#define TT_MAC_LANGID_JAPANESE 11 +#define TT_MAC_LANGID_ARABIC 12 +#define TT_MAC_LANGID_FINNISH 13 +#define TT_MAC_LANGID_GREEK 14 +#define TT_MAC_LANGID_ICELANDIC 15 +#define TT_MAC_LANGID_MALTESE 16 +#define TT_MAC_LANGID_TURKISH 17 +#define TT_MAC_LANGID_CROATIAN 18 +#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 +#define TT_MAC_LANGID_URDU 20 +#define TT_MAC_LANGID_HINDI 21 +#define TT_MAC_LANGID_THAI 22 +#define TT_MAC_LANGID_KOREAN 23 +#define TT_MAC_LANGID_LITHUANIAN 24 +#define TT_MAC_LANGID_POLISH 25 +#define TT_MAC_LANGID_HUNGARIAN 26 +#define TT_MAC_LANGID_ESTONIAN 27 +#define TT_MAC_LANGID_LETTISH 28 +#define TT_MAC_LANGID_SAAMISK 29 +#define TT_MAC_LANGID_FAEROESE 30 +#define TT_MAC_LANGID_FARSI 31 +#define TT_MAC_LANGID_RUSSIAN 32 +#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 +#define TT_MAC_LANGID_FLEMISH 34 +#define TT_MAC_LANGID_IRISH 35 +#define TT_MAC_LANGID_ALBANIAN 36 +#define TT_MAC_LANGID_ROMANIAN 37 +#define TT_MAC_LANGID_CZECH 38 +#define TT_MAC_LANGID_SLOVAK 39 +#define TT_MAC_LANGID_SLOVENIAN 40 +#define TT_MAC_LANGID_YIDDISH 41 +#define TT_MAC_LANGID_SERBIAN 42 +#define TT_MAC_LANGID_MACEDONIAN 43 +#define TT_MAC_LANGID_BULGARIAN 44 +#define TT_MAC_LANGID_UKRAINIAN 45 +#define TT_MAC_LANGID_BYELORUSSIAN 46 +#define TT_MAC_LANGID_UZBEK 47 +#define TT_MAC_LANGID_KAZAKH 48 +#define TT_MAC_LANGID_AZERBAIJANI 49 +#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 +#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 +#define TT_MAC_LANGID_ARMENIAN 51 +#define TT_MAC_LANGID_GEORGIAN 52 +#define TT_MAC_LANGID_MOLDAVIAN 53 +#define TT_MAC_LANGID_KIRGHIZ 54 +#define TT_MAC_LANGID_TAJIKI 55 +#define TT_MAC_LANGID_TURKMEN 56 +#define TT_MAC_LANGID_MONGOLIAN 57 +#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 +#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 +#define TT_MAC_LANGID_PASHTO 59 +#define TT_MAC_LANGID_KURDISH 60 +#define TT_MAC_LANGID_KASHMIRI 61 +#define TT_MAC_LANGID_SINDHI 62 +#define TT_MAC_LANGID_TIBETAN 63 +#define TT_MAC_LANGID_NEPALI 64 +#define TT_MAC_LANGID_SANSKRIT 65 +#define TT_MAC_LANGID_MARATHI 66 +#define TT_MAC_LANGID_BENGALI 67 +#define TT_MAC_LANGID_ASSAMESE 68 +#define TT_MAC_LANGID_GUJARATI 69 +#define TT_MAC_LANGID_PUNJABI 70 +#define TT_MAC_LANGID_ORIYA 71 +#define TT_MAC_LANGID_MALAYALAM 72 +#define TT_MAC_LANGID_KANNADA 73 +#define TT_MAC_LANGID_TAMIL 74 +#define TT_MAC_LANGID_TELUGU 75 +#define TT_MAC_LANGID_SINHALESE 76 +#define TT_MAC_LANGID_BURMESE 77 +#define TT_MAC_LANGID_KHMER 78 +#define TT_MAC_LANGID_LAO 79 +#define TT_MAC_LANGID_VIETNAMESE 80 +#define TT_MAC_LANGID_INDONESIAN 81 +#define TT_MAC_LANGID_TAGALOG 82 +#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 +#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 +#define TT_MAC_LANGID_AMHARIC 85 +#define TT_MAC_LANGID_TIGRINYA 86 +#define TT_MAC_LANGID_GALLA 87 +#define TT_MAC_LANGID_SOMALI 88 +#define TT_MAC_LANGID_SWAHILI 89 +#define TT_MAC_LANGID_RUANDA 90 +#define TT_MAC_LANGID_RUNDI 91 +#define TT_MAC_LANGID_CHEWA 92 +#define TT_MAC_LANGID_MALAGASY 93 +#define TT_MAC_LANGID_ESPERANTO 94 +#define TT_MAC_LANGID_WELSH 128 +#define TT_MAC_LANGID_BASQUE 129 +#define TT_MAC_LANGID_CATALAN 130 +#define TT_MAC_LANGID_LATIN 131 +#define TT_MAC_LANGID_QUECHUA 132 +#define TT_MAC_LANGID_GUARANI 133 +#define TT_MAC_LANGID_AYMARA 134 +#define TT_MAC_LANGID_TATAR 135 +#define TT_MAC_LANGID_UIGHUR 136 +#define TT_MAC_LANGID_DZONGKHA 137 +#define TT_MAC_LANGID_JAVANESE 138 +#define TT_MAC_LANGID_SUNDANESE 139 + + +#if 0 /* these seem to be errors that have been dropped */ + +#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 +#define TT_MAC_LANGID_IRISH_GAELIC 141 + +#endif + + + /* The following codes are new as of 2000-03-10 */ +#define TT_MAC_LANGID_GALICIAN 140 +#define TT_MAC_LANGID_AFRIKAANS 141 +#define TT_MAC_LANGID_BRETON 142 +#define TT_MAC_LANGID_INUKTITUT 143 +#define TT_MAC_LANGID_SCOTTISH_GAELIC 144 +#define TT_MAC_LANGID_MANX_GAELIC 145 +#define TT_MAC_LANGID_IRISH_GAELIC 146 +#define TT_MAC_LANGID_TONGAN 147 +#define TT_MAC_LANGID_GREEK_POLYTONIC 148 +#define TT_MAC_LANGID_GREELANDIC 149 +#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 + + + /*************************************************************************/ + /* */ + /* Possible values of the language identifier field in the name records */ + /* of the TTF `name' table if the `platform' identifier code is */ + /* TT_PLATFORM_MICROSOFT. */ + /* */ + /* The canonical source for the MS assigned LCID's (seems to) be at */ + /* */ + /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ + /* */ + /* It used to be at various places, among them */ + /* */ + /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */ + /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */ + /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */ + /* http://msdn.microsoft.com/library/en-us/passport25/ */ + /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */ + /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */ + /* */ + /* Hopefully, it seems now that the Globaldev site prevails... */ + /* (updated by Antoine, 2004-02-17) */ + +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 +#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 +#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 +#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 +#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 +#define TT_MS_LANGID_ARABIC_OMAN 0x2001 +#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 +#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 +#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 +#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 +#define TT_MS_LANGID_ARABIC_UAE 0x3801 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 +#define TT_MS_LANGID_ARABIC_QATAR 0x4001 +#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 +#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 +#define TT_MS_LANGID_CHINESE_PRC 0x0804 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 +#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 + +#if 1 /* this looks like the correct value */ +#define TT_MS_LANGID_CHINESE_MACAU 0x1404 +#else /* but beware, Microsoft may change its mind... + the most recent Word reference has the following: */ +#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG +#endif + +#if 0 /* used only with .NET `cultures'; commented out */ +#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 +#endif + +#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 +#define TT_MS_LANGID_DANISH_DENMARK 0x0406 +#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 +#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 +#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GREEK_GREECE 0x0408 + + /* don't ask what this one means... It is commented out currently. */ +#if 0 +#define TT_MS_LANGID_GREEK_GREECE2 0x2008 +#endif + +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 +#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 +#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 +#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 +#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 +#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 +#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 +#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 +#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 +#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09 +#define TT_MS_LANGID_ENGLISH_INDIA 0x4009 +#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 +#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a +#define TT_MS_LANGID_SPANISH_MEXICO 0x080a +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a +#define TT_MS_LANGID_SPANISH_PANAMA 0x180a +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a +#define TT_MS_LANGID_SPANISH_PERU 0x280a +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a +#define TT_MS_LANGID_SPANISH_CHILE 0x340a +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a +#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a + /* The following ID blatantly violate MS specs by using a */ + /* sublanguage > 0x1F. */ +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU +#define TT_MS_LANGID_FINNISH_FINLAND 0x040b +#define TT_MS_LANGID_FRENCH_FRANCE 0x040c +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c +#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c +#define TT_MS_LANGID_FRENCH_MONACO 0x180c +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c +#define TT_MS_LANGID_FRENCH_REUNION 0x200c +#define TT_MS_LANGID_FRENCH_CONGO 0x240c + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c +#define TT_MS_LANGID_FRENCH_MALI 0x340c +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c +#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c + /* and another violation of the spec (see 0xE40aU) */ +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f +#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 +#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 +#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 +#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 +#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 +#define TT_MS_LANGID_POLISH_POLAND 0x0415 +#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 +#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a + +#if 0 /* this used to be this value, but it looks like we were wrong */ +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a +#else /* current sources say */ +#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a + /* and XPsp2 Platform SDK added (2004-07-26) */ + /* Names are shortened to be significant within 40 chars. */ +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a +#endif + +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d +#define TT_MS_LANGID_THAI_THAILAND 0x041e +#define TT_MS_LANGID_TURKISH_TURKEY 0x041f +#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 +#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 +#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 +#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 +#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 +#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c +#define TT_MS_LANGID_BASQUE_SPAIN 0x042d +#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 +#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 +#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 +#define TT_MS_LANGID_HINDI_INDIA 0x0439 +#define TT_MS_LANGID_MALTESE_MALTA 0x043a + /* Added by XPsp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b +#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b +#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b +#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b +#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b +#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b +#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b +#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b +#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b + /* ... and we also keep our old identifier... */ +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b + +#if 0 /* this seems to be a previous inversion */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#else +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#endif + +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e +#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN + +#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 +#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 +#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_BENGALI_INDIA 0x0445 +#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 +#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 +#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_TAMIL_INDIA 0x0449 +#define TT_MS_LANGID_TELUGU_INDIA 0x044a +#define TT_MS_LANGID_KANNADA_INDIA 0x044b +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d +#define TT_MS_LANGID_MARATHI_INDIA 0x044e +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 +#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 + /* Don't use the next constant! It has */ + /* (1) the wrong spelling (Dzonghka) */ + /* (2) Microsoft doesn't officially define it -- */ + /* at least it is not in the List of Local */ + /* ID Values. */ + /* (3) Dzongkha is not the same language as */ + /* Tibetan, so merging it is wrong anyway. */ + /* */ + /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 + +#if 0 + /* the following used to be defined */ +#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 + /* ... but it was changed; */ +#else + /* So we will continue to #define it, but with the correct value */ +#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN +#endif + +#define TT_MS_LANGID_WELSH_WALES 0x0452 +#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 +#define TT_MS_LANGID_LAO_LAOS 0x0454 +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 +#define TT_MS_LANGID_KONKANI_INDIA 0x0457 +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 + /* Missing a LCID for Sindhi in Devanagari script */ +#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a +#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c +#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d +#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f + /* Missing a LCID for Tifinagh script */ +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 + /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ + /* script is yet unclear... might be Arabic, Nagari or Sharada */ +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 + /* ... and aliased (by MS) for compatibility reasons. */ +#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_NEPAL 0x0461 +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 +#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 +#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 +#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 + /* alias declared in Windows 2000 */ +#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a +#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b +#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b +#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c + /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ + TT_MS_LANGID_SEPEDI_SOUTH_AFRICA + /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */ +#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_KANURI_NIGERIA 0x0471 +#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 +#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 +#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 + /* also spelled in the `Passport SDK' list as: */ +#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 +#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 +#define TT_MS_LANGID_LATIN 0x0476 +#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 + /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ + /* not written (but OTOH the peculiar writing system is worth */ + /* studying). */ +#define TT_MS_LANGID_YI_CHINA 0x0478 +#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 + /* language codes from 0x047a to 0x047f are (still) unknown. */ +#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 + +#if 0 /* not deemed useful for fonts */ +#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff +#endif + + + /*************************************************************************/ + /* */ + /* Possible values of the `name' identifier field in the name records of */ + /* the TTF `name' table. These values are platform independent. */ + /* */ +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 + + /* the following values are from the OpenType spec */ +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 + /* number 15 is reserved */ +#define TT_NAME_ID_PREFERRED_FAMILY 16 +#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 + + /* The following code is new as of 2000-01-21 */ +#define TT_NAME_ID_SAMPLE_TEXT 19 + + /* This is new in OpenType 1.3 */ +#define TT_NAME_ID_CID_FINDFONT_NAME 20 + + /* This is new in OpenType 1.5 */ +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + + + /*************************************************************************/ + /* */ + /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ + /* */ + /* Updated 08-Nov-2008. */ + /* */ + + /* Bit 0 Basic Latin */ +#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ + /* Bit 1 C1 Controls and Latin-1 Supplement */ +#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ + /* Bit 2 Latin Extended-A */ +#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ + /* Bit 3 Latin Extended-B */ +#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ + /* Bit 4 IPA Extensions */ + /* Phonetic Extensions */ + /* Phonetic Extensions Supplement */ +#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ + /* U+1D00-U+1D7F */ + /* U+1D80-U+1DBF */ + /* Bit 5 Spacing Modifier Letters */ + /* Modifier Tone Letters */ +#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ + /* U+A700-U+A71F */ + /* Bit 6 Combining Diacritical Marks */ + /* Combining Diacritical Marks Supplement */ +#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ + /* U+1DC0-U+1DFF */ + /* Bit 7 Greek and Coptic */ +#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ + /* Bit 8 Coptic */ +#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ + /* Bit 9 Cyrillic */ + /* Cyrillic Supplement */ + /* Cyrillic Extended-A */ + /* Cyrillic Extended-B */ +#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ + /* U+0500-U+052F */ + /* U+2DE0-U+2DFF */ + /* U+A640-U+A69F */ + /* Bit 10 Armenian */ +#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ + /* Bit 11 Hebrew */ +#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ + /* Bit 12 Vai */ +#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ + /* Bit 13 Arabic */ + /* Arabic Supplement */ +#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ + /* U+0750-U+077F */ + /* Bit 14 NKo */ +#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ + /* Bit 15 Devanagari */ +#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ + /* Bit 16 Bengali */ +#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ + /* Bit 17 Gurmukhi */ +#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ + /* Bit 18 Gujarati */ +#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ + /* Bit 19 Oriya */ +#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ + /* Bit 20 Tamil */ +#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ + /* Bit 21 Telugu */ +#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ + /* Bit 22 Kannada */ +#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ + /* Bit 23 Malayalam */ +#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ + /* Bit 24 Thai */ +#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ + /* Bit 25 Lao */ +#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ + /* Bit 26 Georgian */ + /* Georgian Supplement */ +#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ + /* U+2D00-U+2D2F */ + /* Bit 27 Balinese */ +#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ + /* Bit 28 Hangul Jamo */ +#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ + /* Bit 29 Latin Extended Additional */ + /* Latin Extended-C */ + /* Latin Extended-D */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ + /* U+2C60-U+2C7F */ + /* U+A720-U+A7FF */ + /* Bit 30 Greek Extended */ +#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ + /* Bit 31 General Punctuation */ + /* Supplemental Punctuation */ +#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ + /* U+2E00-U+2E7F */ + /* Bit 32 Superscripts And Subscripts */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ + /* Bit 33 Currency Symbols */ +#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ + /* Bit 34 Combining Diacritical Marks For Symbols */ +#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ + /* Bit 35 Letterlike Symbols */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ + /* Bit 36 Number Forms */ +#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ + /* Bit 37 Arrows */ + /* Supplemental Arrows-A */ + /* Supplemental Arrows-B */ + /* Miscellaneous Symbols and Arrows */ +#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ + /* U+27F0-U+27FF */ + /* U+2900-U+297F */ + /* U+2B00-U+2BFF */ + /* Bit 38 Mathematical Operators */ + /* Supplemental Mathematical Operators */ + /* Miscellaneous Mathematical Symbols-A */ + /* Miscellaneous Mathematical Symbols-B */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ + /* U+2A00-U+2AFF */ + /* U+27C0-U+27EF */ + /* U+2980-U+29FF */ + /* Bit 39 Miscellaneous Technical */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ + /* Bit 40 Control Pictures */ +#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ + /* Bit 41 Optical Character Recognition */ +#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ + /* Bit 42 Enclosed Alphanumerics */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ + /* Bit 43 Box Drawing */ +#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ + /* Bit 44 Block Elements */ +#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ + /* Bit 45 Geometric Shapes */ +#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ + /* Bit 46 Miscellaneous Symbols */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ + /* Bit 47 Dingbats */ +#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ + /* Bit 48 CJK Symbols and Punctuation */ +#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ + /* Bit 49 Hiragana */ +#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ + /* Bit 50 Katakana */ + /* Katakana Phonetic Extensions */ +#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ + /* U+31F0-U+31FF */ + /* Bit 51 Bopomofo */ + /* Bopomofo Extended */ +#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ + /* U+31A0-U+31BF */ + /* Bit 52 Hangul Compatibility Jamo */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ + /* Bit 53 Phags-Pa */ +#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ +#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ +#define TT_UCR_PHAGSPA + /* Bit 54 Enclosed CJK Letters and Months */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ + /* Bit 55 CJK Compatibility */ +#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ + /* Bit 56 Hangul Syllables */ +#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ + /* Bit 57 High Surrogates */ + /* High Private Use Surrogates */ + /* Low Surrogates */ + /* */ + /* According to OpenType specs v.1.3+, */ + /* setting bit 57 implies that there is */ + /* at least one codepoint beyond the */ + /* Basic Multilingual Plane that is */ + /* supported by this font. So it really */ + /* means >= U+10000 */ +#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ + /* U+DB80-U+DBFF */ + /* U+DC00-U+DFFF */ +#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES + /* Bit 58 Phoenician */ +#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ + /* Bit 59 CJK Unified Ideographs */ + /* CJK Radicals Supplement */ + /* Kangxi Radicals */ + /* Ideographic Description Characters */ + /* CJK Unified Ideographs Extension A */ + /* CJK Unified Ideographs Extension B */ + /* Kanbun */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ + /* U+2E80-U+2EFF */ + /* U+2F00-U+2FDF */ + /* U+2FF0-U+2FFF */ + /* U+3400-U+4DB5 */ + /*U+20000-U+2A6DF*/ + /* U+3190-U+319F */ + /* Bit 60 Private Use */ +#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ + /* Bit 61 CJK Strokes */ + /* CJK Compatibility Ideographs */ + /* CJK Compatibility Ideographs Supplement */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ + /* U+F900-U+FAFF */ + /*U+2F800-U+2FA1F*/ + /* Bit 62 Alphabetic Presentation Forms */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ + /* Bit 63 Arabic Presentation Forms-A */ +#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ + /* Bit 64 Combining Half Marks */ +#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ + /* Bit 65 Vertical forms */ + /* CJK Compatibility Forms */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ + /* U+FE30-U+FE4F */ + /* Bit 66 Small Form Variants */ +#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ + /* Bit 67 Arabic Presentation Forms-B */ +#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ + /* Bit 68 Halfwidth and Fullwidth Forms */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ + /* Bit 69 Specials */ +#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ + /* Bit 70 Tibetan */ +#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ + /* Bit 71 Syriac */ +#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ + /* Bit 72 Thaana */ +#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ + /* Bit 73 Sinhala */ +#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ + /* Bit 74 Myanmar */ +#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ + /* Bit 75 Ethiopic */ + /* Ethiopic Supplement */ + /* Ethiopic Extended */ +#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ + /* U+1380-U+139F */ + /* U+2D80-U+2DDF */ + /* Bit 76 Cherokee */ +#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ + /* Bit 77 Unified Canadian Aboriginal Syllabics */ +#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ + /* Bit 78 Ogham */ +#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ + /* Bit 79 Runic */ +#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ + /* Bit 80 Khmer */ + /* Khmer Symbols */ +#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ + /* U+19E0-U+19FF */ + /* Bit 81 Mongolian */ +#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ + /* Bit 82 Braille Patterns */ +#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ + /* Bit 83 Yi Syllables */ + /* Yi Radicals */ +#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ + /* U+A490-U+A4CF */ + /* Bit 84 Tagalog */ + /* Hanunoo */ + /* Buhid */ + /* Tagbanwa */ +#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ + /* U+1720-U+173F */ + /* U+1740-U+175F */ + /* U+1760-U+177F */ + /* Bit 85 Old Italic */ +#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ + /* Bit 86 Gothic */ +#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ + /* Bit 87 Deseret */ +#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ + /* Bit 88 Byzantine Musical Symbols */ + /* Musical Symbols */ + /* Ancient Greek Musical Notation */ +#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ + /*U+1D100-U+1D1FF*/ + /*U+1D200-U+1D24F*/ + /* Bit 89 Mathematical Alphanumeric Symbols */ +#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ + /* Bit 90 Private Use (plane 15) */ + /* Private Use (plane 16) */ +#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ + /*U+100000-U+10FFFD*/ + /* Bit 91 Variation Selectors */ + /* Variation Selectors Supplement */ +#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ + /*U+E0100-U+E01EF*/ + /* Bit 92 Tags */ +#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ + /* Bit 93 Limbu */ +#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ + /* Bit 94 Tai Le */ +#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ + /* Bit 95 New Tai Lue */ +#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + /* Bit 96 Buginese */ +#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ + /* Bit 97 Glagolitic */ +#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ + /* Bit 98 Tifinagh */ +#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ + /* Bit 99 Yijing Hexagram Symbols */ +#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ + /* Bit 100 Syloti Nagri */ +#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ + /* Bit 101 Linear B Syllabary */ + /* Linear B Ideograms */ + /* Aegean Numbers */ +#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ + /*U+10080-U+100FF*/ + /*U+10100-U+1013F*/ + /* Bit 102 Ancient Greek Numbers */ +#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ + /* Bit 103 Ugaritic */ +#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ + /* Bit 104 Old Persian */ +#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ + /* Bit 105 Shavian */ +#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ + /* Bit 106 Osmanya */ +#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ + /* Bit 107 Cypriot Syllabary */ +#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ + /* Bit 108 Kharoshthi */ +#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ + /* Bit 109 Tai Xuan Jing Symbols */ +#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ + /* Bit 110 Cuneiform */ + /* Cuneiform Numbers and Punctuation */ +#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ + /*U+12400-U+1247F*/ + /* Bit 111 Counting Rod Numerals */ +#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ + /* Bit 112 Sundanese */ +#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ + /* Bit 113 Lepcha */ +#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ + /* Bit 114 Ol Chiki */ +#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ + /* Bit 115 Saurashtra */ +#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ + /* Bit 116 Kayah Li */ +#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ + /* Bit 117 Rejang */ +#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ + /* Bit 118 Cham */ +#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ + /* Bit 119 Ancient Symbols */ +#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ + /* Bit 120 Phaistos Disc */ +#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ + /* Bit 121 Carian */ + /* Lycian */ + /* Lydian */ +#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ + /*U+10280-U+1029F*/ + /*U+10920-U+1093F*/ + /* Bit 122 Domino Tiles */ + /* Mahjong Tiles */ +#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ + /*U+1F000-U+1F02F*/ + /* Bit 123-127 Reserved for process-internal usage */ + + + /*************************************************************************/ + /* */ + /* Some compilers have a very limited length of identifiers. */ + /* */ +#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) +#define HAVE_LIMIT_ON_IDENTS +#endif + + +#ifndef HAVE_LIMIT_ON_IDENTS + + + /*************************************************************************/ + /* */ + /* Here some alias #defines in order to be clearer. */ + /* */ + /* These are not always #defined to stay within the 31~character limit */ + /* which some compilers have. */ + /* */ + /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ + /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ + /* If you get a warning with such a compiler, use the -i40 switch. */ + /* */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ + TT_UCR_ARABIC_PRESENTATIONS_A +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ + TT_UCR_ARABIC_PRESENTATIONS_B + +#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ + TT_UCR_COMBINING_DIACRITICS +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + TT_UCR_COMBINING_DIACRITICS_SYMB + + +#endif /* !HAVE_LIMIT_ON_IDENTS */ + + +FT_END_HEADER + +#endif /* __TTNAMEID_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/tttables.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/tttables.h new file mode 100644 index 0000000..02236c2 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/tttables.h @@ -0,0 +1,763 @@ +/***************************************************************************/ +/* */ +/* tttables.h */ +/* */ +/* Basic SFNT/TrueType tables definitions and interface */ +/* (specification only). */ +/* */ +/* Copyright 1996-2005, 2008-2011 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTTABLES_H__ +#define __TTTABLES_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* truetype_tables */ + /* */ + /* <Title> */ + /* TrueType Tables */ + /* */ + /* <Abstract> */ + /* TrueType specific table types and functions. */ + /* */ + /* <Description> */ + /* This section contains the definition of TrueType-specific tables */ + /* as well as some routines used to access and process them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Header */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType font header table. All */ + /* fields follow the TrueType specification. */ + /* */ + typedef struct TT_Header_ + { + FT_Fixed Table_Version; + FT_Fixed Font_Revision; + + FT_Long CheckSum_Adjust; + FT_Long Magic_Number; + + FT_UShort Flags; + FT_UShort Units_Per_EM; + + FT_Long Created [2]; + FT_Long Modified[2]; + + FT_Short xMin; + FT_Short yMin; + FT_Short xMax; + FT_Short yMax; + + FT_UShort Mac_Style; + FT_UShort Lowest_Rec_PPEM; + + FT_Short Font_Direction; + FT_Short Index_To_Loc_Format; + FT_Short Glyph_Data_Format; + + } TT_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_HoriHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType horizontal header, the `hhea' */ + /* table, as well as the corresponding horizontal metrics table, */ + /* i.e., the `hmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of all */ + /* glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoAscender' field */ + /* of the OS/2 table instead if you want */ + /* the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the distance */ + /* from the baseline to the bottom-most of */ + /* all glyph points found in the font. It */ + /* is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of the */ + /* glyphs found in the font (maybe ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Width_Max :: This field is the maximum of all advance */ + /* widths found in the font. It can be */ + /* used to compute the maximum width of an */ + /* arbitrary string of text. */ + /* */ + /* min_Left_Side_Bearing :: The minimum left side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Right_Side_Bearing :: The minimum right side bearing of all */ + /* glyphs within the font. */ + /* */ + /* xMax_Extent :: The maximum horizontal extent (i.e., the */ + /* `width' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ + /* table -- this value can be smaller than */ + /* the total number of glyphs in the font. */ + /* */ + /* long_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `hmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields which */ + /* are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_HoriHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Width_Max; /* advance width maximum */ + + FT_Short min_Left_Side_Bearing; /* minimum left-sb */ + FT_Short min_Right_Side_Bearing; /* minimum right-sb */ + FT_Short xMax_Extent; /* xmax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_HMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `HMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_HoriHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_VertHeader */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType vertical header, the `vhea' */ + /* table, as well as the corresponding vertical metrics table, i.e., */ + /* the `vmtx' table. */ + /* */ + /* <Fields> */ + /* Version :: The table version. */ + /* */ + /* Ascender :: The font's ascender, i.e., the distance */ + /* from the baseline to the top-most of */ + /* all glyph points found in the font. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoAscender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Descender :: The font's descender, i.e., the */ + /* distance from the baseline to the */ + /* bottom-most of all glyph points found */ + /* in the font. It is negative. */ + /* */ + /* This value is invalid in many fonts, as */ + /* it is usually set by the font designer, */ + /* and often reflects only a portion of */ + /* the glyphs found in the font (maybe */ + /* ASCII). */ + /* */ + /* You should use the `sTypoDescender' */ + /* field of the OS/2 table instead if you */ + /* want the correct one. */ + /* */ + /* Line_Gap :: The font's line gap, i.e., the distance */ + /* to add to the ascender and descender to */ + /* get the BTB, i.e., the */ + /* baseline-to-baseline distance for the */ + /* font. */ + /* */ + /* advance_Height_Max :: This field is the maximum of all */ + /* advance heights found in the font. It */ + /* can be used to compute the maximum */ + /* height of an arbitrary string of text. */ + /* */ + /* min_Top_Side_Bearing :: The minimum top side bearing of all */ + /* glyphs within the font. */ + /* */ + /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ + /* glyphs within the font. */ + /* */ + /* yMax_Extent :: The maximum vertical extent (i.e., the */ + /* `height' of a glyph's bounding box) for */ + /* all glyphs in the font. */ + /* */ + /* caret_Slope_Rise :: The rise coefficient of the cursor's */ + /* slope of the cursor (slope=rise/run). */ + /* */ + /* caret_Slope_Run :: The run coefficient of the cursor's */ + /* slope. */ + /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* This value is `reserved' in vmtx */ + /* version 1.0. */ + /* */ + /* Reserved :: 8~reserved bytes. */ + /* */ + /* metric_Data_Format :: Always~0. */ + /* */ + /* number_Of_HMetrics :: Number of VMetrics entries in the */ + /* `vmtx' table -- this value can be */ + /* smaller than the total number of glyphs */ + /* in the font. */ + /* */ + /* long_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* short_metrics :: A pointer into the `vmtx' table. */ + /* */ + /* <Note> */ + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields which */ + /* are different. */ + /* */ + /* This ensures that a single function in the `ttload' */ + /* module is able to read both the horizontal and vertical */ + /* headers. */ + /* */ + typedef struct TT_VertHeader_ + { + FT_Fixed Version; + FT_Short Ascender; + FT_Short Descender; + FT_Short Line_Gap; + + FT_UShort advance_Height_Max; /* advance height maximum */ + + FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ + FT_Short yMax_Extent; /* xmax or ymax extents */ + FT_Short caret_Slope_Rise; + FT_Short caret_Slope_Run; + FT_Short caret_Offset; + + FT_Short Reserved[4]; + + FT_Short metric_Data_Format; + FT_UShort number_Of_VMetrics; + + /* The following fields are not defined by the TrueType specification */ + /* but they're used to connect the metrics header to the relevant */ + /* `HMTX' or `VMTX' table. */ + + void* long_metrics; + void* short_metrics; + + } TT_VertHeader; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_OS2 */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType OS/2 table. This is the long */ + /* table version. All fields comply to the TrueType specification. */ + /* */ + /* Note that we now support old Mac fonts which do not include an */ + /* OS/2 table. In this case, the `version' field is always set to */ + /* 0xFFFF. */ + /* */ + typedef struct TT_OS2_ + { + FT_UShort version; /* 0x0001 - more or 0xFFFF */ + FT_Short xAvgCharWidth; + FT_UShort usWeightClass; + FT_UShort usWidthClass; + FT_Short fsType; + FT_Short ySubscriptXSize; + FT_Short ySubscriptYSize; + FT_Short ySubscriptXOffset; + FT_Short ySubscriptYOffset; + FT_Short ySuperscriptXSize; + FT_Short ySuperscriptYSize; + FT_Short ySuperscriptXOffset; + FT_Short ySuperscriptYOffset; + FT_Short yStrikeoutSize; + FT_Short yStrikeoutPosition; + FT_Short sFamilyClass; + + FT_Byte panose[10]; + + FT_ULong ulUnicodeRange1; /* Bits 0-31 */ + FT_ULong ulUnicodeRange2; /* Bits 32-63 */ + FT_ULong ulUnicodeRange3; /* Bits 64-95 */ + FT_ULong ulUnicodeRange4; /* Bits 96-127 */ + + FT_Char achVendID[4]; + + FT_UShort fsSelection; + FT_UShort usFirstCharIndex; + FT_UShort usLastCharIndex; + FT_Short sTypoAscender; + FT_Short sTypoDescender; + FT_Short sTypoLineGap; + FT_UShort usWinAscent; + FT_UShort usWinDescent; + + /* only version 1 tables: */ + + FT_ULong ulCodePageRange1; /* Bits 0-31 */ + FT_ULong ulCodePageRange2; /* Bits 32-63 */ + + /* only version 2 tables: */ + + FT_Short sxHeight; + FT_Short sCapHeight; + FT_UShort usDefaultChar; + FT_UShort usBreakChar; + FT_UShort usMaxContext; + + } TT_OS2; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_Postscript */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PostScript table. All fields */ + /* comply to the TrueType specification. This structure does not */ + /* reference the PostScript glyph names, which can be nevertheless */ + /* accessed with the `ttpost' module. */ + /* */ + typedef struct TT_Postscript_ + { + FT_Fixed FormatType; + FT_Fixed italicAngle; + FT_Short underlinePosition; + FT_Short underlineThickness; + FT_ULong isFixedPitch; + FT_ULong minMemType42; + FT_ULong maxMemType42; + FT_ULong minMemType1; + FT_ULong maxMemType1; + + /* Glyph names follow in the file, but we don't */ + /* load them by default. See the ttpost.c file. */ + + } TT_Postscript; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_PCLT */ + /* */ + /* <Description> */ + /* A structure used to model a TrueType PCLT table. All fields */ + /* comply to the TrueType specification. */ + /* */ + typedef struct TT_PCLT_ + { + FT_Fixed Version; + FT_ULong FontNumber; + FT_UShort Pitch; + FT_UShort xHeight; + FT_UShort Style; + FT_UShort TypeFamily; + FT_UShort CapHeight; + FT_UShort SymbolSet; + FT_Char TypeFace[16]; + FT_Char CharacterComplement[8]; + FT_Char FileName[6]; + FT_Char StrokeWeight; + FT_Char WidthType; + FT_Byte SerifStyle; + FT_Byte Reserved; + + } TT_PCLT; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_MaxProfile */ + /* */ + /* <Description> */ + /* The maximum profile is a table containing many max values which */ + /* can be used to pre-allocate arrays. This ensures that no memory */ + /* allocation occurs during a glyph load. */ + /* */ + /* <Fields> */ + /* version :: The version number. */ + /* */ + /* numGlyphs :: The number of glyphs in this TrueType */ + /* font. */ + /* */ + /* maxPoints :: The maximum number of points in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositePoints'. */ + /* */ + /* maxContours :: The maximum number of contours in a */ + /* non-composite TrueType glyph. See also */ + /* the structure element */ + /* `maxCompositeContours'. */ + /* */ + /* maxCompositePoints :: The maximum number of points in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxPoints'. */ + /* */ + /* maxCompositeContours :: The maximum number of contours in a */ + /* composite TrueType glyph. See also the */ + /* structure element `maxContours'. */ + /* */ + /* maxZones :: The maximum number of zones used for */ + /* glyph hinting. */ + /* */ + /* maxTwilightPoints :: The maximum number of points in the */ + /* twilight zone used for glyph hinting. */ + /* */ + /* maxStorage :: The maximum number of elements in the */ + /* storage area used for glyph hinting. */ + /* */ + /* maxFunctionDefs :: The maximum number of function */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxInstructionDefs :: The maximum number of instruction */ + /* definitions in the TrueType bytecode for */ + /* this font. */ + /* */ + /* maxStackElements :: The maximum number of stack elements used */ + /* during bytecode interpretation. */ + /* */ + /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ + /* used for glyph hinting. */ + /* */ + /* maxComponentElements :: The maximum number of simple (i.e., non- */ + /* composite) glyphs in a composite glyph. */ + /* */ + /* maxComponentDepth :: The maximum nesting depth of composite */ + /* glyphs. */ + /* */ + /* <Note> */ + /* This structure is only used during font loading. */ + /* */ + typedef struct TT_MaxProfile_ + { + FT_Fixed version; + FT_UShort numGlyphs; + FT_UShort maxPoints; + FT_UShort maxContours; + FT_UShort maxCompositePoints; + FT_UShort maxCompositeContours; + FT_UShort maxZones; + FT_UShort maxTwilightPoints; + FT_UShort maxStorage; + FT_UShort maxFunctionDefs; + FT_UShort maxInstructionDefs; + FT_UShort maxStackElements; + FT_UShort maxSizeOfInstructions; + FT_UShort maxComponentElements; + FT_UShort maxComponentDepth; + + } TT_MaxProfile; + + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_Sfnt_Tag */ + /* */ + /* <Description> */ + /* An enumeration used to specify the index of an SFNT table. */ + /* Used in the @FT_Get_Sfnt_Table API function. */ + /* */ + typedef enum FT_Sfnt_Tag_ + { + ft_sfnt_head = 0, /* TT_Header */ + ft_sfnt_maxp = 1, /* TT_MaxProfile */ + ft_sfnt_os2 = 2, /* TT_OS2 */ + ft_sfnt_hhea = 3, /* TT_HoriHeader */ + ft_sfnt_vhea = 4, /* TT_VertHeader */ + ft_sfnt_post = 5, /* TT_Postscript */ + ft_sfnt_pclt = 6, /* TT_PCLT */ + + sfnt_max /* internal end mark */ + + } FT_Sfnt_Tag; + + /* */ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_Table */ + /* */ + /* <Description> */ + /* Return a pointer to a given SFNT table within a face. */ + /* */ + /* <Input> */ + /* face :: A handle to the source. */ + /* */ + /* tag :: The index of the SFNT table. */ + /* */ + /* <Return> */ + /* A type-less pointer to the table. This will be~0 in case of */ + /* error, or if the corresponding table was not found *OR* loaded */ + /* from the file. */ + /* */ + /* Use a typecast according to `tag' to access the structure */ + /* elements. */ + /* */ + /* <Note> */ + /* The table is owned by the face object and disappears with it. */ + /* */ + /* This function is only useful to access SFNT tables that are loaded */ + /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ + /* a list. */ + /* */ + FT_EXPORT( void* ) + FT_Get_Sfnt_Table( FT_Face face, + FT_Sfnt_Tag tag ); + + + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use the value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag == 0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, then try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + */ + FT_EXPORT( FT_Error ) + FT_Load_Sfnt_Table( FT_Face face, + FT_ULong tag, + FT_Long offset, + FT_Byte* buffer, + FT_ULong* length ); + + + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @inout: + * tag :: + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. + * + * @output: + * length :: + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * SFNT tables with length zero are treated as missing. + * + */ + FT_EXPORT( FT_Error ) + FT_Sfnt_Table_Info( FT_Face face, + FT_UInt table_index, + FT_ULong *tag, + FT_ULong *length ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Language_ID */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap language ID. Definitions of */ + /* language ID values are in `freetype/ttnameid.h'. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The language ID of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, just return~0 as the default value. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_CMap_Language_ID( FT_CharMap charmap ); + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_CMap_Format */ + /* */ + /* <Description> */ + /* Return TrueType/sfnt specific cmap format. */ + /* */ + /* <Input> */ + /* charmap :: */ + /* The target charmap. */ + /* */ + /* <Return> */ + /* The format of `charmap'. If `charmap' doesn't belong to a */ + /* TrueType/sfnt face, return -1. */ + /* */ + FT_EXPORT( FT_Long ) + FT_Get_CMap_Format( FT_CharMap charmap ); + + /* */ + + +FT_END_HEADER + +#endif /* __TTTABLES_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/tttags.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/tttags.h new file mode 100644 index 0000000..307ce4b --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/tttags.h @@ -0,0 +1,107 @@ +/***************************************************************************/ +/* */ +/* tttags.h */ +/* */ +/* Tags for TrueType and OpenType tables (specification only). */ +/* */ +/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTAGS_H__ +#define __TTAGS_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + +#define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) +#define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) +#define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) +#define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) +#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) +#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) +#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) +#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) +#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) +#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) +#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) +#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) +#define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) +#define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) +#define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) +#define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) +#define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) +#define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) +#define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) +#define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) +#define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) +#define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) +#define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) +#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) +#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) +#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) +#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) +#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) +#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) +#define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) +#define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) +#define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) +#define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) +#define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) +#define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) +#define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) +#define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) +#define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) +#define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) +#define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) +#define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) +#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) +#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) +#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) +#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) +#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) +#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) +#define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) +#define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) +#define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) +#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) +#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) +#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) +#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) +#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) +#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) +#define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) +#define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) +#define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) +#define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) +#define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) +#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) +#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) +#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) + + +FT_END_HEADER + +#endif /* __TTAGS_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/freetype/ttunpat.h b/allegro-5.0.10-mingw-4.7.0/include/freetype/ttunpat.h new file mode 100644 index 0000000..a016275 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/freetype/ttunpat.h @@ -0,0 +1,59 @@ +/***************************************************************************/ +/* */ +/* ttunpat.h */ +/* */ +/* Definitions for the unpatented TrueType hinting system */ +/* */ +/* Copyright 2003, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Written by Graham Asher <graham.asher@btinternet.com> */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTUNPAT_H__ +#define __TTUNPAT_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /*************************************************************************** + * + * @constant: + * FT_PARAM_TAG_UNPATENTED_HINTING + * + * @description: + * A constant used as the tag of an @FT_Parameter structure to indicate + * that unpatented methods only should be used by the TrueType bytecode + * interpreter for a typeface opened by @FT_Open_Face. + * + */ +#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) + + /* */ + +FT_END_HEADER + + +#endif /* __TTUNPAT_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/ft2build.h b/allegro-5.0.10-mingw-4.7.0/include/ft2build.h new file mode 100644 index 0000000..923d887 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/ft2build.h @@ -0,0 +1,39 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* (Generic version) */ +/* */ +/* Copyright 1996-2001, 2006 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file corresponds to the default `ft2build.h' file for */ + /* FreeType 2. It uses the `freetype' include root. */ + /* */ + /* Note that specific platforms might use a different configuration. */ + /* See builds/unix/ft2unix.h for an example. */ + /* */ + /*************************************************************************/ + + +#ifndef __FT2_BUILD_GENERIC_H__ +#define __FT2_BUILD_GENERIC_H__ + +#include <freetype/config/ftheader.h> + +#endif /* __FT2_BUILD_GENERIC_H__ */ + + +/* END */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/ogg/ogg.h b/allegro-5.0.10-mingw-4.7.0/include/ogg/ogg.h new file mode 100644 index 0000000..cea5c16 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/ogg/ogg.h @@ -0,0 +1,209 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel libogg include + last mod: $Id: ogg.h 17571 2010-10-27 13:28:20Z xiphmont $ + + ********************************************************************/ +#ifndef _OGG_H +#define _OGG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stddef.h> +#include <ogg/os_types.h> + +typedef struct { + void *iov_base; + size_t iov_len; +} ogg_iovec_t; + +typedef struct { + long endbyte; + int endbit; + + unsigned char *buffer; + unsigned char *ptr; + long storage; +} oggpack_buffer; + +/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ + +typedef struct { + unsigned char *header; + long header_len; + unsigned char *body; + long body_len; +} ogg_page; + +/* ogg_stream_state contains the current encode/decode state of a logical + Ogg bitstream **********************************************************/ + +typedef struct { + unsigned char *body_data; /* bytes from packet bodies */ + long body_storage; /* storage elements allocated */ + long body_fill; /* elements stored; fill mark */ + long body_returned; /* elements of fill returned */ + + + int *lacing_vals; /* The values that will go to the segment table */ + ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact + this way, but it is simple coupled to the + lacing fifo */ + long lacing_storage; + long lacing_fill; + long lacing_packet; + long lacing_returned; + + unsigned char header[282]; /* working space for header encode */ + int header_fill; + + int e_o_s; /* set when we have buffered the last packet in the + logical bitstream */ + int b_o_s; /* set after we've written the initial page + of a logical bitstream */ + long serialno; + long pageno; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a separate abstraction + layer) also knows about the gap */ + ogg_int64_t granulepos; + +} ogg_stream_state; + +/* ogg_packet is used to encapsulate the data and metadata belonging + to a single raw Ogg/Vorbis packet *************************************/ + +typedef struct { + unsigned char *packet; + long bytes; + long b_o_s; + long e_o_s; + + ogg_int64_t granulepos; + + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a separate abstraction + layer) also knows about the gap */ +} ogg_packet; + +typedef struct { + unsigned char *data; + int storage; + int fill; + int returned; + + int unsynced; + int headerbytes; + int bodybytes; +} ogg_sync_state; + +/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ + +extern void oggpack_writeinit(oggpack_buffer *b); +extern int oggpack_writecheck(oggpack_buffer *b); +extern void oggpack_writetrunc(oggpack_buffer *b,long bits); +extern void oggpack_writealign(oggpack_buffer *b); +extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits); +extern void oggpack_reset(oggpack_buffer *b); +extern void oggpack_writeclear(oggpack_buffer *b); +extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); +extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits); +extern long oggpack_look(oggpack_buffer *b,int bits); +extern long oggpack_look1(oggpack_buffer *b); +extern void oggpack_adv(oggpack_buffer *b,int bits); +extern void oggpack_adv1(oggpack_buffer *b); +extern long oggpack_read(oggpack_buffer *b,int bits); +extern long oggpack_read1(oggpack_buffer *b); +extern long oggpack_bytes(oggpack_buffer *b); +extern long oggpack_bits(oggpack_buffer *b); +extern unsigned char *oggpack_get_buffer(oggpack_buffer *b); + +extern void oggpackB_writeinit(oggpack_buffer *b); +extern int oggpackB_writecheck(oggpack_buffer *b); +extern void oggpackB_writetrunc(oggpack_buffer *b,long bits); +extern void oggpackB_writealign(oggpack_buffer *b); +extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits); +extern void oggpackB_reset(oggpack_buffer *b); +extern void oggpackB_writeclear(oggpack_buffer *b); +extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); +extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits); +extern long oggpackB_look(oggpack_buffer *b,int bits); +extern long oggpackB_look1(oggpack_buffer *b); +extern void oggpackB_adv(oggpack_buffer *b,int bits); +extern void oggpackB_adv1(oggpack_buffer *b); +extern long oggpackB_read(oggpack_buffer *b,int bits); +extern long oggpackB_read1(oggpack_buffer *b); +extern long oggpackB_bytes(oggpack_buffer *b); +extern long oggpackB_bits(oggpack_buffer *b); +extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); + +/* Ogg BITSTREAM PRIMITIVES: encoding **************************/ + +extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); +extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, + int count, long e_o_s, ogg_int64_t granulepos); +extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); +extern int ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill); +extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); + +/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ + +extern int ogg_sync_init(ogg_sync_state *oy); +extern int ogg_sync_clear(ogg_sync_state *oy); +extern int ogg_sync_reset(ogg_sync_state *oy); +extern int ogg_sync_destroy(ogg_sync_state *oy); +extern int ogg_sync_check(ogg_sync_state *oy); + +extern char *ogg_sync_buffer(ogg_sync_state *oy, long size); +extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); +extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); +extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); +extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); +extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); +extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); + +/* Ogg BITSTREAM PRIMITIVES: general ***************************/ + +extern int ogg_stream_init(ogg_stream_state *os,int serialno); +extern int ogg_stream_clear(ogg_stream_state *os); +extern int ogg_stream_reset(ogg_stream_state *os); +extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); +extern int ogg_stream_destroy(ogg_stream_state *os); +extern int ogg_stream_check(ogg_stream_state *os); +extern int ogg_stream_eos(ogg_stream_state *os); + +extern void ogg_page_checksum_set(ogg_page *og); + +extern int ogg_page_version(const ogg_page *og); +extern int ogg_page_continued(const ogg_page *og); +extern int ogg_page_bos(const ogg_page *og); +extern int ogg_page_eos(const ogg_page *og); +extern ogg_int64_t ogg_page_granulepos(const ogg_page *og); +extern int ogg_page_serialno(const ogg_page *og); +extern long ogg_page_pageno(const ogg_page *og); +extern int ogg_page_packets(const ogg_page *og); + +extern void ogg_packet_clear(ogg_packet *op); + + +#ifdef __cplusplus +} +#endif + +#endif /* _OGG_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/ogg/os_types.h b/allegro-5.0.10-mingw-4.7.0/include/ogg/os_types.h new file mode 100644 index 0000000..c442760 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/ogg/os_types.h @@ -0,0 +1,147 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + last mod: $Id: os_types.h 17566 2010-10-26 10:56:31Z xiphmont $ + + ********************************************************************/ +#ifndef _OS_TYPES_H +#define _OS_TYPES_H + +/* make it easy on the folks that want to compile the libs with a + different malloc than stdlib */ +#define _ogg_malloc malloc +#define _ogg_calloc calloc +#define _ogg_realloc realloc +#define _ogg_free free + +#if defined(_WIN32) + +# if defined(__CYGWIN__) +# include <stdint.h> + typedef int16_t ogg_int16_t; + typedef uint16_t ogg_uint16_t; + typedef int32_t ogg_int32_t; + typedef uint32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + typedef uint64_t ogg_uint64_t; +# elif defined(__MINGW32__) +# include <sys/types.h> + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + typedef unsigned long long ogg_uint64_t; +# elif defined(__MWERKS__) + typedef long long ogg_int64_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; +# else + /* MSVC/Borland */ + typedef __int64 ogg_int64_t; + typedef __int32 ogg_int32_t; + typedef unsigned __int32 ogg_uint32_t; + typedef __int16 ogg_int16_t; + typedef unsigned __int16 ogg_uint16_t; +# endif + +#elif defined(__MACOS__) + +# include <sys/types.h> + typedef SInt16 ogg_int16_t; + typedef UInt16 ogg_uint16_t; + typedef SInt32 ogg_int32_t; + typedef UInt32 ogg_uint32_t; + typedef SInt64 ogg_int64_t; + +#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ + +# include <inttypes.h> + typedef int16_t ogg_int16_t; + typedef u_int16_t ogg_uint16_t; + typedef int32_t ogg_int32_t; + typedef u_int32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + +#elif defined(__HAIKU__) + + /* Haiku */ +# include <sys/types.h> + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + +#elif defined(__BEOS__) + + /* Be */ +# include <inttypes.h> + typedef int16_t ogg_int16_t; + typedef u_int16_t ogg_uint16_t; + typedef int32_t ogg_int32_t; + typedef u_int32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + +#elif defined (__EMX__) + + /* OS/2 GCC */ + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + +#elif defined (DJGPP) + + /* DJGPP */ + typedef short ogg_int16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + +#elif defined(R5900) + + /* PS2 EE */ + typedef long ogg_int64_t; + typedef int ogg_int32_t; + typedef unsigned ogg_uint32_t; + typedef short ogg_int16_t; + +#elif defined(__SYMBIAN32__) + + /* Symbian GCC */ + typedef signed short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef signed int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long int ogg_int64_t; + +#elif defined(__TMS320C6X__) + + /* TI C64x compiler */ + typedef signed short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef signed int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long int ogg_int64_t; + +#else + +# include <ogg/config_types.h> + +#endif + +#endif /* _OS_TYPES_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/physfs.h b/allegro-5.0.10-mingw-4.7.0/include/physfs.h new file mode 100644 index 0000000..4fbbec0 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/physfs.h @@ -0,0 +1,2403 @@ +/** + * \file physfs.h + * + * Main header file for PhysicsFS. + */ + +/** + * \mainpage PhysicsFS + * + * The latest version of PhysicsFS can be found at: + * http://icculus.org/physfs/ + * + * PhysicsFS; a portable, flexible file i/o abstraction. + * + * This API gives you access to a system file system in ways superior to the + * stdio or system i/o calls. The brief benefits: + * + * - It's portable. + * - It's safe. No file access is permitted outside the specified dirs. + * - It's flexible. Archives (.ZIP files) can be used transparently as + * directory structures. + * + * This system is largely inspired by Quake 3's PK3 files and the related + * fs_* cvars. If you've ever tinkered with these, then this API will be + * familiar to you. + * + * With PhysicsFS, you have a single writing directory and multiple + * directories (the "search path") for reading. You can think of this as a + * filesystem within a filesystem. If (on Windows) you were to set the + * writing directory to "C:\MyGame\MyWritingDirectory", then no PHYSFS calls + * could touch anything above this directory, including the "C:\MyGame" and + * "C:\" directories. This prevents an application's internal scripting + * language from piddling over c:\\config.sys, for example. If you'd rather + * give PHYSFS full access to the system's REAL file system, set the writing + * dir to "C:\", but that's generally A Bad Thing for several reasons. + * + * Drive letters are hidden in PhysicsFS once you set up your initial paths. + * The search path creates a single, hierarchical directory structure. + * Not only does this lend itself well to general abstraction with archives, + * it also gives better support to operating systems like MacOS and Unix. + * Generally speaking, you shouldn't ever hardcode a drive letter; not only + * does this hurt portability to non-Microsoft OSes, but it limits your win32 + * users to a single drive, too. Use the PhysicsFS abstraction functions and + * allow user-defined configuration options, too. When opening a file, you + * specify it like it was on a Unix filesystem: if you want to write to + * "C:\MyGame\MyConfigFiles\game.cfg", then you might set the write dir to + * "C:\MyGame" and then open "MyConfigFiles/game.cfg". This gives an + * abstraction across all platforms. Specifying a file in this way is termed + * "platform-independent notation" in this documentation. Specifying a + * a filename in a form such as "C:\mydir\myfile" or + * "MacOS hard drive:My Directory:My File" is termed "platform-dependent + * notation". The only time you use platform-dependent notation is when + * setting up your write directory and search path; after that, all file + * access into those directories are done with platform-independent notation. + * + * All files opened for writing are opened in relation to the write directory, + * which is the root of the writable filesystem. When opening a file for + * reading, PhysicsFS goes through the search path. This is NOT the + * same thing as the PATH environment variable. An application using + * PhysicsFS specifies directories to be searched which may be actual + * directories, or archive files that contain files and subdirectories of + * their own. See the end of these docs for currently supported archive + * formats. + * + * Once the search path is defined, you may open files for reading. If you've + * got the following search path defined (to use a win32 example again): + * + * - C:\\mygame + * - C:\\mygame\\myuserfiles + * - D:\\mygamescdromdatafiles + * - C:\\mygame\\installeddatafiles.zip + * + * Then a call to PHYSFS_openRead("textfiles/myfile.txt") (note the directory + * separator, lack of drive letter, and lack of dir separator at the start of + * the string; this is platform-independent notation) will check for + * C:\\mygame\\textfiles\\myfile.txt, then + * C:\\mygame\\myuserfiles\\textfiles\\myfile.txt, then + * D:\\mygamescdromdatafiles\\textfiles\\myfile.txt, then, finally, for + * textfiles\\myfile.txt inside of C:\\mygame\\installeddatafiles.zip. + * Remember that most archive types and platform filesystems store their + * filenames in a case-sensitive manner, so you should be careful to specify + * it correctly. + * + * Files opened through PhysicsFS may NOT contain "." or ".." or ":" as dir + * elements. Not only are these meaningless on MacOS Classic and/or Unix, + * they are a security hole. Also, symbolic links (which can be found in + * some archive types and directly in the filesystem on Unix platforms) are + * NOT followed until you call PHYSFS_permitSymbolicLinks(). That's left to + * your own discretion, as following a symlink can allow for access outside + * the write dir and search paths. For portability, there is no mechanism for + * creating new symlinks in PhysicsFS. + * + * The write dir is not included in the search path unless you specifically + * add it. While you CAN change the write dir as many times as you like, + * you should probably set it once and stick to it. Remember that your + * program will not have permission to write in every directory on Unix and + * NT systems. + * + * All files are opened in binary mode; there is no endline conversion for + * textfiles. Other than that, PhysicsFS has some convenience functions for + * platform-independence. There is a function to tell you the current + * platform's dir separator ("\\" on windows, "/" on Unix, ":" on MacOS), + * which is needed only to set up your search/write paths. There is a + * function to tell you what CD-ROM drives contain accessible discs, and a + * function to recommend a good search path, etc. + * + * A recommended order for the search path is the write dir, then the base dir, + * then the cdrom dir, then any archives discovered. Quake 3 does something + * like this, but moves the archives to the start of the search path. Build + * Engine games, like Duke Nukem 3D and Blood, place the archives last, and + * use the base dir for both searching and writing. There is a helper + * function (PHYSFS_setSaneConfig()) that puts together a basic configuration + * for you, based on a few parameters. Also see the comments on + * PHYSFS_getBaseDir(), and PHYSFS_getUserDir() for info on what those + * are and how they can help you determine an optimal search path. + * + * PhysicsFS 2.0 adds the concept of "mounting" archives to arbitrary points + * in the search path. If a zipfile contains "maps/level.map" and you mount + * that archive at "mods/mymod", then you would have to open + * "mods/mymod/maps/level.map" to access the file, even though "mods/mymod" + * isn't actually specified in the .zip file. Unlike the Unix mentality of + * mounting a filesystem, "mods/mymod" doesn't actually have to exist when + * mounting the zipfile. It's a "virtual" directory. The mounting mechanism + * allows the developer to seperate archives in the tree and avoid trampling + * over files when added new archives, such as including mod support in a + * game...keeping external content on a tight leash in this manner can be of + * utmost importance to some applications. + * + * PhysicsFS is mostly thread safe. The error messages returned by + * PHYSFS_getLastError are unique by thread, and library-state-setting + * functions are mutex'd. For efficiency, individual file accesses are + * not locked, so you can not safely read/write/seek/close/etc the same + * file from two threads at the same time. Other race conditions are bugs + * that should be reported/patched. + * + * While you CAN use stdio/syscall file access in a program that has PHYSFS_* + * calls, doing so is not recommended, and you can not use system + * filehandles with PhysicsFS and vice versa. + * + * Note that archives need not be named as such: if you have a ZIP file and + * rename it with a .PKG extension, the file will still be recognized as a + * ZIP archive by PhysicsFS; the file's contents are used to determine its + * type where possible. + * + * Currently supported archive types: + * - .ZIP (pkZip/WinZip/Info-ZIP compatible) + * - .GRP (Build Engine groupfile archives) + * - .PAK (Quake I/II archive format) + * - .HOG (Descent I/II HOG file archives) + * - .MVL (Descent II movielib archives) + * - .WAD (DOOM engine archives) + * + * + * String policy for PhysicsFS 2.0 and later: + * + * PhysicsFS 1.0 could only deal with null-terminated ASCII strings. All high + * ASCII chars resulted in undefined behaviour, and there was no Unicode + * support at all. PhysicsFS 2.0 supports Unicode without breaking binary + * compatibility with the 1.0 API by using UTF-8 encoding of all strings + * passed in and out of the library. + * + * All strings passed through PhysicsFS are in null-terminated UTF-8 format. + * This means that if all you care about is English (ASCII characters <= 127) + * then you just use regular C strings. If you care about Unicode (and you + * should!) then you need to figure out what your platform wants, needs, and + * offers. If you are on Windows and build with Unicode support, your TCHAR + * strings are two bytes per character (this is called "UCS-2 encoding"). You + * should convert them to UTF-8 before handing them to PhysicsFS with + * PHYSFS_utf8FromUcs2(). If you're using Unix or Mac OS X, your wchar_t + * strings are four bytes per character ("UCS-4 encoding"). Use + * PHYSFS_utf8FromUcs4(). Mac OS X can give you UTF-8 directly from a + * CFString, and many Unixes generally give you C strings in UTF-8 format + * everywhere. If you have a single-byte high ASCII charset, like so-many + * European "codepages" you may be out of luck. We'll convert from "Latin1" + * to UTF-8 only, and never back to Latin1. If you're above ASCII 127, all + * bets are off: move to Unicode or use your platform's facilities. Passing a + * C string with high-ASCII data that isn't UTF-8 encoded will NOT do what + * you expect! + * + * Naturally, there's also PHYSFS_utf8ToUcs2() and PHYSFS_utf8ToUcs4() to get + * data back into a format you like. Behind the scenes, PhysicsFS will use + * Unicode where possible: the UTF-8 strings on Windows will be converted + * and used with the multibyte Windows APIs, for example. + * + * PhysicsFS offers basic encoding conversion support, but not a whole string + * library. Get your stuff into whatever format you can work with. + * + * Some platforms and archivers don't offer full Unicode support behind the + * scenes. For example, OS/2 only offers "codepages" and the filesystem + * itself doesn't support multibyte encodings. We make an earnest effort to + * convert to/from the current locale here, but all bets are off if + * you want to hand an arbitrary Japanese character through to these systems. + * Modern OSes (Mac OS X, Linux, Windows, PocketPC, etc) should all be fine. + * Many game-specific archivers are seriously unprepared for Unicode (the + * Descent HOG/MVL and Build Engine GRP archivers, for example, only offer a + * DOS 8.3 filename, for example). Nothing can be done for these, but they + * tend to be legacy formats for existing content that was all ASCII (and + * thus, valid UTF-8) anyhow. Other formats, like .ZIP, don't explicitly + * offer Unicode support, but unofficially expect filenames to be UTF-8 + * encoded, and thus Just Work. Most everything does the right thing without + * bothering you, but it's good to be aware of these nuances in case they + * don't. + * + * + * Other stuff: + * + * Please see the file LICENSE.txt in the source's root directory for licensing + * and redistribution rights. + * + * Please see the file CREDITS.txt in the source's root directory for a more or + * less complete list of who's responsible for this. + * + * \author Ryan C. Gordon. + */ + +#ifndef _INCLUDE_PHYSFS_H_ +#define _INCLUDE_PHYSFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +#ifndef ALLEGRO_STATICLINK +#if (defined _MSC_VER) +#if defined(ALLEGRO_SRC) || defined(ALLEGRO_PHYSFS_SRC) +#define __EXPORT__ __declspec(dllexport) +#else +#define __EXPORT__ __declspec(dllimport) +#endif +#elif (__GNUC__ >= 3) +#define __EXPORT__ __attribute__((visibility("default"))) +#else +#define __EXPORT__ +#endif +#else +#define __EXPORT__ +#endif +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ + +/** + * \typedef PHYSFS_uint8 + * \brief An unsigned, 8-bit integer type. + */ +typedef unsigned char PHYSFS_uint8; + +/** + * \typedef PHYSFS_sint8 + * \brief A signed, 8-bit integer type. + */ +typedef signed char PHYSFS_sint8; + +/** + * \typedef PHYSFS_uint16 + * \brief An unsigned, 16-bit integer type. + */ +typedef unsigned short PHYSFS_uint16; + +/** + * \typedef PHYSFS_sint16 + * \brief A signed, 16-bit integer type. + */ +typedef signed short PHYSFS_sint16; + +/** + * \typedef PHYSFS_uint32 + * \brief An unsigned, 32-bit integer type. + */ +typedef unsigned int PHYSFS_uint32; + +/** + * \typedef PHYSFS_sint32 + * \brief A signed, 32-bit integer type. + */ +typedef signed int PHYSFS_sint32; + +/** + * \typedef PHYSFS_uint64 + * \brief An unsigned, 64-bit integer type. + * \warning on platforms without any sort of 64-bit datatype, this is + * equivalent to PHYSFS_uint32! + */ + +/** + * \typedef PHYSFS_sint64 + * \brief A signed, 64-bit integer type. + * \warning on platforms without any sort of 64-bit datatype, this is + * equivalent to PHYSFS_sint32! + */ + + +#if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */ +typedef PHYSFS_uint32 PHYSFS_uint64; +typedef PHYSFS_sint32 PHYSFS_sint64; +#elif (defined _MSC_VER) +typedef signed __int64 PHYSFS_sint64; +typedef unsigned __int64 PHYSFS_uint64; +#else +typedef unsigned long long PHYSFS_uint64; +typedef signed long long PHYSFS_sint64; +#endif + + +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +/* Make sure the types really have the right sizes */ +#define PHYSFS_COMPILE_TIME_ASSERT(name, x) \ + typedef int PHYSFS_dummy_ ## name[(x) * 2 - 1] + +PHYSFS_COMPILE_TIME_ASSERT(uint8, sizeof(PHYSFS_uint8) == 1); +PHYSFS_COMPILE_TIME_ASSERT(sint8, sizeof(PHYSFS_sint8) == 1); +PHYSFS_COMPILE_TIME_ASSERT(uint16, sizeof(PHYSFS_uint16) == 2); +PHYSFS_COMPILE_TIME_ASSERT(sint16, sizeof(PHYSFS_sint16) == 2); +PHYSFS_COMPILE_TIME_ASSERT(uint32, sizeof(PHYSFS_uint32) == 4); +PHYSFS_COMPILE_TIME_ASSERT(sint32, sizeof(PHYSFS_sint32) == 4); + +#ifndef PHYSFS_NO_64BIT_SUPPORT +PHYSFS_COMPILE_TIME_ASSERT(uint64, sizeof(PHYSFS_uint64) == 8); +PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8); +#endif + +#undef PHYSFS_COMPILE_TIME_ASSERT + +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ + + +/** + * \struct PHYSFS_File + * \brief A PhysicsFS file handle. + * + * You get a pointer to one of these when you open a file for reading, + * writing, or appending via PhysicsFS. + * + * As you can see from the lack of meaningful fields, you should treat this + * as opaque data. Don't try to manipulate the file handle, just pass the + * pointer you got, unmolested, to various PhysicsFS APIs. + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + * \sa PHYSFS_close + * \sa PHYSFS_read + * \sa PHYSFS_write + * \sa PHYSFS_seek + * \sa PHYSFS_tell + * \sa PHYSFS_eof + * \sa PHYSFS_setBuffer + * \sa PHYSFS_flush + */ +typedef struct PHYSFS_File +{ + void *opaque; /**< That's all you get. Don't touch. */ +} PHYSFS_File; + + +/** + * \def PHYSFS_file + * \brief 1.0 API compatibility define. + * + * PHYSFS_file is identical to PHYSFS_File. This #define is here for backwards + * compatibility with the 1.0 API, which had an inconsistent capitalization + * convention in this case. New code should use PHYSFS_File, as this #define + * may go away someday. + * + * \sa PHYSFS_File + */ +#define PHYSFS_file PHYSFS_File + + +/** + * \struct PHYSFS_ArchiveInfo + * \brief Information on various PhysicsFS-supported archives. + * + * This structure gives you details on what sort of archives are supported + * by this implementation of PhysicsFS. Archives tend to be things like + * ZIP files and such. + * + * \warning Not all binaries are created equal! PhysicsFS can be built with + * or without support for various archives. You can check with + * PHYSFS_supportedArchiveTypes() to see if your archive type is + * supported. + * + * \sa PHYSFS_supportedArchiveTypes + */ +typedef struct PHYSFS_ArchiveInfo +{ + const char *extension; /**< Archive file extension: "ZIP", for example. */ + const char *description; /**< Human-readable archive description. */ + const char *author; /**< Person who did support for this archive. */ + const char *url; /**< URL related to this archive */ +} PHYSFS_ArchiveInfo; + + +/** + * \struct PHYSFS_Version + * \brief Information the version of PhysicsFS in use. + * + * Represents the library's version as three levels: major revision + * (increments with massive changes, additions, and enhancements), + * minor revision (increments with backwards-compatible changes to the + * major revision), and patchlevel (increments with fixes to the minor + * revision). + * + * \sa PHYSFS_VERSION + * \sa PHYSFS_getLinkedVersion + */ +typedef struct PHYSFS_Version +{ + PHYSFS_uint8 major; /**< major revision */ + PHYSFS_uint8 minor; /**< minor revision */ + PHYSFS_uint8 patch; /**< patchlevel */ +} PHYSFS_Version; + +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +#define PHYSFS_VER_MAJOR 2 +#define PHYSFS_VER_MINOR 0 +#define PHYSFS_VER_PATCH 1 +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ + + +/* PhysicsFS state stuff ... */ + +/** + * \def PHYSFS_VERSION(x) + * \brief Macro to determine PhysicsFS version program was compiled against. + * + * This macro fills in a PHYSFS_Version structure with the version of the + * library you compiled against. This is determined by what header the + * compiler uses. Note that if you dynamically linked the library, you might + * have a slightly newer or older version at runtime. That version can be + * determined with PHYSFS_getLinkedVersion(), which, unlike PHYSFS_VERSION, + * is not a macro. + * + * \param x A pointer to a PHYSFS_Version struct to initialize. + * + * \sa PHYSFS_Version + * \sa PHYSFS_getLinkedVersion + */ +#define PHYSFS_VERSION(x) \ +{ \ + (x)->major = PHYSFS_VER_MAJOR; \ + (x)->minor = PHYSFS_VER_MINOR; \ + (x)->patch = PHYSFS_VER_PATCH; \ +} + + +/** + * \fn void PHYSFS_getLinkedVersion(PHYSFS_Version *ver) + * \brief Get the version of PhysicsFS that is linked against your program. + * + * If you are using a shared library (DLL) version of PhysFS, then it is + * possible that it will be different than the version you compiled against. + * + * This is a real function; the macro PHYSFS_VERSION tells you what version + * of PhysFS you compiled against: + * + * \code + * PHYSFS_Version compiled; + * PHYSFS_Version linked; + * + * PHYSFS_VERSION(&compiled); + * PHYSFS_getLinkedVersion(&linked); + * printf("We compiled against PhysFS version %d.%d.%d ...\n", + * compiled.major, compiled.minor, compiled.patch); + * printf("But we linked against PhysFS version %d.%d.%d.\n", + * linked.major, linked.minor, linked.patch); + * \endcode + * + * This function may be called safely at any time, even before PHYSFS_init(). + * + * \sa PHYSFS_VERSION + */ +__EXPORT__ void PHYSFS_getLinkedVersion(PHYSFS_Version *ver); + + +/** + * \fn int PHYSFS_init(const char *argv0) + * \brief Initialize the PhysicsFS library. + * + * This must be called before any other PhysicsFS function. + * + * This should be called prior to any attempts to change your process's + * current working directory. + * + * \param argv0 the argv[0] string passed to your program's mainline. + * This may be NULL on most platforms (such as ones without a + * standard main() function), but you should always try to pass + * something in here. Unix-like systems such as Linux _need_ to + * pass argv[0] from main() in here. + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_deinit + * \sa PHYSFS_isInit + */ +__EXPORT__ int PHYSFS_init(const char *argv0); + + +/** + * \fn int PHYSFS_deinit(void) + * \brief Deinitialize the PhysicsFS library. + * + * This closes any files opened via PhysicsFS, blanks the search/write paths, + * frees memory, and invalidates all of your file handles. + * + * Note that this call can FAIL if there's a file open for writing that + * refuses to close (for example, the underlying operating system was + * buffering writes to network filesystem, and the fileserver has crashed, + * or a hard drive has failed, etc). It is usually best to close all write + * handles yourself before calling this function, so that you can gracefully + * handle a specific failure. + * + * Once successfully deinitialized, PHYSFS_init() can be called again to + * restart the subsystem. All default API states are restored at this + * point, with the exception of any custom allocator you might have + * specified, which survives between initializations. + * + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). If failure, state of PhysFS is + * undefined, and probably badly screwed up. + * + * \sa PHYSFS_init + * \sa PHYSFS_isInit + */ +__EXPORT__ int PHYSFS_deinit(void); + + +/** + * \fn const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void) + * \brief Get a list of supported archive types. + * + * Get a list of archive types supported by this implementation of PhysicFS. + * These are the file formats usable for search path entries. This is for + * informational purposes only. Note that the extension listed is merely + * convention: if we list "ZIP", you can open a PkZip-compatible archive + * with an extension of "XYZ", if you like. + * + * The returned value is an array of pointers to PHYSFS_ArchiveInfo structures, + * with a NULL entry to signify the end of the list: + * + * \code + * PHYSFS_ArchiveInfo **i; + * + * for (i = PHYSFS_supportedArchiveTypes(); *i != NULL; i++) + * { + * printf("Supported archive: [%s], which is [%s].\n", + * (*i)->extension, (*i)->description); + * } + * \endcode + * + * The return values are pointers to static internal memory, and should + * be considered READ ONLY, and never freed. + * + * \return READ ONLY Null-terminated array of READ ONLY structures. + */ +__EXPORT__ const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void); + + +/** + * \fn void PHYSFS_freeList(void *listVar) + * \brief Deallocate resources of lists returned by PhysicsFS. + * + * Certain PhysicsFS functions return lists of information that are + * dynamically allocated. Use this function to free those resources. + * + * \param listVar List of information specified as freeable by this function. + * + * \sa PHYSFS_getCdRomDirs + * \sa PHYSFS_enumerateFiles + * \sa PHYSFS_getSearchPath + */ +__EXPORT__ void PHYSFS_freeList(void *listVar); + + +/** + * \fn const char *PHYSFS_getLastError(void) + * \brief Get human-readable error information. + * + * Get the last PhysicsFS error message as a human-readable, null-terminated + * string. This will be NULL if there's been no error since the last call to + * this function. The pointer returned by this call points to an internal + * buffer. Each thread has a unique error state associated with it, but each + * time a new error message is set, it will overwrite the previous one + * associated with that thread. It is safe to call this function at anytime, + * even before PHYSFS_init(). + * + * It is not wise to expect a specific string of characters here, since the + * error message may be localized into an unfamiliar language. These strings + * are meant to be passed on directly to the user. + * + * \return READ ONLY string of last error message. + */ +__EXPORT__ const char *PHYSFS_getLastError(void); + + +/** + * \fn const char *PHYSFS_getDirSeparator(void) + * \brief Get platform-dependent dir separator string. + * + * This returns "\\" on win32, "/" on Unix, and ":" on MacOS. It may be more + * than one character, depending on the platform, and your code should take + * that into account. Note that this is only useful for setting up the + * search/write paths, since access into those dirs always use '/' + * (platform-independent notation) to separate directories. This is also + * handy for getting platform-independent access when using stdio calls. + * + * \return READ ONLY null-terminated string of platform's dir separator. + */ +__EXPORT__ const char *PHYSFS_getDirSeparator(void); + + +/** + * \fn void PHYSFS_permitSymbolicLinks(int allow) + * \brief Enable or disable following of symbolic links. + * + * Some physical filesystems and archives contain files that are just pointers + * to other files. On the physical filesystem, opening such a link will + * (transparently) open the file that is pointed to. + * + * By default, PhysicsFS will check if a file is really a symlink during open + * calls and fail if it is. Otherwise, the link could take you outside the + * write and search paths, and compromise security. + * + * If you want to take that risk, call this function with a non-zero parameter. + * Note that this is more for sandboxing a program's scripting language, in + * case untrusted scripts try to compromise the system. Generally speaking, + * a user could very well have a legitimate reason to set up a symlink, so + * unless you feel there's a specific danger in allowing them, you should + * permit them. + * + * Symlinks are only explicitly checked when dealing with filenames + * in platform-independent notation. That is, when setting up your + * search and write paths, etc, symlinks are never checked for. + * + * Symbolic link permission can be enabled or disabled at any time after + * you've called PHYSFS_init(), and is disabled by default. + * + * \param allow nonzero to permit symlinks, zero to deny linking. + * + * \sa PHYSFS_symbolicLinksPermitted + */ +__EXPORT__ void PHYSFS_permitSymbolicLinks(int allow); + + +/* !!! FIXME: const this? */ +/** + * \fn char **PHYSFS_getCdRomDirs(void) + * \brief Get an array of paths to available CD-ROM drives. + * + * The dirs returned are platform-dependent ("D:\" on Win32, "/cdrom" or + * whatnot on Unix). Dirs are only returned if there is a disc ready and + * accessible in the drive. So if you've got two drives (D: and E:), and only + * E: has a disc in it, then that's all you get. If the user inserts a disc + * in D: and you call this function again, you get both drives. If, on a + * Unix box, the user unmounts a disc and remounts it elsewhere, the next + * call to this function will reflect that change. + * + * This function refers to "CD-ROM" media, but it really means "inserted disc + * media," such as DVD-ROM, HD-DVD, CDRW, and Blu-Ray discs. It looks for + * filesystems, and as such won't report an audio CD, unless there's a + * mounted filesystem track on it. + * + * The returned value is an array of strings, with a NULL entry to signify the + * end of the list: + * + * \code + * char **cds = PHYSFS_getCdRomDirs(); + * char **i; + * + * for (i = cds; *i != NULL; i++) + * printf("cdrom dir [%s] is available.\n", *i); + * + * PHYSFS_freeList(cds); + * \endcode + * + * This call may block while drives spin up. Be forewarned. + * + * When you are done with the returned information, you may dispose of the + * resources by calling PHYSFS_freeList() with the returned pointer. + * + * \return Null-terminated array of null-terminated strings. + * + * \sa PHYSFS_getCdRomDirsCallback + */ +__EXPORT__ char **PHYSFS_getCdRomDirs(void); + + +/** + * \fn const char *PHYSFS_getBaseDir(void) + * \brief Get the path where the application resides. + * + * Helper function. + * + * Get the "base dir". This is the directory where the application was run + * from, which is probably the installation directory, and may or may not + * be the process's current working directory. + * + * You should probably use the base dir in your search path. + * + * \return READ ONLY string of base dir in platform-dependent notation. + * + * \sa PHYSFS_getUserDir + */ +__EXPORT__ const char *PHYSFS_getBaseDir(void); + + +/** + * \fn const char *PHYSFS_getUserDir(void) + * \brief Get the path where user's home directory resides. + * + * Helper function. + * + * Get the "user dir". This is meant to be a suggestion of where a specific + * user of the system can store files. On Unix, this is her home directory. + * On systems with no concept of multiple home directories (MacOS, win95), + * this will default to something like "C:\mybasedir\users\username" + * where "username" will either be the login name, or "default" if the + * platform doesn't support multiple users, either. + * + * You should probably use the user dir as the basis for your write dir, and + * also put it near the beginning of your search path. + * + * \return READ ONLY string of user dir in platform-dependent notation. + * + * \sa PHYSFS_getBaseDir + */ +__EXPORT__ const char *PHYSFS_getUserDir(void); + + +/** + * \fn const char *PHYSFS_getWriteDir(void) + * \brief Get path where PhysicsFS will allow file writing. + * + * Get the current write dir. The default write dir is NULL. + * + * \return READ ONLY string of write dir in platform-dependent notation, + * OR NULL IF NO WRITE PATH IS CURRENTLY SET. + * + * \sa PHYSFS_setWriteDir + */ +__EXPORT__ const char *PHYSFS_getWriteDir(void); + + +/** + * \fn int PHYSFS_setWriteDir(const char *newDir) + * \brief Tell PhysicsFS where it may write files. + * + * Set a new write dir. This will override the previous setting. + * + * This call will fail (and fail to change the write dir) if the current + * write dir still has files open in it. + * + * \param newDir The new directory to be the root of the write dir, + * specified in platform-dependent notation. Setting to NULL + * disables the write dir, so no files can be opened for + * writing via PhysicsFS. + * \return non-zero on success, zero on failure. All attempts to open a file + * for writing via PhysicsFS will fail until this call succeeds. + * Specifics of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_getWriteDir + */ +__EXPORT__ int PHYSFS_setWriteDir(const char *newDir); + + +/** + * \fn int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) + * \brief Add an archive or directory to the search path. + * + * This is a legacy call in PhysicsFS 2.0, equivalent to: + * PHYSFS_mount(newDir, NULL, appendToPath); + * + * You must use this and not PHYSFS_mount if binary compatibility with + * PhysicsFS 1.0 is important (which it may not be for many people). + * + * \sa PHYSFS_mount + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + */ +__EXPORT__ int PHYSFS_addToSearchPath(const char *newDir, int appendToPath); + + +/** + * \fn int PHYSFS_removeFromSearchPath(const char *oldDir) + * \brief Remove a directory or archive from the search path. + * + * This must be a (case-sensitive) match to a dir or archive already in the + * search path, specified in platform-dependent notation. + * + * This call will fail (and fail to remove from the path) if the element still + * has files open in it. + * + * \param oldDir dir/archive to remove. + * \return nonzero on success, zero on failure. + * Specifics of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_addToSearchPath + * \sa PHYSFS_getSearchPath + */ +__EXPORT__ int PHYSFS_removeFromSearchPath(const char *oldDir); + + +/** + * \fn char **PHYSFS_getSearchPath(void) + * \brief Get the current search path. + * + * The default search path is an empty list. + * + * The returned value is an array of strings, with a NULL entry to signify the + * end of the list: + * + * \code + * char **i; + * + * for (i = PHYSFS_getSearchPath(); *i != NULL; i++) + * printf("[%s] is in the search path.\n", *i); + * \endcode + * + * When you are done with the returned information, you may dispose of the + * resources by calling PHYSFS_freeList() with the returned pointer. + * + * \return Null-terminated array of null-terminated strings. NULL if there + * was a problem (read: OUT OF MEMORY). + * + * \sa PHYSFS_getSearchPathCallback + * \sa PHYSFS_addToSearchPath + * \sa PHYSFS_removeFromSearchPath + */ +__EXPORT__ char **PHYSFS_getSearchPath(void); + + +/** + * \fn int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst) + * \brief Set up sane, default paths. + * + * Helper function. + * + * The write dir will be set to "userdir/.organization/appName", which is + * created if it doesn't exist. + * + * The above is sufficient to make sure your program's configuration directory + * is separated from other clutter, and platform-independent. The period + * before "mygame" even hides the directory on Unix systems. + * + * The search path will be: + * + * - The Write Dir (created if it doesn't exist) + * - The Base Dir (PHYSFS_getBaseDir()) + * - All found CD-ROM dirs (optionally) + * + * These directories are then searched for files ending with the extension + * (archiveExt), which, if they are valid and supported archives, will also + * be added to the search path. If you specified "PKG" for (archiveExt), and + * there's a file named data.PKG in the base dir, it'll be checked. Archives + * can either be appended or prepended to the search path in alphabetical + * order, regardless of which directories they were found in. + * + * All of this can be accomplished from the application, but this just does it + * all for you. Feel free to add more to the search path manually, too. + * + * \param organization Name of your company/group/etc to be used as a + * dirname, so keep it small, and no-frills. + * + * \param appName Program-specific name of your program, to separate it + * from other programs using PhysicsFS. + * + * \param archiveExt File extension used by your program to specify an + * archive. For example, Quake 3 uses "pk3", even though + * they are just zipfiles. Specify NULL to not dig out + * archives automatically. Do not specify the '.' char; + * If you want to look for ZIP files, specify "ZIP" and + * not ".ZIP" ... the archive search is case-insensitive. + * + * \param includeCdRoms Non-zero to include CD-ROMs in the search path, and + * (if (archiveExt) != NULL) search them for archives. + * This may cause a significant amount of blocking + * while discs are accessed, and if there are no discs + * in the drive (or even not mounted on Unix systems), + * then they may not be made available anyhow. You may + * want to specify zero and handle the disc setup + * yourself. + * + * \param archivesFirst Non-zero to prepend the archives to the search path. + * Zero to append them. Ignored if !(archiveExt). + * + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_setSaneConfig(const char *organization, + const char *appName, + const char *archiveExt, + int includeCdRoms, + int archivesFirst); + + +/* Directory management stuff ... */ + +/** + * \fn int PHYSFS_mkdir(const char *dirName) + * \brief Create a directory. + * + * This is specified in platform-independent notation in relation to the + * write dir. All missing parent directories are also created if they + * don't exist. + * + * So if you've got the write dir set to "C:\mygame\writedir" and call + * PHYSFS_mkdir("downloads/maps") then the directories + * "C:\mygame\writedir\downloads" and "C:\mygame\writedir\downloads\maps" + * will be created if possible. If the creation of "maps" fails after we + * have successfully created "downloads", then the function leaves the + * created directory behind and reports failure. + * + * \param dirName New dir to create. + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_delete + */ +__EXPORT__ int PHYSFS_mkdir(const char *dirName); + + +/** + * \fn int PHYSFS_delete(const char *filename) + * \brief Delete a file or directory. + * + * (filename) is specified in platform-independent notation in relation to the + * write dir. + * + * A directory must be empty before this call can delete it. + * + * Deleting a symlink will remove the link, not what it points to, regardless + * of whether you "permitSymLinks" or not. + * + * So if you've got the write dir set to "C:\mygame\writedir" and call + * PHYSFS_delete("downloads/maps/level1.map") then the file + * "C:\mygame\writedir\downloads\maps\level1.map" is removed from the + * physical filesystem, if it exists and the operating system permits the + * deletion. + * + * Note that on Unix systems, deleting a file may be successful, but the + * actual file won't be removed until all processes that have an open + * filehandle to it (including your program) close their handles. + * + * Chances are, the bits that make up the file still exist, they are just + * made available to be written over at a later point. Don't consider this + * a security method or anything. :) + * + * \param filename Filename to delete. + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_delete(const char *filename); + + +/** + * \fn const char *PHYSFS_getRealDir(const char *filename) + * \brief Figure out where in the search path a file resides. + * + * The file is specified in platform-independent notation. The returned + * filename will be the element of the search path where the file was found, + * which may be a directory, or an archive. Even if there are multiple + * matches in different parts of the search path, only the first one found + * is used, just like when opening a file. + * + * So, if you look for "maps/level1.map", and C:\\mygame is in your search + * path and C:\\mygame\\maps\\level1.map exists, then "C:\mygame" is returned. + * + * If a any part of a match is a symbolic link, and you've not explicitly + * permitted symlinks, then it will be ignored, and the search for a match + * will continue. + * + * If you specify a fake directory that only exists as a mount point, it'll + * be associated with the first archive mounted there, even though that + * directory isn't necessarily contained in a real archive. + * + * \param filename file to look for. + * \return READ ONLY string of element of search path containing the + * the file in question. NULL if not found. + */ +__EXPORT__ const char *PHYSFS_getRealDir(const char *filename); + + +/** + * \fn char **PHYSFS_enumerateFiles(const char *dir) + * \brief Get a file listing of a search path's directory. + * + * Matching directories are interpolated. That is, if "C:\mydir" is in the + * search path and contains a directory "savegames" that contains "x.sav", + * "y.sav", and "z.sav", and there is also a "C:\userdir" in the search path + * that has a "savegames" subdirectory with "w.sav", then the following code: + * + * \code + * char **rc = PHYSFS_enumerateFiles("savegames"); + * char **i; + * + * for (i = rc; *i != NULL; i++) + * printf(" * We've got [%s].\n", *i); + * + * PHYSFS_freeList(rc); + * \endcode + * + * \...will print: + * + * \verbatim + * We've got [x.sav]. + * We've got [y.sav]. + * We've got [z.sav]. + * We've got [w.sav].\endverbatim + * + * Feel free to sort the list however you like. We only promise there will + * be no duplicates, but not what order the final list will come back in. + * + * Don't forget to call PHYSFS_freeList() with the return value from this + * function when you are done with it. + * + * \param dir directory in platform-independent notation to enumerate. + * \return Null-terminated array of null-terminated strings. + * + * \sa PHYSFS_enumerateFilesCallback + */ +__EXPORT__ char **PHYSFS_enumerateFiles(const char *dir); + + +/** + * \fn int PHYSFS_exists(const char *fname) + * \brief Determine if a file exists in the search path. + * + * Reports true if there is an entry anywhere in the search path by the + * name of (fname). + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you + * might end up further down in the search path than expected. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists. zero otherwise. + * + * \sa PHYSFS_isDirectory + * \sa PHYSFS_isSymbolicLink + */ +__EXPORT__ int PHYSFS_exists(const char *fname); + + +/** + * \fn int PHYSFS_isDirectory(const char *fname) + * \brief Determine if a file in the search path is really a directory. + * + * Determine if the first occurence of (fname) in the search path is + * really a directory entry. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you + * might end up further down in the search path than expected. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists and is a directory. zero otherwise. + * + * \sa PHYSFS_exists + * \sa PHYSFS_isSymbolicLink + */ +__EXPORT__ int PHYSFS_isDirectory(const char *fname); + + +/** + * \fn int PHYSFS_isSymbolicLink(const char *fname) + * \brief Determine if a file in the search path is really a symbolic link. + * + * Determine if the first occurence of (fname) in the search path is + * really a symbolic link. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and as such, + * this function will always return 0 in that case. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists and is a symlink. zero otherwise. + * + * \sa PHYSFS_exists + * \sa PHYSFS_isDirectory + */ +__EXPORT__ int PHYSFS_isSymbolicLink(const char *fname); + + +/** + * \fn PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename) + * \brief Get the last modification time of a file. + * + * The modtime is returned as a number of seconds since the epoch + * (Jan 1, 1970). The exact derivation and accuracy of this time depends on + * the particular archiver. If there is no reasonable way to obtain this + * information for a particular archiver, or there was some sort of error, + * this function returns (-1). + * + * \param filename filename to check, in platform-independent notation. + * \return last modified time of the file. -1 if it can't be determined. + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename); + + +/* i/o stuff... */ + +/** + * \fn PHYSFS_File *PHYSFS_openWrite(const char *filename) + * \brief Open a file for writing. + * + * Open a file for writing, in platform-independent notation and in relation + * to the write dir as the root of the writable filesystem. The specified + * file is created if it doesn't exist. If it does exist, it is truncated to + * zero bytes, and the writing offset is set to the start. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. Specifics + * of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openAppend + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +__EXPORT__ PHYSFS_File *PHYSFS_openWrite(const char *filename); + + +/** + * \fn PHYSFS_File *PHYSFS_openAppend(const char *filename) + * \brief Open a file for appending. + * + * Open a file for writing, in platform-independent notation and in relation + * to the write dir as the root of the writable filesystem. The specified + * file is created if it doesn't exist. If it does exist, the writing offset + * is set to the end of the file, so the first write will be the byte after + * the end. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. Specifics + * of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +__EXPORT__ PHYSFS_File *PHYSFS_openAppend(const char *filename); + + +/** + * \fn PHYSFS_File *PHYSFS_openRead(const char *filename) + * \brief Open a file for reading. + * + * Open a file for reading, in platform-independent notation. The search path + * is checked one at a time until a matching file is found, in which case an + * abstract filehandle is associated with it, and reading may be done. + * The reading offset is set to the first byte of the file. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. Specifics + * of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + * \sa PHYSFS_read + * \sa PHYSFS_close + */ +__EXPORT__ PHYSFS_File *PHYSFS_openRead(const char *filename); + + +/** + * \fn int PHYSFS_close(PHYSFS_File *handle) + * \brief Close a PhysicsFS filehandle. + * + * This call is capable of failing if the operating system was buffering + * writes to the physical media, and, now forced to write those changes to + * physical media, can not store the data for some reason. In such a case, + * the filehandle stays open. A well-written program should ALWAYS check the + * return value from the close call in addition to every writing call! + * + * \param handle handle returned from PHYSFS_open*(). + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + */ +__EXPORT__ int PHYSFS_close(PHYSFS_File *handle); + + +/** + * \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) + * \brief Read data from a PhysicsFS filehandle + * + * The file must be opened for reading. + * + * \param handle handle returned from PHYSFS_openRead(). + * \param buffer buffer to store read data into. + * \param objSize size in bytes of objects being read from (handle). + * \param objCount number of (objSize) objects to read from (handle). + * \return number of objects read. PHYSFS_getLastError() can shed light on + * the reason this might be < (objCount), as can PHYSFS_eof(). + * -1 if complete failure. + * + * \sa PHYSFS_eof + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, + void *buffer, + PHYSFS_uint32 objSize, + PHYSFS_uint32 objCount); + +/** + * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) + * \brief Write data to a PhysicsFS filehandle + * + * The file must be opened for writing. + * + * \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). + * \param buffer buffer to store read data into. + * \param objSize size in bytes of objects being read from (handle). + * \param objCount number of (objSize) objects to read from (handle). + * \return number of objects written. PHYSFS_getLastError() can shed light on + * the reason this might be < (objCount). -1 if complete failure. + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, + const void *buffer, + PHYSFS_uint32 objSize, + PHYSFS_uint32 objCount); + + +/* File position stuff... */ + +/** + * \fn int PHYSFS_eof(PHYSFS_File *handle) + * \brief Check for end-of-file state on a PhysicsFS filehandle. + * + * Determine if the end of file has been reached in a PhysicsFS filehandle. + * + * \param handle handle returned from PHYSFS_openRead(). + * \return nonzero if EOF, zero if not. + * + * \sa PHYSFS_read + * \sa PHYSFS_tell + */ +__EXPORT__ int PHYSFS_eof(PHYSFS_File *handle); + + +/** + * \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle) + * \brief Determine current position within a PhysicsFS filehandle. + * + * \param handle handle returned from PHYSFS_open*(). + * \return offset in bytes from start of file. -1 if error occurred. + * Specifics of the error can be gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_seek + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle); + + +/** + * \fn int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos) + * \brief Seek to a new position within a PhysicsFS filehandle. + * + * The next read or write will occur at that place. Seeking past the + * beginning or end of the file is not allowed, and causes an error. + * + * \param handle handle returned from PHYSFS_open*(). + * \param pos number of bytes from start of file to seek to. + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_tell + */ +__EXPORT__ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos); + + +/** + * \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle) + * \brief Get total length of a file in bytes. + * + * Note that if the file size can't be determined (since the archive is + * "streamed" or whatnot) than this will report (-1). Also note that if + * another process/thread is writing to this file at the same time, then + * the information this function supplies could be incorrect before you + * get it. Use with caution, or better yet, don't use at all. + * + * \param handle handle returned from PHYSFS_open*(). + * \return size in bytes of the file. -1 if can't be determined. + * + * \sa PHYSFS_tell + * \sa PHYSFS_seek + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle); + + +/* Buffering stuff... */ + +/** + * \fn int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize) + * \brief Set up buffering for a PhysicsFS file handle. + * + * Define an i/o buffer for a file handle. A memory block of (bufsize) bytes + * will be allocated and associated with (handle). + * + * For files opened for reading, up to (bufsize) bytes are read from (handle) + * and stored in the internal buffer. Calls to PHYSFS_read() will pull + * from this buffer until it is empty, and then refill it for more reading. + * Note that compressed files, like ZIP archives, will decompress while + * buffering, so this can be handy for offsetting CPU-intensive operations. + * The buffer isn't filled until you do your next read. + * + * For files opened for writing, data will be buffered to memory until the + * buffer is full or the buffer is flushed. Closing a handle implicitly + * causes a flush...check your return values! + * + * Seeking, etc transparently accounts for buffering. + * + * You can resize an existing buffer by calling this function more than once + * on the same file. Setting the buffer size to zero will free an existing + * buffer. + * + * PhysicsFS file handles are unbuffered by default. + * + * Please check the return value of this function! Failures can include + * not being able to seek backwards in a read-only file when removing the + * buffer, not being able to allocate the buffer, and not being able to + * flush the buffer to disk, among other unexpected problems. + * + * \param handle handle returned from PHYSFS_open*(). + * \param bufsize size, in bytes, of buffer to allocate. + * \return nonzero if successful, zero on error. + * + * \sa PHYSFS_flush + * \sa PHYSFS_read + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +__EXPORT__ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize); + + +/** + * \fn int PHYSFS_flush(PHYSFS_File *handle) + * \brief Flush a buffered PhysicsFS file handle. + * + * For buffered files opened for writing, this will put the current contents + * of the buffer to disk and flag the buffer as empty if possible. + * + * For buffered files opened for reading or unbuffered files, this is a safe + * no-op, and will report success. + * + * \param handle handle returned from PHYSFS_open*(). + * \return nonzero if successful, zero on error. + * + * \sa PHYSFS_setBuffer + * \sa PHYSFS_close + */ +__EXPORT__ int PHYSFS_flush(PHYSFS_File *handle); + + +/* Byteorder stuff... */ + +/** + * \fn PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val) + * \brief Swap littleendian signed 16 to platform's native byte order. + * + * Take a 16-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val); + + +/** + * \fn PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val) + * \brief Swap littleendian unsigned 16 to platform's native byte order. + * + * Take a 16-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val); + +/** + * \fn PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val) + * \brief Swap littleendian signed 32 to platform's native byte order. + * + * Take a 32-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val); + + +/** + * \fn PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val) + * \brief Swap littleendian unsigned 32 to platform's native byte order. + * + * Take a 32-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val); + +/** + * \fn PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val) + * \brief Swap littleendian signed 64 to platform's native byte order. + * + * Take a 64-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val); + + +/** + * \fn PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val) + * \brief Swap littleendian unsigned 64 to platform's native byte order. + * + * Take a 64-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val); + + +/** + * \fn PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val) + * \brief Swap bigendian signed 16 to platform's native byte order. + * + * Take a 16-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val); + + +/** + * \fn PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val) + * \brief Swap bigendian unsigned 16 to platform's native byte order. + * + * Take a 16-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val); + +/** + * \fn PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val) + * \brief Swap bigendian signed 32 to platform's native byte order. + * + * Take a 32-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val); + + +/** + * \fn PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val) + * \brief Swap bigendian unsigned 32 to platform's native byte order. + * + * Take a 32-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +__EXPORT__ PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val); + + +/** + * \fn PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val) + * \brief Swap bigendian signed 64 to platform's native byte order. + * + * Take a 64-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val); + + +/** + * \fn PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val) + * \brief Swap bigendian unsigned 64 to platform's native byte order. + * + * Take a 64-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val); + + +/** + * \fn int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val) + * \brief Read and convert a signed 16-bit littleendian value. + * + * Convenience function. Read a signed 16-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val); + + +/** + * \fn int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val) + * \brief Read and convert an unsigned 16-bit littleendian value. + * + * Convenience function. Read an unsigned 16-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + */ +__EXPORT__ int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val); + + +/** + * \fn int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val) + * \brief Read and convert a signed 16-bit bigendian value. + * + * Convenience function. Read a signed 16-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val); + + +/** + * \fn int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val) + * \brief Read and convert an unsigned 16-bit bigendian value. + * + * Convenience function. Read an unsigned 16-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + */ +__EXPORT__ int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val); + + +/** + * \fn int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val) + * \brief Read and convert a signed 32-bit littleendian value. + * + * Convenience function. Read a signed 32-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val); + + +/** + * \fn int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val) + * \brief Read and convert an unsigned 32-bit littleendian value. + * + * Convenience function. Read an unsigned 32-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + */ +__EXPORT__ int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val); + + +/** + * \fn int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val) + * \brief Read and convert a signed 32-bit bigendian value. + * + * Convenience function. Read a signed 32-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val); + + +/** + * \fn int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val) + * \brief Read and convert an unsigned 32-bit bigendian value. + * + * Convenience function. Read an unsigned 32-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + */ +__EXPORT__ int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val); + + +/** + * \fn int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val) + * \brief Read and convert a signed 64-bit littleendian value. + * + * Convenience function. Read a signed 64-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val); + + +/** + * \fn int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val) + * \brief Read and convert an unsigned 64-bit littleendian value. + * + * Convenience function. Read an unsigned 64-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val); + + +/** + * \fn int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val) + * \brief Read and convert a signed 64-bit bigendian value. + * + * Convenience function. Read a signed 64-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val); + + +/** + * \fn int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val) + * \brief Read and convert an unsigned 64-bit bigendian value. + * + * Convenience function. Read an unsigned 64-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val); + + +/** + * \fn int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val) + * \brief Convert and write a signed 16-bit littleendian value. + * + * Convenience function. Convert a signed 16-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val); + + +/** + * \fn int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val) + * \brief Convert and write an unsigned 16-bit littleendian value. + * + * Convenience function. Convert an unsigned 16-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val); + + +/** + * \fn int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val) + * \brief Convert and write a signed 16-bit bigendian value. + * + * Convenience function. Convert a signed 16-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val); + + +/** + * \fn int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val) + * \brief Convert and write an unsigned 16-bit bigendian value. + * + * Convenience function. Convert an unsigned 16-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val); + + +/** + * \fn int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val) + * \brief Convert and write a signed 32-bit littleendian value. + * + * Convenience function. Convert a signed 32-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val); + + +/** + * \fn int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val) + * \brief Convert and write an unsigned 32-bit littleendian value. + * + * Convenience function. Convert an unsigned 32-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val); + + +/** + * \fn int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val) + * \brief Convert and write a signed 32-bit bigendian value. + * + * Convenience function. Convert a signed 32-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val); + + +/** + * \fn int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val) + * \brief Convert and write an unsigned 32-bit bigendian value. + * + * Convenience function. Convert an unsigned 32-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + */ +__EXPORT__ int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val); + + +/** + * \fn int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val) + * \brief Convert and write a signed 64-bit littleendian value. + * + * Convenience function. Convert a signed 64-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val); + + +/** + * \fn int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val) + * \brief Convert and write an unsigned 64-bit littleendian value. + * + * Convenience function. Convert an unsigned 64-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val); + + +/** + * \fn int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val) + * \brief Convert and write a signed 64-bit bigending value. + * + * Convenience function. Convert a signed 64-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val); + + +/** + * \fn int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val) + * \brief Convert and write an unsigned 64-bit bigendian value. + * + * Convenience function. Convert an unsigned 64-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastError(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +__EXPORT__ int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val); + + +/* Everything above this line is part of the PhysicsFS 1.0 API. */ + +/** + * \fn int PHYSFS_isInit(void) + * \brief Determine if the PhysicsFS library is initialized. + * + * Once PHYSFS_init() returns successfully, this will return non-zero. + * Before a successful PHYSFS_init() and after PHYSFS_deinit() returns + * successfully, this will return zero. This function is safe to call at + * any time. + * + * \return non-zero if library is initialized, zero if library is not. + * + * \sa PHYSFS_init + * \sa PHYSFS_deinit + */ +__EXPORT__ int PHYSFS_isInit(void); + + +/** + * \fn int PHYSFS_symbolicLinksPermitted(void) + * \brief Determine if the symbolic links are permitted. + * + * This reports the setting from the last call to PHYSFS_permitSymbolicLinks(). + * If PHYSFS_permitSymbolicLinks() hasn't been called since the library was + * last initialized, symbolic links are implicitly disabled. + * + * \return non-zero if symlinks are permitted, zero if not. + * + * \sa PHYSFS_permitSymbolicLinks + */ +__EXPORT__ int PHYSFS_symbolicLinksPermitted(void); + + +/** + * \struct PHYSFS_Allocator + * \brief PhysicsFS allocation function pointers. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * You create one of these structures for use with PHYSFS_setAllocator. + * Allocators are assumed to be reentrant by the caller; please mutex + * accordingly. + * + * Allocations are always discussed in 64-bits, for future expansion...we're + * on the cusp of a 64-bit transition, and we'll probably be allocating 6 + * gigabytes like it's nothing sooner or later, and I don't want to change + * this again at that point. If you're on a 32-bit platform and have to + * downcast, it's okay to return NULL if the allocation is greater than + * 4 gigabytes, since you'd have to do so anyhow. + * + * \sa PHYSFS_setAllocator + */ +typedef struct PHYSFS_Allocator +{ + int (*Init)(void); /**< Initialize. Can be NULL. Zero on failure. */ + void (*Deinit)(void); /**< Deinitialize your allocator. Can be NULL. */ + void *(*Malloc)(PHYSFS_uint64); /**< Allocate like malloc(). */ + void *(*Realloc)(void *, PHYSFS_uint64); /**< Reallocate like realloc(). */ + void (*Free)(void *); /**< Free memory from Malloc or Realloc. */ +} PHYSFS_Allocator; + + +/** + * \fn int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator) + * \brief Hook your own allocation routines into PhysicsFS. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * By default, PhysicsFS will use whatever is reasonable for a platform + * to manage dynamic memory (usually ANSI C malloc/realloc/calloc/free, but + * some platforms might use something else), but in some uncommon cases, the + * app might want more control over the library's memory management. This + * lets you redirect PhysicsFS to use your own allocation routines instead. + * You can only call this function before PHYSFS_init(); if the library is + * initialized, it'll reject your efforts to change the allocator mid-stream. + * You may call this function after PHYSFS_deinit() if you are willing to + * shut down the library and restart it with a new allocator; this is a safe + * and supported operation. The allocator remains intact between deinit/init + * calls. If you want to return to the platform's default allocator, pass a + * NULL in here. + * + * If you aren't immediately sure what to do with this function, you can + * safely ignore it altogether. + * + * \param allocator Structure containing your allocator's entry points. + * \return zero on failure, non-zero on success. This call only fails + * when used between PHYSFS_init() and PHYSFS_deinit() calls. + */ +__EXPORT__ int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator); + + +/** + * \fn int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath) + * \brief Add an archive or directory to the search path. + * + * If this is a duplicate, the entry is not added again, even though the + * function succeeds. You may not add the same archive to two different + * mountpoints: duplicate checking is done against the archive and not the + * mountpoint. + * + * When you mount an archive, it is added to a virtual file system...all files + * in all of the archives are interpolated into a single hierachical file + * tree. Two archives mounted at the same place (or an archive with files + * overlapping another mountpoint) may have overlapping files: in such a case, + * the file earliest in the search path is selected, and the other files are + * inaccessible to the application. This allows archives to be used to + * override previous revisions; you can use the mounting mechanism to place + * archives at a specific point in the file tree and prevent overlap; this + * is useful for downloadable mods that might trample over application data + * or each other, for example. + * + * The mountpoint does not need to exist prior to mounting, which is different + * than those familiar with the Unix concept of "mounting" may not expect. + * As well, more than one archive can be mounted to the same mountpoint, or + * mountpoints and archive contents can overlap...the interpolation mechanism + * still functions as usual. + * + * \param newDir directory or archive to add to the path, in + * platform-dependent notation. + * \param mountPoint Location in the interpolated tree that this archive + * will be "mounted", in platform-independent notation. + * NULL or "" is equivalent to "/". + * \param appendToPath nonzero to append to search path, zero to prepend. + * \return nonzero if added to path, zero on failure (bogus archive, dir + * missing, etc). Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +__EXPORT__ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath); + +/** + * \fn int PHYSFS_getMountPoint(const char *dir) + * \brief Determine a mounted archive's mountpoint. + * + * You give this function the name of an archive or dir you successfully + * added to the search path, and it reports the location in the interpolated + * tree where it is mounted. Files mounted with a NULL mountpoint or through + * PHYSFS_addToSearchPath() will report "/". The return value is READ ONLY + * and valid until the archive is removed from the search path. + * + * \param dir directory or archive previously added to the path, in + * platform-dependent notation. This must match the string + * used when adding, even if your string would also reference + * the same file with a different string of characters. + * \return READ-ONLY string of mount point if added to path, NULL on failure + * (bogus archive, etc) Specifics of the error can be gleaned from + * PHYSFS_getLastError(). + * + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +__EXPORT__ const char *PHYSFS_getMountPoint(const char *dir); + + +/** + * \typedef PHYSFS_StringCallback + * \brief Function signature for callbacks that report strings. + * + * These are used to report a list of strings to an original caller, one + * string per callback. All strings are UTF-8 encoded. Functions should not + * try to modify or free the string's memory. + * + * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to + * functions that would return lists that need to be cleaned up with + * PHYSFS_freeList(). The callback means that the library doesn't need to + * allocate an entire list and all the strings up front. + * + * Be aware that promises data ordering in the list versions are not + * necessarily so in the callback versions. Check the documentation on + * specific APIs, but strings may not be sorted as you expect. + * + * \param data User-defined data pointer, passed through from the API + * that eventually called the callback. + * \param str The string data about which the callback is meant to inform. + * + * \sa PHYSFS_getCdRomDirsCallback + * \sa PHYSFS_getSearchPathCallback + */ +typedef void (*PHYSFS_StringCallback)(void *data, const char *str); + + +/** + * \typedef PHYSFS_EnumFilesCallback + * \brief Function signature for callbacks that enumerate files. + * + * These are used to report a list of directory entries to an original caller, + * one file/dir/symlink per callback. All strings are UTF-8 encoded. + * Functions should not try to modify or free any string's memory. + * + * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to + * functions that would return lists that need to be cleaned up with + * PHYSFS_freeList(). The callback means that the library doesn't need to + * allocate an entire list and all the strings up front. + * + * Be aware that promises data ordering in the list versions are not + * necessarily so in the callback versions. Check the documentation on + * specific APIs, but strings may not be sorted as you expect. + * + * \param data User-defined data pointer, passed through from the API + * that eventually called the callback. + * \param origdir A string containing the full path, in platform-independent + * notation, of the directory containing this file. In most + * cases, this is the directory on which you requested + * enumeration, passed in the callback for your convenience. + * \param fname The filename that is being enumerated. It may not be in + * alphabetical order compared to other callbacks that have + * fired, and it will not contain the full path. You can + * recreate the fullpath with $origdir/$fname ... The file + * can be a subdirectory, a file, a symlink, etc. + * + * \sa PHYSFS_enumerateFilesCallback + */ +typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir, + const char *fname); + + +/** + * \fn void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d) + * \brief Enumerate CD-ROM directories, using an application-defined callback. + * + * Internally, PHYSFS_getCdRomDirs() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_getCdRomDirs(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * detected disc: + * + * \code + * + * static void foundDisc(void *data, const char *cddir) + * { + * printf("cdrom dir [%s] is available.\n", cddir); + * } + * + * // ... + * PHYSFS_getCdRomDirsCallback(foundDisc, NULL); + * \endcode + * + * This call may block while drives spin up. Be forewarned. + * + * \param c Callback function to notify about detected drives. + * \param d Application-defined data passed to callback. Can be NULL. + * + * \sa PHYSFS_StringCallback + * \sa PHYSFS_getCdRomDirs + */ +__EXPORT__ void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d); + + +/** + * \fn void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d) + * \brief Enumerate the search path, using an application-defined callback. + * + * Internally, PHYSFS_getSearchPath() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_getSearchPath(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * element of the search path: + * + * \code + * + * static void printSearchPath(void *data, const char *pathItem) + * { + * printf("[%s] is in the search path.\n", pathItem); + * } + * + * // ... + * PHYSFS_getSearchPathCallback(printSearchPath, NULL); + * \endcode + * + * Elements of the search path are reported in order search priority, so the + * first archive/dir that would be examined when looking for a file is the + * first element passed through the callback. + * + * \param c Callback function to notify about search path elements. + * \param d Application-defined data passed to callback. Can be NULL. + * + * \sa PHYSFS_StringCallback + * \sa PHYSFS_getSearchPath + */ +__EXPORT__ void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d); + + +/** + * \fn void PHYSFS_enumerateFilesCallback(const char *dir, PHYSFS_EnumFilesCallback c, void *d) + * \brief Get a file listing of a search path's directory, using an application-defined callback. + * + * Internally, PHYSFS_enumerateFiles() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_enumerateFiles(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * element of the search path: + * + * \code + * + * static void printDir(void *data, const char *origdir, const char *fname) + * { + * printf(" * We've got [%s] in [%s].\n", fname, origdir); + * } + * + * // ... + * PHYSFS_enumerateFilesCallback("/some/path", printDir, NULL); + * \endcode + * + * Items sent to the callback are not guaranteed to be in any order whatsoever. + * There is no sorting done at this level, and if you need that, you should + * probably use PHYSFS_enumerateFiles() instead, which guarantees + * alphabetical sorting. This form reports whatever is discovered in each + * archive before moving on to the next. Even within one archive, we can't + * guarantee what order it will discover data. <em>Any sorting you find in + * these callbacks is just pure luck. Do not rely on it.</em> + * + * \param dir Directory, in platform-independent notation, to enumerate. + * \param c Callback function to notify about search path elements. + * \param d Application-defined data passed to callback. Can be NULL. + * + * \sa PHYSFS_EnumFilesCallback + * \sa PHYSFS_enumerateFiles + */ +__EXPORT__ void PHYSFS_enumerateFilesCallback(const char *dir, + PHYSFS_EnumFilesCallback c, + void *d); + +/** + * \fn void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UCS-4 string to a UTF-8 string. + * + * UCS-4 strings are 32-bits per character: \c wchar_t on Unix. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is the same size as the source buffer. UTF-8 + * never uses more than 32-bits per character, so while it may shrink a UCS-4 + * string, it will never expand it. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. + * + * \param src Null-terminated source string in UCS-4 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +__EXPORT__ void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a UCS-4 string. + * + * UCS-4 strings are 32-bits per character: \c wchar_t on Unix. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is four times the size of the source buffer. + * UTF-8 uses from one to four bytes per character, but UCS-4 always uses + * four, so an entirely low-ASCII string will quadruple in size! + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UCS-4 + * sequence at the end. + * + * \param src Null-terminated source string in UTF-8 format. + * \param dst Buffer to store converted UCS-4 string. + * \param len Size, in bytes, of destination buffer. + */ +__EXPORT__ void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UCS-2 string to a UTF-8 string. + * + * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building + * with Unicode support. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 never uses more than 32-bits per character, so while it may shrink + * a UCS-2 string, it may also expand it. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. + * + * Please note that UCS-2 is not UTF-16; we do not support the "surrogate" + * values at this time. + * + * \param src Null-terminated source string in UCS-2 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +__EXPORT__ void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, + PHYSFS_uint64 len); + +/** + * \fn PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a UCS-2 string. + * + * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building + * with Unicode support. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 uses from one to four bytes per character, but UCS-2 always uses + * two, so an entirely low-ASCII string will double in size! + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UCS-2 + * sequence at the end. + * + * Please note that UCS-2 is not UTF-16; we do not support the "surrogate" + * values at this time. + * + * \param src Null-terminated source string in UTF-8 format. + * \param dst Buffer to store converted UCS-2 string. + * \param len Size, in bytes, of destination buffer. + */ +__EXPORT__ void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a Latin1 string. + * + * Latin1 strings are 8-bits per character: a popular "high ASCII" + * encoding. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string + * may grow in some cases. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. + * + * Please note that we do not supply a UTF-8 to Latin1 converter, since Latin1 + * can't express most Unicode codepoints. It's a legacy encoding; you should + * be converting away from it at all times. + * + * \param src Null-terminated source string in Latin1 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +__EXPORT__ void PHYSFS_utf8FromLatin1(const char *src, char *dst, + PHYSFS_uint64 len); + +/* Everything above this line is part of the PhysicsFS 2.0 API. */ + + +#ifdef __cplusplus +} +#endif + +#endif /* !defined _INCLUDE_PHYSFS_H_ */ + +/* end of physfs.h ... */ + diff --git a/allegro-5.0.10-mingw-4.7.0/include/vorbis/codec.h b/allegro-5.0.10-mingw-4.7.0/include/vorbis/codec.h new file mode 100644 index 0000000..999aa33 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/vorbis/codec.h @@ -0,0 +1,243 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + + ******************************************************************** + + function: libvorbis codec headers + last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $ + + ********************************************************************/ + +#ifndef _vorbis_codec_h_ +#define _vorbis_codec_h_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include <ogg/ogg.h> + +typedef struct vorbis_info{ + int version; + int channels; + long rate; + + /* The below bitrate declarations are *hints*. + Combinations of the three values carry the following implications: + + all three set to the same value: + implies a fixed rate bitstream + only nominal set: + implies a VBR stream that averages the nominal bitrate. No hard + upper/lower limit + upper and or lower set: + implies a VBR bitstream that obeys the bitrate limits. nominal + may also be set to give a nominal rate. + none set: + the coder does not care to speculate. + */ + + long bitrate_upper; + long bitrate_nominal; + long bitrate_lower; + long bitrate_window; + + void *codec_setup; +} vorbis_info; + +/* vorbis_dsp_state buffers the current vorbis audio + analysis/synthesis state. The DSP state belongs to a specific + logical bitstream ****************************************************/ +typedef struct vorbis_dsp_state{ + int analysisp; + vorbis_info *vi; + + float **pcm; + float **pcmret; + int pcm_storage; + int pcm_current; + int pcm_returned; + + int preextrapolate; + int eofflag; + + long lW; + long W; + long nW; + long centerW; + + ogg_int64_t granulepos; + ogg_int64_t sequence; + + ogg_int64_t glue_bits; + ogg_int64_t time_bits; + ogg_int64_t floor_bits; + ogg_int64_t res_bits; + + void *backend_state; +} vorbis_dsp_state; + +typedef struct vorbis_block{ + /* necessary stream state for linking to the framing abstraction */ + float **pcm; /* this is a pointer into local storage */ + oggpack_buffer opb; + + long lW; + long W; + long nW; + int pcmend; + int mode; + + int eofflag; + ogg_int64_t granulepos; + ogg_int64_t sequence; + vorbis_dsp_state *vd; /* For read-only access of configuration */ + + /* local storage to avoid remallocing; it's up to the mapping to + structure it */ + void *localstore; + long localtop; + long localalloc; + long totaluse; + struct alloc_chain *reap; + + /* bitmetrics for the frame */ + long glue_bits; + long time_bits; + long floor_bits; + long res_bits; + + void *internal; + +} vorbis_block; + +/* vorbis_block is a single block of data to be processed as part of +the analysis/synthesis stream; it belongs to a specific logical +bitstream, but is independent from other vorbis_blocks belonging to +that logical bitstream. *************************************************/ + +struct alloc_chain{ + void *ptr; + struct alloc_chain *next; +}; + +/* vorbis_info contains all the setup information specific to the + specific compression/decompression mode in progress (eg, + psychoacoustic settings, channel setup, options, codebook + etc). vorbis_info and substructures are in backends.h. +*********************************************************************/ + +/* the comments are not part of vorbis_info so that vorbis_info can be + static storage */ +typedef struct vorbis_comment{ + /* unlimited user comment fields. libvorbis writes 'libvorbis' + whatever vendor is set to in encode */ + char **user_comments; + int *comment_lengths; + int comments; + char *vendor; + +} vorbis_comment; + + +/* libvorbis encodes in two abstraction layers; first we perform DSP + and produce a packet (see docs/analysis.txt). The packet is then + coded into a framed OggSquish bitstream by the second layer (see + docs/framing.txt). Decode is the reverse process; we sync/frame + the bitstream and extract individual packets, then decode the + packet back into PCM audio. + + The extra framing/packetizing is used in streaming formats, such as + files. Over the net (such as with UDP), the framing and + packetization aren't necessary as they're provided by the transport + and the streaming layer is not used */ + +/* Vorbis PRIMITIVES: general ***************************************/ + +extern void vorbis_info_init(vorbis_info *vi); +extern void vorbis_info_clear(vorbis_info *vi); +extern int vorbis_info_blocksize(vorbis_info *vi,int zo); +extern void vorbis_comment_init(vorbis_comment *vc); +extern void vorbis_comment_add(vorbis_comment *vc, const char *comment); +extern void vorbis_comment_add_tag(vorbis_comment *vc, + const char *tag, const char *contents); +extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count); +extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag); +extern void vorbis_comment_clear(vorbis_comment *vc); + +extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); +extern int vorbis_block_clear(vorbis_block *vb); +extern void vorbis_dsp_clear(vorbis_dsp_state *v); +extern double vorbis_granule_time(vorbis_dsp_state *v, + ogg_int64_t granulepos); + +extern const char *vorbis_version_string(void); + +/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/ + +extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi); +extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); +extern int vorbis_analysis_headerout(vorbis_dsp_state *v, + vorbis_comment *vc, + ogg_packet *op, + ogg_packet *op_comm, + ogg_packet *op_code); +extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals); +extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals); +extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb); +extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op); + +extern int vorbis_bitrate_addblock(vorbis_block *vb); +extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, + ogg_packet *op); + +/* Vorbis PRIMITIVES: synthesis layer *******************************/ +extern int vorbis_synthesis_idheader(ogg_packet *op); +extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, + ogg_packet *op); + +extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); +extern int vorbis_synthesis_restart(vorbis_dsp_state *v); +extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); +extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op); +extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); +extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm); +extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm); +extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); +extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); + +extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag); +extern int vorbis_synthesis_halfrate_p(vorbis_info *v); + +/* Vorbis ERRORS and return codes ***********************************/ + +#define OV_FALSE -1 +#define OV_EOF -2 +#define OV_HOLE -3 + +#define OV_EREAD -128 +#define OV_EFAULT -129 +#define OV_EIMPL -130 +#define OV_EINVAL -131 +#define OV_ENOTVORBIS -132 +#define OV_EBADHEADER -133 +#define OV_EVERSION -134 +#define OV_ENOTAUDIO -135 +#define OV_EBADPACKET -136 +#define OV_EBADLINK -137 +#define OV_ENOSEEK -138 + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisenc.h b/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisenc.h new file mode 100644 index 0000000..02332b5 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisenc.h @@ -0,0 +1,436 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: vorbis encode-engine setup + last mod: $Id: vorbisenc.h 17021 2010-03-24 09:29:41Z xiphmont $ + + ********************************************************************/ + +/** \file + * Libvorbisenc is a convenient API for setting up an encoding + * environment using libvorbis. Libvorbisenc encapsulates the + * actions needed to set up the encoder properly. + */ + +#ifndef _OV_ENC_H_ +#define _OV_ENC_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include "codec.h" + +/** + * This is the primary function within libvorbisenc for setting up managed + * bitrate modes. + * + * Before this function is called, the \ref vorbis_info + * struct should be initialized by using vorbis_info_init() from the libvorbis + * API. After encoding, vorbis_info_clear() should be called. + * + * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set + * constraints for the encoded file. This function uses these settings to + * select the appropriate encoding mode and set it up. + * + * \param vi Pointer to an initialized \ref vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. + * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. + * \param min_bitrate Desired minimum bitrate. -1 indicates unset. + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success. + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. + */ +extern int vorbis_encode_init(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +/** + * This function performs step-one of a three-step bitrate-managed encode + * setup. It functions similarly to the one-step setup performed by \ref + * vorbis_encode_init but allows an application to make further encode setup + * tweaks using \ref vorbis_encode_ctl before finally calling \ref + * vorbis_encode_setup_init to complete the setup process. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set + * constraints for the encoded file. This function uses these settings to + * select the appropriate encoding mode and set it up. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. + * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. + * \param min_bitrate Desired minimum bitrate. -1 indicates unset. + * + * \return Zero for success, and negative for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. + */ +extern int vorbis_encode_setup_managed(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +/** + * This function performs step-one of a three-step variable bitrate + * (quality-based) encode setup. It functions similarly to the one-step setup + * performed by \ref vorbis_encode_init_vbr() but allows an application to + * make further encode setup tweaks using \ref vorbis_encode_ctl() before + * finally calling \ref vorbis_encode_setup_init to complete the setup + * process. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using \ref vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. + */ +extern int vorbis_encode_setup_vbr(vorbis_info *vi, + long channels, + long rate, + + float quality + ); + +/** + * This is the primary function within libvorbisenc for setting up variable + * bitrate ("quality" based) modes. + * + * + * Before this function is called, the vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param base_quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). + * + * + * \return Zero for success, or a negative number for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. + */ +extern int vorbis_encode_init_vbr(vorbis_info *vi, + long channels, + long rate, + + float base_quality + ); + +/** + * This function performs the last stage of three-step encoding setup, as + * described in the API overview under managed bitrate modes. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API, one of + * \ref vorbis_encode_setup_managed() or \ref vorbis_encode_setup_vbr() called to + * initialize the high-level encoding setup, and \ref vorbis_encode_ctl() + * called if necessary to make encoding setup changes. + * vorbis_encode_setup_init() finalizes the highlevel encoding structure into + * a complete encoding setup after which the application may make no further + * setup changes. + * + * After encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized \ref vorbis_info struct. + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success. + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * + * \retval OV_EINVAL Attempt to use vorbis_encode_setup_init() without first + * calling one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() to + * initialize the high-level encoding setup + * + */ +extern int vorbis_encode_setup_init(vorbis_info *vi); + +/** + * This function implements a generic interface to miscellaneous encoder + * settings similar to the classic UNIX 'ioctl()' system call. Applications + * may use vorbis_encode_ctl() to query or set bitrate management or quality + * mode details by using one of several \e request arguments detailed below. + * vorbis_encode_ctl() must be called after one of + * vorbis_encode_setup_managed() or vorbis_encode_setup_vbr(). When used + * to modify settings, \ref vorbis_encode_ctl() must be called before \ref + * vorbis_encode_setup_init(). + * + * \param vi Pointer to an initialized vorbis_info struct. + * + * \param number Specifies the desired action; See \ref encctlcodes "the list + * of available requests". + * + * \param arg void * pointing to a data structure matching the request + * argument. + * + * \retval 0 Success. Any further return information (such as the result of a + * query) is placed into the storage pointed to by *arg. + * + * \retval OV_EINVAL Invalid argument, or an attempt to modify a setting after + * calling vorbis_encode_setup_init(). + * + * \retval OV_EIMPL Unimplemented or unknown request + */ +extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg); + +/** + * \deprecated This is a deprecated interface. Please use vorbis_encode_ctl() + * with the \ref ovectl_ratemanage2_arg struct and \ref + * OV_ECTL_RATEMANAGE2_GET and \ref OV_ECTL_RATEMANAGE2_SET calls in new code. + * + * The \ref ovectl_ratemanage_arg structure is used with vorbis_encode_ctl() + * and the \ref OV_ECTL_RATEMANAGE_GET, \ref OV_ECTL_RATEMANAGE_SET, \ref + * OV_ECTL_RATEMANAGE_AVG, \ref OV_ECTL_RATEMANAGE_HARD calls in order to + * query and modify specifics of the encoder's bitrate management + * configuration. +*/ +struct ovectl_ratemanage_arg { + int management_active; /**< nonzero if bitrate management is active*/ +/** hard lower limit (in kilobits per second) below which the stream bitrate + will never be allowed for any given bitrate_hard_window seconds of time.*/ + long bitrate_hard_min; +/** hard upper limit (in kilobits per second) above which the stream bitrate + will never be allowed for any given bitrate_hard_window seconds of time.*/ + long bitrate_hard_max; +/** the window period (in seconds) used to regulate the hard bitrate minimum + and maximum*/ + double bitrate_hard_window; +/** soft lower limit (in kilobits per second) below which the average bitrate + tracker will start nudging the bitrate higher.*/ + long bitrate_av_lo; +/** soft upper limit (in kilobits per second) above which the average bitrate + tracker will start nudging the bitrate lower.*/ + long bitrate_av_hi; +/** the window period (in seconds) used to regulate the average bitrate + minimum and maximum.*/ + double bitrate_av_window; +/** Regulates the relative centering of the average and hard windows; in + libvorbis 1.0 and 1.0.1, the hard window regulation overlapped but + followed the average window regulation. In libvorbis 1.1 a bit-reservoir + interface replaces the old windowing interface; the older windowing + interface is simulated and this field has no effect.*/ + double bitrate_av_window_center; +}; + +/** + * \name struct ovectl_ratemanage2_arg + * + * The ovectl_ratemanage2_arg structure is used with vorbis_encode_ctl() and + * the OV_ECTL_RATEMANAGE2_GET and OV_ECTL_RATEMANAGE2_SET calls in order to + * query and modify specifics of the encoder's bitrate management + * configuration. + * +*/ +struct ovectl_ratemanage2_arg { + int management_active; /**< nonzero if bitrate management is active */ +/** Lower allowed bitrate limit in kilobits per second */ + long bitrate_limit_min_kbps; +/** Upper allowed bitrate limit in kilobits per second */ + long bitrate_limit_max_kbps; + long bitrate_limit_reservoir_bits; /**<Size of the bitrate reservoir in bits */ +/** Regulates the bitrate reservoir's preferred fill level in a range from 0.0 + * to 1.0; 0.0 tries to bank bits to buffer against future bitrate spikes, 1.0 + * buffers against future sudden drops in instantaneous bitrate. Default is + * 0.1 + */ + double bitrate_limit_reservoir_bias; +/** Average bitrate setting in kilobits per second */ + long bitrate_average_kbps; +/** Slew rate limit setting for average bitrate adjustment; sets the minimum + * time in seconds the bitrate tracker may swing from one extreme to the + * other when boosting or damping average bitrate. + */ + double bitrate_average_damping; +}; + + +/** + * \name vorbis_encode_ctl() codes + * + * \anchor encctlcodes + * + * These values are passed as the \c number parameter of vorbis_encode_ctl(). + * The type of the referent of that function's \c arg pointer depends on these + * codes. + */ +/*@{*/ + +/** + * Query the current encoder bitrate management setting. + * + *Argument: <tt>struct ovectl_ratemanage2_arg *</tt> + * + * Used to query the current encoder bitrate management setting. Also used to + * initialize fields of an ovectl_ratemanage2_arg structure for use with + * \ref OV_ECTL_RATEMANAGE2_SET. + */ +#define OV_ECTL_RATEMANAGE2_GET 0x14 + +/** + * Set the current encoder bitrate management settings. + * + * Argument: <tt>struct ovectl_ratemanage2_arg *</tt> + * + * Used to set the current encoder bitrate management settings to the values + * listed in the ovectl_ratemanage2_arg. Passing a NULL pointer will disable + * bitrate management. +*/ +#define OV_ECTL_RATEMANAGE2_SET 0x15 + +/** + * Returns the current encoder hard-lowpass setting (kHz) in the double + * pointed to by arg. + * + * Argument: <tt>double *</tt> +*/ +#define OV_ECTL_LOWPASS_GET 0x20 + +/** + * Sets the encoder hard-lowpass to the value (kHz) pointed to by arg. Valid + * lowpass settings range from 2 to 99. + * + * Argument: <tt>double *</tt> +*/ +#define OV_ECTL_LOWPASS_SET 0x21 + +/** + * Returns the current encoder impulse block setting in the double pointed + * to by arg. + * + * Argument: <tt>double *</tt> +*/ +#define OV_ECTL_IBLOCK_GET 0x30 + +/** + * Sets the impulse block bias to the the value pointed to by arg. + * + * Argument: <tt>double *</tt> + * + * Valid range is -15.0 to 0.0 [default]. A negative impulse block bias will + * direct to encoder to use more bits when incoding short blocks that contain + * strong impulses, thus improving the accuracy of impulse encoding. + */ +#define OV_ECTL_IBLOCK_SET 0x31 + +/** + * Returns the current encoder coupling setting in the int pointed + * to by arg. + * + * Argument: <tt>int *</tt> +*/ +#define OV_ECTL_COUPLING_GET 0x40 + +/** + * Enables/disables channel coupling in multichannel encoding according to arg. + * + * Argument: <tt>int *</tt> + * + * Zero disables channel coupling for multichannel inputs, nonzer enables + * channel coupling. Setting has no effect on monophonic encoding or + * multichannel counts that do not offer coupling. At present, coupling is + * available for stereo and 5.1 encoding. + */ +#define OV_ECTL_COUPLING_SET 0x41 + + /* deprecated rate management supported only for compatibility */ + +/** + * Old interface to querying bitrate management settings. + * + * Deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_GET instead. + * + * Argument: <tt>struct ovectl_ratemanage_arg *</tt> + */ +#define OV_ECTL_RATEMANAGE_GET 0x10 +/** + * Old interface to modifying bitrate management settings. + * + * deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: <tt>struct ovectl_ratemanage_arg *</tt> + */ +#define OV_ECTL_RATEMANAGE_SET 0x11 +/** + * Old interface to setting average-bitrate encoding mode. + * + * Deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: <tt>struct ovectl_ratemanage_arg *</tt> + */ +#define OV_ECTL_RATEMANAGE_AVG 0x12 +/** + * Old interface to setting bounded-bitrate encoding modes. + * + * deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: <tt>struct ovectl_ratemanage_arg *</tt> + */ +#define OV_ECTL_RATEMANAGE_HARD 0x13 + +/*@}*/ + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif diff --git a/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisfile.h b/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisfile.h new file mode 100644 index 0000000..9271331 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/vorbis/vorbisfile.h @@ -0,0 +1,206 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: stdio-based convenience library for opening/seeking/decoding + last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $ + + ********************************************************************/ + +#ifndef _OV_FILE_H_ +#define _OV_FILE_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include <stdio.h> +#include "codec.h" + +/* The function prototypes for the callbacks are basically the same as for + * the stdio functions fread, fseek, fclose, ftell. + * The one difference is that the FILE * arguments have been replaced with + * a void * - this is to be used as a pointer to whatever internal data these + * functions might need. In the stdio case, it's just a FILE * cast to a void * + * + * If you use other functions, check the docs for these functions and return + * the right values. For seek_func(), you *MUST* return -1 if the stream is + * unseekable + */ +typedef struct { + size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); + int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); + int (*close_func) (void *datasource); + long (*tell_func) (void *datasource); +} ov_callbacks; + +#ifndef OV_EXCLUDE_STATIC_CALLBACKS + +/* a few sets of convenient callbacks, especially for use under + * Windows where ov_open_callbacks() should always be used instead of + * ov_open() to avoid problems with incompatible crt.o version linking + * issues. */ + +static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){ + if(f==NULL)return(-1); + +#ifdef __MINGW32__ + return fseeko64(f,off,whence); +#elif defined (_WIN32) + return _fseeki64(f,off,whence); +#else + return fseek(f,off,whence); +#endif +} + +/* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as + * static data. That means that every file which includes this header + * will get its own copy of these structs whether it uses them or + * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS. + * These static symbols are essential on platforms such as Windows on + * which several different versions of stdio support may be linked to + * by different DLLs, and we need to be certain we know which one + * we're using (the same one as the main application). + */ + +static ov_callbacks OV_CALLBACKS_DEFAULT = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell +}; + +static ov_callbacks OV_CALLBACKS_NOCLOSE = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, + (int (*)(void *)) NULL, + (long (*)(void *)) ftell +}; + +static ov_callbacks OV_CALLBACKS_STREAMONLY = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) NULL, + (int (*)(void *)) fclose, + (long (*)(void *)) NULL +}; + +static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) NULL, + (int (*)(void *)) NULL, + (long (*)(void *)) NULL +}; + +#endif + +#define NOTOPEN 0 +#define PARTOPEN 1 +#define OPENED 2 +#define STREAMSET 3 +#define INITSET 4 + +typedef struct OggVorbis_File { + void *datasource; /* Pointer to a FILE *, etc. */ + int seekable; + ogg_int64_t offset; + ogg_int64_t end; + ogg_sync_state oy; + + /* If the FILE handle isn't seekable (eg, a pipe), only the current + stream appears */ + int links; + ogg_int64_t *offsets; + ogg_int64_t *dataoffsets; + long *serialnos; + ogg_int64_t *pcmlengths; /* overloaded to maintain binary + compatibility; x2 size, stores both + beginning and end values */ + vorbis_info *vi; + vorbis_comment *vc; + + /* Decoding working state local storage */ + ogg_int64_t pcm_offset; + int ready_state; + long current_serialno; + int current_link; + + double bittrack; + double samptrack; + + ogg_stream_state os; /* take physical pages, weld into a logical + stream of packets */ + vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ + vorbis_block vb; /* local working space for packet->PCM decode */ + + ov_callbacks callbacks; + +} OggVorbis_File; + + +extern int ov_clear(OggVorbis_File *vf); +extern int ov_fopen(const char *path,OggVorbis_File *vf); +extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); +extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, + const char *initial, long ibytes, ov_callbacks callbacks); + +extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); +extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, + const char *initial, long ibytes, ov_callbacks callbacks); +extern int ov_test_open(OggVorbis_File *vf); + +extern long ov_bitrate(OggVorbis_File *vf,int i); +extern long ov_bitrate_instant(OggVorbis_File *vf); +extern long ov_streams(OggVorbis_File *vf); +extern long ov_seekable(OggVorbis_File *vf); +extern long ov_serialnumber(OggVorbis_File *vf,int i); + +extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); +extern double ov_time_total(OggVorbis_File *vf,int i); + +extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek(OggVorbis_File *vf,double pos); +extern int ov_time_seek_page(OggVorbis_File *vf,double pos); + +extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek_lap(OggVorbis_File *vf,double pos); +extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos); + +extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); +extern double ov_time_tell(OggVorbis_File *vf); + +extern vorbis_info *ov_info(OggVorbis_File *vf,int link); +extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); + +extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples, + int *bitstream); +extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream, + void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param); +extern long ov_read(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream); +extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2); + +extern int ov_halfrate(OggVorbis_File *vf,int flag); +extern int ov_halfrate_p(OggVorbis_File *vf); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + diff --git a/allegro-5.0.10-mingw-4.7.0/include/zconf.h b/allegro-5.0.10-mingw-4.7.0/include/zconf.h new file mode 100644 index 0000000..02ce56c --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/zconf.h @@ -0,0 +1,428 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2010 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# define uncompress z_uncompress +# define zError z_zError +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# define gzFile z_gzFile +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include <windows.h> + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef STDC +# include <sys/types.h> /* for off_t */ +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include <unistd.h> /* for SEEK_* and off_t */ +# ifdef VMS +# include <unixio.h> /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +#endif + +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/include/zlib.h b/allegro-5.0.10-mingw-4.7.0/include/zlib.h new file mode 100644 index 0000000..bfbba83 --- /dev/null +++ b/allegro-5.0.10-mingw-4.7.0/include/zlib.h @@ -0,0 +1,1613 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.5, April 19th, 2010 + + Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.2.5" +#define ZLIB_VERNUM 0x1250 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 5 +#define ZLIB_VER_SUBREVISION 0 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip streams in memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use in the decompressor (particularly + if the decompressor wants to decompress everything in a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field (though see inflate()) */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). Some + output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed code + block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the stream + are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least the + value returned by deflateBound (see below). If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered + binary. This field is only for information purposes and does not affect the + compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not + fatal, and deflate() can be called again with more input and more output + space to continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the + exact value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit() does not process any header information -- that is deferred + until inflate() is called. +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing will + resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + Also to assist in this, on return inflate() will set strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all the uncompressed data. (The size + of the uncompressed data may have been saved by the compressor for this + purpose.) The next operation on this stream must be inflateEnd to deallocate + the decompression state. The use of Z_FINISH is never required, but can be + used to inform inflate that a faster approach may be used for the single + inflate() call. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the only effect of the flush parameter in this implementation + is on the return value of inflate(), as noted below, or when it returns early + because Z_BLOCK or Z_TREES is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the adler32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the adler32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed adler32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained, so applications that need that information should + instead use raw inflate, see inflateInit2() below, or inflateBack() and + perform their own processing of the gzip header and trailer. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, + Z_BUF_ERROR if no progress is possible or if there was not enough room in the + output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is desired. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by the + caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute an adler32 check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to 255 (unknown). If a + gzip stream is being written, strm->adler is a crc32 instead of an adler32. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any call + of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + adler32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. The + stream will keep the same compression level and any other attributes that + may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different strategy. + If the compression level is changed, the input available so far is + compressed with the old level (and may be flushed); the new level will take + effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to be + compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if + strm->avail_out was zero. +*/ + +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). +*/ + +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 255, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an adler32 or a crc32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + crc32 instead of an adler32. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the adler32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called + immediately after inflateInit2() or inflateReset() and before any call of + inflate() to set the dictionary. The application must insure that the + dictionary that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been + found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the + success case, the application may save the current current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above or -1 << 16 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the paramaters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is more efficient than inflate() for + file i/o applications in that it avoids copying between the output and the + sliding window by simply making the window itself the output buffer. This + function trusts the application to not change the output buffer passed by + the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the normal + behavior of inflate(), which expects either a zlib or gzip header and + trailer around the deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero--buf is ignored in that + case--and inflateBack() will return a buffer error. inflateBack() will call + out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() + should return zero on success, or non-zero on failure. If out() returns + non-zero, inflateBack() will return with an error. Neither in() nor out() + are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed buffer. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. +*/ + + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef voidp gzFile; /* opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Opens a gzip (.gz) file for reading or writing. The mode parameter is as + in fopen ("rb" or "wb") but can also include a compression level ("wb9") or + a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only + compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' + for fixed code compression as in "wb9F". (See the description of + deflateInit2 for more information about the strategy parameter.) Also "a" + can be used instead of "w" to request that the gzip stream that will be + written be appended to the file. "+" will result in an error, since reading + and writing to the same gzip file is not supported. + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen associates a gzFile with the file descriptor fd. File descriptors + are obtained from calls like open, dup, creat, pipe or fileno (if the file + has been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +/* + Set the internal buffer size used by this library's functions. The + default buffer size is 8192 bytes. This function must be called after + gzopen() or gzdopen(), and before any other calls that read or write the + file. The buffer memory allocation is always deferred to the first read or + write. Two buffers are allocated, either both of the specified size when + writing, or one of the specified size and the other twice that size when + reading. A larger buffer size of, for example, 64K or 128K bytes will + noticeably increase the speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. If + the input file was not in gzip format, gzread copies the given number of + bytes into the buffer. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream, or failing that, reading the rest + of the input file directly without decompression. The entire input file + will be read if gzread is called until it returns less than the requested + len. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. +*/ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes written or 0 in case of + error. +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or 0 in case of error. The number of + uncompressed bytes written is limited to 8191, or one less than the buffer + size given to gzbuffer(). The caller should assure that this limit is not + exceeded. If it is exceeded, then gzprintf() will return an error (0) with + nothing written. In this case, there may also be a buffer overflow with + unpredictable consequences, which is possible only if zlib was compiled with + the insecure functions sprintf() or vsprintf() because the secure snprintf() + or vsnprintf() functions were not available. This can be determined using + zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or a + newline character is read and transferred to buf, or an end-of-file + condition is encountered. If any characters are read or if len == 1, the + string is terminated with a null character. If no characters are read due + to an end-of-file or len < 1, then the buffer is left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. gzputc + returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte or -1 + in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +/* + Push one character back onto the stream to be read as the first character + on the next read. At least one character of push-back is allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter flush + is as in the deflate() function. The return value is the zlib error number + (see function gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatented gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); + + Returns the starting position for the next gzread or gzwrite on the given + compressed file. This position represents a number of bytes in the + uncompressed data stream, and is zero when starting, even if appending or + reading a gzip stream from the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Returns the current offset in the file being read or written. This offset + includes the count of bytes that precede the gzip stream, for example when + appending or when using gzdopen() for reading. When reading, the offset + does not include as yet unused buffered input. This information can be used + for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns true (1) if the end-of-file indicator has been set while reading, + false (0) otherwise. Note that the end-of-file indicator is set only if the + read tried to go past the end of the input, but came up short. Therefore, + just like feof(), gzeof() may return false even if there is no more data to + read, in the event that the last read request was for the exact number of + bytes remaining in the input file. This will happen if the input file size + is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +/* + Returns true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. This state can change from + false to true while reading the input file if the end of a gzip stream is + reached, but is followed by data that is not another gzip stream. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file and + deallocates the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the given + compressed file. errnum is set to zlib error number. If an error occurred + in the file system and not in the compression library, errnum is set to + Z_ERRNO and the application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. +*/ + +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +/* + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the compression + library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is Z_NULL, this function returns the + required initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. + + Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. If buf is Z_NULL, this function returns the required + initial value for the for the crc. Pre- and post-conditioning (one's + complement) is performed within this function so it shouldn't be done by the + application. + + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) +#define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, sizeof(z_stream)) + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); +#endif + +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# ifdef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif + +/* hack for buggy compilers */ +#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; +#endif + +/* undocumented functions */ +ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/allegro-5.0.10-mingw-4.7.0/lib/liballegro_acodec-5.0.10-md.a b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_acodec-5.0.10-md.a new file mode 100644 index 0000000..833eaa5 Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_acodec-5.0.10-md.a differ diff --git a/allegro-5.0.10-mingw-4.7.0/lib/liballegro_audio-5.0.10-md.a b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_audio-5.0.10-md.a new file mode 100644 index 0000000..ca1d72e Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_audio-5.0.10-md.a differ diff --git a/allegro-5.0.10-mingw-4.7.0/lib/liballegro_dialog-5.0.10-md.a b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_dialog-5.0.10-md.a new file mode 100644 index 0000000..cf2c9f9 Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_dialog-5.0.10-md.a differ diff --git a/allegro-5.0.10-mingw-4.7.0/lib/liballegro_image-5.0.10-md.a b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_image-5.0.10-md.a new file mode 100644 index 0000000..7fb49eb Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_image-5.0.10-md.a differ diff --git a/allegro-5.0.10-mingw-4.7.0/lib/liballegro_primitives-5.0.10-md.a b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_primitives-5.0.10-md.a new file mode 100644 index 0000000..6d9a13d Binary files /dev/null and b/allegro-5.0.10-mingw-4.7.0/lib/liballegro_primitives-5.0.10-md.a differ