# C_Texture: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_Texture

## Functions

### C_Texture.ClearTitleIconTexture

```lua
C_Texture.ClearTitleIconTexture(texture)
```

Arguments:
- `texture`: SimpleTexture

### C_Texture.GetAtlasElementID

```lua
elementID = C_Texture.GetAtlasElementID(atlas)
```

Arguments:
- `atlas`: textureAtlas

Returns:
- `elementID`: number

### C_Texture.GetAtlasElements

```lua
atlases = C_Texture.GetAtlasElements()
```

Returns:
- `atlases`: textureAtlas[]

### C_Texture.GetAtlasExists

```lua
atlasExists = C_Texture.GetAtlasExists(atlas)
```

Arguments:
- `atlas`: textureAtlas

Returns:
- `atlasExists`: bool

### C_Texture.GetAtlasID

```lua
atlasID = C_Texture.GetAtlasID(atlas)
```

Arguments:
- `atlas`: textureAtlas

Returns:
- `atlasID`: number

### C_Texture.GetAtlasInfo

```lua
info = C_Texture.GetAtlasInfo(atlas)
```

May return nothing.

Arguments:
- `atlas`: textureAtlas

Returns:
- `info`: AtlasInfo

### C_Texture.GetFilenameFromFileDataID

```lua
filename = C_Texture.GetFilenameFromFileDataID(fileDataID)
```

Arguments:
- `fileDataID`: number

Returns:
- `filename`: string

### C_Texture.GetTitleIconTexture

```lua
C_Texture.GetTitleIconTexture(titleID, version, callback, [subIcon])
```

Arguments:
- `titleID`: string
- `version`: TitleIconVersion
- `callback`: GetTitleIconTextureCallback
- `subIcon`: string, may be nil

### C_Texture.IsTitleIconTextureReady

```lua
ready = C_Texture.IsTitleIconTextureReady(titleID, version, [subIcon])
```

Arguments:
- `titleID`: string
- `version`: TitleIconVersion
- `subIcon`: string, may be nil

Returns:
- `ready`: bool

### C_Texture.SetTitleIconTexture

```lua
C_Texture.SetTitleIconTexture(texture, titleID, version, [subIcon])
```

Arguments:
- `texture`: SimpleTexture
- `titleID`: string
- `version`: TitleIconVersion
- `subIcon`: string, may be nil

### C_Texture.SetURLTexture

```lua
C_Texture.SetURLTexture(texture, url)
```

Arguments:
- `texture`: SimpleTexture
- `url`: cstring

## Events

### URL_TEXTURE_REQUEST_RESULT

Payload, after the event's name:
- `texture`: SimpleTexture
- `result`: UrlTextureResult

## Tables

### Enum.TitleIconVersion (enumeration)

- `Small` = 0
- `Medium` = 1
- `Large` = 2

### Enum.UrlTextureResult (enumeration)

- `Found` = 1
- `NotFound` = 2
- `Requested` = 3
- `NotAllowed` = 4

### AtlasInfo (structure)

- `elementName`: cstring
- `width`: number
- `height`: number
- `rawSize`: vector2
- `leftTexCoord`: number
- `rightTexCoord`: number
- `topTexCoord`: number
- `bottomTexCoord`: number
- `tilesHorizontally`: bool
- `tilesVertically`: bool
- `file`: fileID, may be nil
- `filename`: string, may be nil
- `sliceData`: UITextureSliceData, may be nil

### GetTitleIconTextureCallback (callbacktype)

- `success`: bool
- `texture`: fileID

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
