local TextureUtils =
{
	Name = "TextureUtils",
	Type = "System",
	Namespace = "C_Texture",
	Environment = "All",

	Functions =
	{
		{
			Name = "ClearTitleIconTexture",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "texture", Type = "SimpleTexture", Nilable = false },
			},
		},
		{
			Name = "GetAtlasElementID",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "atlas", Type = "textureAtlas", Nilable = false },
			},

			Returns =
			{
				{ Name = "elementID", Type = "number", Nilable = false },
			},
		},
		{
			Name = "GetAtlasElements",
			Type = "Function",

			Returns =
			{
				{ Name = "atlases", Type = "table", InnerType = "textureAtlas", Nilable = false },
			},
		},
		{
			Name = "GetAtlasExists",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "atlas", Type = "textureAtlas", Nilable = false },
			},

			Returns =
			{
				{ Name = "atlasExists", Type = "bool", Nilable = false },
			},
		},
		{
			Name = "GetAtlasID",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "atlas", Type = "textureAtlas", Nilable = false },
			},

			Returns =
			{
				{ Name = "atlasID", Type = "number", Nilable = false },
			},
		},
		{
			Name = "GetAtlasInfo",
			Type = "Function",
			MayReturnNothing = true,
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "atlas", Type = "textureAtlas", Nilable = false },
			},

			Returns =
			{
				{ Name = "info", Type = "AtlasInfo", Nilable = false },
			},
		},
		{
			Name = "GetFilenameFromFileDataID",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "fileDataID", Type = "number", Nilable = false },
			},

			Returns =
			{
				{ Name = "filename", Type = "string", Nilable = false },
			},
		},
		{
			Name = "GetTitleIconTexture",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "titleID", Type = "string", Nilable = false },
				{ Name = "version", Type = "TitleIconVersion", Nilable = false },
				{ Name = "callback", Type = "GetTitleIconTextureCallback", Nilable = false },
			},
		},
		{
			Name = "IsTitleIconTextureReady",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "titleID", Type = "string", Nilable = false },
				{ Name = "version", Type = "TitleIconVersion", Nilable = false },
			},

			Returns =
			{
				{ Name = "ready", Type = "bool", Nilable = false },
			},
		},
		{
			Name = "SetTitleIconTexture",
			Type = "Function",
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "texture", Type = "SimpleTexture", Nilable = false },
				{ Name = "titleID", Type = "string", Nilable = false },
				{ Name = "version", Type = "TitleIconVersion", Nilable = false },
			},
		},
		{
			Name = "SetURLTexture",
			Type = "Function",
			HasRestrictions = true,
			SecretArguments = "AllowedWhenUntainted",

			Arguments =
			{
				{ Name = "texture", Type = "SimpleTexture", Nilable = false },
				{ Name = "url", Type = "cstring", Nilable = false },
			},
		},
	},

	Events =
	{
		{
			Name = "UrlTextureRequestResult",
			Type = "Event",
			LiteralName = "URL_TEXTURE_REQUEST_RESULT",
			SynchronousEvent = true,
			Payload =
			{
				{ Name = "texture", Type = "SimpleTexture", Nilable = false },
				{ Name = "result", Type = "UrlTextureResult", Nilable = false },
			},
		},
	},

	Tables =
	{
		{
			Name = "TitleIconVersion",
			Type = "Enumeration",
			NumValues = 3,
			MinValue = 0,
			MaxValue = 2,
			Fields =
			{
				{ Name = "Small", Type = "TitleIconVersion", EnumValue = 0 },
				{ Name = "Medium", Type = "TitleIconVersion", EnumValue = 1 },
				{ Name = "Large", Type = "TitleIconVersion", EnumValue = 2 },
			},
		},
		{
			Name = "UrlTextureResult",
			Type = "Enumeration",
			NumValues = 4,
			MinValue = 1,
			MaxValue = 4,
			Fields =
			{
				{ Name = "Found", Type = "UrlTextureResult", EnumValue = 1 },
				{ Name = "NotFound", Type = "UrlTextureResult", EnumValue = 2 },
				{ Name = "Requested", Type = "UrlTextureResult", EnumValue = 3 },
				{ Name = "NotAllowed", Type = "UrlTextureResult", EnumValue = 4 },
			},
		},
		{
			Name = "AtlasInfo",
			Type = "Structure",
			Fields =
			{
				{ Name = "elementName", Type = "cstring", Nilable = false },
				{ Name = "width", Type = "number", Nilable = false },
				{ Name = "height", Type = "number", Nilable = false },
				{ Name = "rawSize", Type = "vector2", Mixin = "Vector2DMixin", Nilable = false },
				{ Name = "leftTexCoord", Type = "number", Nilable = false },
				{ Name = "rightTexCoord", Type = "number", Nilable = false },
				{ Name = "topTexCoord", Type = "number", Nilable = false },
				{ Name = "bottomTexCoord", Type = "number", Nilable = false },
				{ Name = "tilesHorizontally", Type = "bool", Nilable = false },
				{ Name = "tilesVertically", Type = "bool", Nilable = false },
				{ Name = "file", Type = "fileID", Nilable = true },
				{ Name = "filename", Type = "string", Nilable = true },
				{ Name = "sliceData", Type = "UITextureSliceData", Nilable = true },
			},
		},
		{
			Name = "GetTitleIconTextureCallback",
			Type = "CallbackType",

			Arguments =
			{
				{ Name = "success", Type = "bool", Nilable = false },
				{ Name = "texture", Type = "fileID", Nilable = false },
			},
		},
	},
	Predicates =
	{
	},
};

APIDocumentation:AddDocumentationTable(TextureUtils);