Reply
 
Thread Tools Display Modes
Old 03-27-06, 07:05 PM   #1
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,873
API Changes for 1.10

Here is Iriel's collection of the API changes for 1.10, based on the 0.10.0-5195 test realm build. As always it's expected that you read this thread in conjunction with the 1.10 Changes thread. (Originally posted here.)

Frame Method Changes (INCOMPLETE!)

* All UI Object shave the following NEW methods
objType = LayoutFrame:GetObjectType() - Return the object type for this object (Similar to Frame:GetFrameType() but supports all UI object types)
isType = LayoutFrame:IsObjectType("Type") - Return if the object is of the specified type (Similar to Frame:IsFrameType("Type") but supports all UI object types)

* New Font object with the following methods:
Font:CopyFontObject(otherFont) - Set this Font's attributes to be a copy of the otherFont font object's.
Font:GetAlpha() - Return this font's alpha setting.
Font:GetFont() - Return the font file, height, and flags for this Font.
Font:GetFontObject() - Return the 'parent' Font object, or nil if none.
Font:GetJustifyH() - Return Font's horizontal justification.
Font:GetJustifyV() - Return Font's vertical justification.
Font:GetName() - Return the name of the Font object.
Font:GetShadowColor() - Returns the color of this Font's shadow (r,g,b,a).
Font:GetShadowOffset() - Returns the Font's shadow offset (x,y).
Font:GetSpacing() - Returns the Font's spacing().
Font:GetTextColor() - Returns the Font's color (r,g,b,a)
Font:SetAlpha(alpha) - Set the Font's alpha value.
Font:SetFont("path", height[, "flags"]) - Sets the font to use, returns 1 if the path was valid, nil otherwise (no change occurs).
Font:SetFontObject(fontObject) - Sets the 'parent' Font object.
Font:SetJustifyH("justifyH") - Sets horizontal justification ("LEFT","RIGHT", or "CENTER")
Font:SetJustifyV("justifyV") - Sets vertical justification ("TOP","BOTTOM", or "MIDDLE")
Font:SetShadowColor(r,g,b,a) - Sets the shadow color.
Font:SetShadowOffset(x,y) - Sets the shadow offset.
Font:SetSpacing(spacing) - Sets the font spacing.
Font:SetTextColor(r,g,b,a) - Sets the font's color.

* All LayoutFrames have these NEW methods:
numPoints = LayoutFrame:GetNumPoints() - Return the number of anchor points for the frame.
point, relativeTo, relativePoint, xofs, yofs = LayoutFrame:GetPoint(index) - Return the details of the specified anchor point.

* The following methods moved to be supported by all layout frames:
bottom = LayoutFrame:GetBottom() - Get the bottom edge of the frame.
x,y = LayoutFrame:GetCenter() - Get the center coordinate of the frame.
left = LayoutFrame:GetLeft() - Get the left edge of the frame.
right = LayoutFrame:GetRight() - Get the right edge of the frame.
top = LayoutFrame:GetTop() - Get the top edge of the frame.
parent = LayoutFrame:GetParent() - Get the parent for this frame.
LayoutFrame:SetParent(parent or "parentName") - Set the parent for this frame.
alpha = LayoutFrame:GetAlpha() - Get the alpha level of this frame.
LayoutFrame:SetAllPoints(frame or "frameName") - Set all anchors on this frame to match specified frame's edges.

* All Regions (Texture, FontString) have these NEW methods
layer = Region:GetDrawLayer() - Get the draw layer for the Region.
Region:SetDrawLayer("layer") - Set the draw layer for the Region.

* Frames (and derivatives) have these NEW methods:
fontString = Frame:CreateFontString(["name"[, "layer"]]) - Create a new FontString as a child of this Frame.
texture = Frame:Texture(["name"[, "layer"]]) - Create a new Texture as a child of this Frame.
numRegions = Frame:GetNumRegions() - Return the number of Regions that are children of this frame.
a,b,c,d,... = Frame:GetRegions() - Return the regions of the frame.

* FontString now includes the following methods (see Font changes for details): GetAlpha, GetFontObject, GetJustifyH, GetJustifyV, GetShadowColor, GetShadowOffset, GetSpacing, SetFontObject, SetShadowColor, SetShadowOffset, SetSpacing

* Button has these NEW methods
font = Button:GetFontObject() - Return the font object for the Button's normal text.
font = Button:GetDisabledFontObject() - Return the font object for the Button when disabled.
font = Button:GetHighlightFontObject() - Return the font object for the Button when highlighted.
Button:SetTextFontObject([font]) - Set the font object from which to get settings for this Button's normal state.
Button:SetDisabledFontObject([font]) - Set the font object for settings when disabled.
Button:SetHighlightFontObject([font]) - Set the font object for settings when highlighted.
Also the SetNormalTexture, SetDisabledTexture, SetPushedTexture, and SetHighlightTexture methods now take either a texture file path, or a Texture object.

(This section isn't yet complete, because it's taking me ages to write up all of the changes, i'll be back!)
Cairenn is offline   Reply With Quote
Old 03-27-06, 07:06 PM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,873
Movement API Changes
The following methods have been protected, so they can only be called from signed (i.e. blizzard) code:
* CameraOrSelectOrMoveStart()
* CameraOrSelectOrMoveStop()
* MoveBackwardStart()
* MoveBackwardStop()
* MoveForwardStart()
* MoveForwardStop()
* StrafeLeftStart()
* StrafeLeftStop()
* StrafeRightStart()
* StrafeRightStop()
* TurnLeftStart()
* TurnLeftStop()
* TurnOrActionStart()
* TurnOrActionStop()
* TurnRightStart()
* TurnRightStop()

Frame API Changes
* NEW - font - CreateFont ("name") - Create a new Font object.
* NEW - frame = CreateFrame("type"[,"name"][,parent]) - Create a new Frame.
* NEW - nextFrame = EnumerateFrames([curFrame]) - Function to iterate over all Frames (call with nil arg for first frame)
* NEW - count = GetNumFrames() - Returns the number of existing frames.

Taxi API Changes
* NEW - numHops = GetNumRoutes(index) - Returns the number of hops from current location to the specified taxi node.
* NEW - x =TaxiGetDestX(nodeIndex,hopIndex) - Returns x position of route destination (0-1).
* NEW - y =TaxiGetDestY(nodeIndex,hopIndex) - Returns y position of route destination (0-1).
* NEW - x =TaxiGetSrcX(nodeIndex,hopIndex) - Returns x position of route source (0-1)
* NEW - y =TaxiGetSrcY(nodeIndex,hopIndex) - Returns y position of route source (0-1).
* NEW - TaxiNodeSetCurrent(index) - Set currently highlighted destination node.

Faction API Changes
* NEW - index = GetSelectedFaction() - Returns the currently selected faction from the faction UI.
* NEW - name, index, min, max, current = GetWatchedFactionInfo() - Returns the selected faction (For display as XP bar)
* NEW - IsFactionInactive(index) - Returns whether faction is marked as inactive.
* NEW - SetFactionActive(index) - Set a faction to active.
* NEW - SetFactionInactive(index) - Set a faction to inactive.
* NEW - SetSelectedFaction(index) - Set the currently selected faction.
* NEW - SetWatchedFactionIndex(index) - Set the currently watched faction (index == 0 to cancel).

Mouselook Support
* NEW - isLooking = IsMouselooking() - Return whether mouselook is active.
* NEW - MouselookStart() - Start using mouselook.
* NEW -MouselookStop() - Stop using mouselook.

Other API Enhancements
* UPDATED - CastSpellByName (name [, onSelf]) - Now has onSelf parameter
* NEW - version, build, buildDate = GetBuildInfo() - NEW function to return current WoW client build.
* UPDATED - rate1,rate2,... = GetRefreshRates() - No longer requires a parameter.
* NEW - function. err = loadstring("functionBody") - Lua API loadstring function.
* NEW - errfunc = geterrorhandler() - Return the current Lua error handler.
* NEW - seterrorhandler(errfunc) - Set the current Lua error handler (Function takes one 'message' argument).

REMOVED Functions
* REMOVED LaunchURL("URL")
* REMOVED SplitMoney("value")

Undocumented API Changes
* NEW - GetMinigameState() - Seems to return multiple values related to current minigame.
* NEW - hasRelic = UnitHasRelicSlot("unit") - Return whether the specified unit has a relic inventory slot.

Last Updated - 2006-03-25 4:40pm (PST)
Cairenn is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » API Changes for 1.10

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off