Whoever wants can take over this library, I will no longer be maintaining it. It shouldn't be a lot of work at all, and you can do whatever you want with it :)
A copy of the documentation:
(If you wonder, it's written in Textile)
h2. SurfaceLib - API Documentation
h3. :Register(name, texture)
Register a texture within SurfaceLib
h4. Args
* "name"
** String - The name the texture should be registered under.
* "texture"
** String - The full path to the texture.
h4. Remarks
SurfaceLib removes the extension of the file when it checks for dupe textures. This prevents two textures to register with the same filename, regardless extension. The Library also checks if the name has already been registered.
If the texture is successfully registered the event "Surface_Registered" will trigger. This event has no args, as it's only meant to be used as a refresher for AceConsole's option tables.
h4. Example
bq. @lib:Register("Otravi", "Interface\\AddOns\\AddOn\\Textures\\Otravi")@
h3. :Fetch(name)
h4. Args
* "name"
** String - The name of the texture you want a path for.
h4. Remarks
When requesting an invalid or non-existing texture, SurfaceLib will fall back to the default blizzard StatusBar texture.
h4. Example
bq. @lib:Fetch("Otravi")@
h3. :Iterate()
h4. Args
* None
h4. Remarks
This will return SurfaceLib's current table of textures.
h4. Example
bq. @for name, texture in pairs(lib:Iterate()) do ... end@
h3. :List()
h4. Args
* None
h4. Remarks
:List() is used to create a table you can feed the validate field in the AceOption tables.
h4. Example
bq.. ...
@validate = lib:List(),@
...
h3. :SetGlobal(name)
h4. Args
* "name"
** String or nil - Set the global texture to "name", this will override whatever the add ons ask for.
h4. Remarks
Settings this value to nil, or an invalid texture will disable the global texture overriding. When a global texture is set/changed the event "Surface_SetGlobal" will trigger, with the current global texture as arg1. This can be both "name" or nil!
h4. Example
bq. @lib:SetGlobal("Otravi")@
h3. :IsValid(name)
h4. Args
* "name"
** String - The name of the texture you want to validate.
h4. Remarks
Returns true if the texture is found in SurfaceLib's current table over textures, false otherwise.
Name: Surface-1.0
Author: Haste/Otravi (troeks@gmail.com)
Website: http://fuxsake.net/f15-SurfaceLib.html
Documentation: http://fuxsake.net/t18-Documentation.html
SVN: http://svn.wowace.com/root/trunk/SurfaceLib/Surface-1.0
Description: Shared handling of StatusBar textures between add ons.
Dependencies: AceLibrary, AceEvent-2.0
I'll start working on the docs asap.
A copy of the documentation:
(If you wonder, it's written in Textile)