Skip to content

Commit 74beb12

Browse files
committed
v1.1.15.218
1 parent 2efa7c4 commit 74beb12

File tree

3 files changed

+83
-55
lines changed

3 files changed

+83
-55
lines changed

src/jass.tmLanguage.json

+1-1
Large diffs are not rendered by default.

static/UjAPI.j

+41-27
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ constant frameeventtype FRAMEEVENT_MOUSE_WHEEL = ConvertFrameEventType(6)
461461
constant frameeventtype FRAMEEVENT_CHECKBOX_CHECKED = ConvertFrameEventType(7)
462462
constant frameeventtype FRAMEEVENT_CHECKBOX_UNCHECKED = ConvertFrameEventType(8)
463463
constant frameeventtype FRAMEEVENT_EDITBOX_TEXT_CHANGED = ConvertFrameEventType(9)
464-
constant frameeventtype FRAMEEVENT_POPUPMENU_ITEM_CHANGED = ConvertFrameEventType(10)
464+
constant frameeventtype FRAMEEVENT_POPUPMENU_ITEM_CHANGED = ConvertFrameEventType(10) // This also works with CListBox and CMenu
465+
constant frameeventtype FRAMEEVENT_FRAME_ITEM_CHANGED = ConvertFrameEventType(10) // More streamlined version, as not only CPopupMenu can have ITEM_CHANGED events.
465466
constant frameeventtype FRAMEEVENT_MOUSE_DOUBLECLICK = ConvertFrameEventType(11)
466467
constant frameeventtype FRAMEEVENT_SPRITE_ANIM_UPDATE = ConvertFrameEventType(12)
467468
constant frameeventtype FRAMEEVENT_SLIDER_VALUE_CHANGED = ConvertFrameEventType(13)
@@ -1868,6 +1869,7 @@ constant controlstyleflag CONTROL_STYLE_CLICK_MOUSE_DOWN = ConvertControlStyleFl
18681869
constant controlstyleflag CONTROL_STYLE_RELEASE_NOTIFY = ConvertControlStyleFlag(4)
18691870
constant controlstyleflag CONTROL_STYLE_DRAG = ConvertControlStyleFlag(8)
18701871
constant controlstyleflag CONTROL_STYLE_HIGHLIGHT_ON_FOCUS = ConvertControlStyleFlag(16)
1872+
constant controlstyleflag CONTROL_STYLE_DRAW = ConvertControlStyleFlag(32)
18711873
constant controlstyleflag CONTROL_STYLE_HIGHLIGHT_FOCUS = ConvertControlStyleFlag(32)
18721874
constant controlstyleflag CONTROL_STYLE_HIGHLIGHT_ON_MOUSE_OVER = ConvertControlStyleFlag(64)
18731875
constant controlstyleflag CONTROL_STYLE_SLIDER_STEP = ConvertControlStyleFlag(128)
@@ -1921,7 +1923,9 @@ native BitwiseAND takes integer bit1, integer bit2 returns integer
19211923
native BitwiseOR takes integer bit1, integer bit2 returns integer
19221924
native BitwiseXOR takes integer bit1, integer bit2 returns integer
19231925
native BitwiseShiftLeft takes integer i, integer bitsToShift returns integer
1926+
native BitwiseShiftLeftLogical takes integer i, integer bitsToShift returns integer
19241927
native BitwiseShiftRight takes integer i, integer bitsToShift returns integer
1928+
native BitwiseShiftRightLogical takes integer i, integer bitsToShift returns integer
19251929
native BitwiseToInteger takes integer byte1, integer byte2, integer byte3, integer byte4 returns integer
19261930

19271931
native Id2String takes integer i returns string
@@ -2966,6 +2970,8 @@ native GetBuffTypeId takes buff whichBuff returns integer
29662970
native GetBuffBaseTypeId takes buff whichBuff returns integer
29672971
native GetBuffOwner takes buff whichbuff returns unit
29682972
native SetBuffOwner takes buff whichBuff, unit whichUnit returns nothing
2973+
native GetBuffOwningAbility takes buff whichbuff returns ability // experimental
2974+
native SetBuffOwningAbility takes buff whichBuff, ability whichAbility returns nothing // experimental
29692975
native IsBuffDispellable takes buff whichBuff returns boolean
29702976
native SetBuffDispellable takes buff whichBuff, boolean isSet returns nothing
29712977
native GetBuffLevel takes buff whichBuff returns integer
@@ -3615,11 +3621,13 @@ native UnitUnapplyUpgrades takes unit whichUnit returns nothing
36153621
native UnitApplyUpgrades takes unit whichUnit returns nothing
36163622

36173623
// Unit Ability API
3624+
native UnitAddAbilityEx takes unit whichUnit, integer abilCode, boolean checkForDuplicates returns boolean
3625+
native UnitRemoveAbilityEx takes unit whichUnit, integer abilCode, boolean removeDuplicates returns boolean
3626+
3627+
native CountUnitAbilities takes unit whichUnit, boolean alsoCountBuffs returns integer
36183628
native GetUnitAbility takes unit whichUnit, integer aid returns ability
36193629
native GetUnitAbilityEx takes unit whichUnit, integer aid, integer id returns ability // Allows you to search through duplicates.
36203630
native GetUnitAbilityByIndex takes unit whichUnit, integer index returns ability
3621-
native UnitAddAbilityEx takes unit whichUnit, integer abilCode, boolean checkForDuplicates returns boolean
3622-
native UnitRemoveAbilityEx takes unit whichUnit, integer abilCode, boolean removeDuplicates returns boolean
36233631
native IsUnitAbilityVisible takes unit whichUnit, integer abilCode returns boolean
36243632
native ShowUnitAbility takes unit whichUnit, integer abilCode, boolean show returns nothing
36253633
native ShowUnitAbilityEx takes unit whichUnit, integer abilCode, boolean show, boolean checkDuplicates returns nothing
@@ -3630,13 +3638,12 @@ native EnableUnitAbilityEx takes unit whichUnit, integer abilCode, boolean show,
36303638
//
36313639

36323640
// Unit Buff API
3633-
// In very early stages of development, may be unstable for now.
36343641
native UnitAddBuff takes unit whichUnit, buff whichBuff returns boolean // Does not add duplicates!
36353642
native UnitAddBuffEx takes unit whichUnit, buff whichBuff, boolean checkForDuplicates returns boolean
3636-
36373643
native UnitAddBuffById takes unit whichUnit, integer buffId returns boolean // Does not add duplicates!
36383644
native UnitAddBuffByIdEx takes unit whichUnit, integer buffId, boolean checkForDuplicates returns boolean
3639-
//
3645+
3646+
native CountUnitBuffs takes unit whichUnit returns integer
36403647
native GetUnitBuff takes unit whichUnit, integer buffId returns buff
36413648
native GetUnitBuffEx takes unit whichUnit, integer buffId, integer id returns buff // Allows you to search through duplicates.
36423649
native GetUnitBuffByIndex takes unit whichUnit, integer index returns buff
@@ -3974,6 +3981,7 @@ native SetProjectileAnimationOffsetPercent takes projectile whichProjectile, rea
39743981
native GetProjectileSource takes projectile whichProjectile returns unit
39753982
native SetProjectileSource takes projectile whichProjectile, unit whichUnit returns nothing
39763983
native GetProjectileSourceAbility takes projectile whichProjectile returns ability
3984+
native SetProjectileSourceAbility takes projectile whichProjectile, ability whichAbility returns nothing
39773985
native GetProjectileTargetX takes projectile whichProjectile returns real
39783986
native SetProjectileTargetX takes projectile whichProjectile, real x returns nothing
39793987
native GetProjectileTargetY takes projectile whichProjectile returns real
@@ -4063,6 +4071,10 @@ native GetCSimpleFontStringByName takes string frameName, integer createContext
40634071
native GetCSimpleTextureByName takes string frameName, integer createContext returns framehandle
40644072
native GetCSimpleFrameByName takes string frameName, integer createContext returns framehandle
40654073
native GetFrameUnderCursor takes nothing returns framehandle
4074+
native GetFrameChildrenCountEx takes framehandle whichFrame, integer listId returns integer // listId: CFrames: 0 for default | 1 for layouts (will return CLayer) | CSimpleFrames 0 - 6 | CSimpleRegions any number, as they only have 1 child node.
4075+
native GetFrameChildrenCount takes framehandle whichFrame returns integer
4076+
native GetFrameChildEx takes framehandle whichFrame, integer listId, integer index returns framehandle
4077+
native GetFrameChild takes framehandle whichFrame, integer index returns framehandle
40664078
native GetFrameTypeName takes framehandle whichFrame returns string
40674079
native GetFrameName takes framehandle whichFrame returns string
40684080
native SetFrameName takes framehandle whichFrame, string contextName returns nothing
@@ -4076,7 +4088,7 @@ native GetFrameText takes framehandle whichFrame returns string
40764088
native AddFrameText takes framehandle whichFrame, string text returns nothing
40774089
native SetFrameTextSizeLimit takes framehandle whichFrame, integer textSize returns nothing
40784090
native GetFrameTextSizeLimit takes framehandle whichFrame returns integer
4079-
native GetFrameTextColourEx takes framehandle whichFrame, integer stateId returns integer // 0 = font | 1 = highlighted | 2 = disabled | 3 = shadow
4091+
native GetFrameTextColourEx takes framehandle whichFrame, integer stateId returns integer // CSimpleFontString: 0 - normal, 1 - shadow | CTextFrame: 0 = font | 1 = highlighted | 2 = disabled | 3 = shadow
40804092
native SetFrameTextColourEx takes framehandle whichFrame, integer stateId, integer colour returns nothing
40814093
native GetFrameTextColour takes framehandle whichFrame returns integer
40824094
native SetFrameTextColour takes framehandle whichFrame, integer colour returns nothing
@@ -4131,11 +4143,12 @@ native SetFramePriority takes framehandle whichFrame, integer priority returns n
41314143
native SetFrameParent takes framehandle whichFrame, framehandle whichParent returns nothing
41324144
native GetFrameParent takes framehandle whichFrame returns framehandle
41334145
native SetFrameFont takes framehandle whichFrame, string fontName, real size, integer flags returns nothing
4146+
// CSimpleFontString: 0 - x Scale, 1 - y Scale, 2 - x Shadow, 3 - y Shadow | CTextFrame: 0 - x, 1 - y, 2 - x Shadow, 3 - y Shadow, 4 = FontJustificationOffset | CEditBox: 0 - x | 1 - y | 2 - text scale "Border Scale"
4147+
native GetFrameTextAlignmentValue takes framehandle whichFrame, integer id returns real
4148+
native SetFrameTextAlignmentValue takes framehandle whichFrame, integer id, real offset returns nothing
41344149
native SetFrameTextAlignment takes framehandle whichFrame, textaligntype verticalAlign, textaligntype horizontalAlign returns nothing
41354150
native SetFrameTextVerticalAlignment takes framehandle whichFrame, textaligntype verticalAlign returns nothing
41364151
native SetFrameTextHorizontalAlignment takes framehandle whichFrame, textaligntype horizontalAlign returns nothing
4137-
native GetFrameChildrenCount takes framehandle whichFrame returns integer
4138-
native GetFrameChild takes framehandle whichFrame, integer index returns framehandle
41394152
native GetFrameCheckState takes framehandle whichFrame returns boolean
41404153
native SetFrameCheckState takes framehandle whichFrame, boolean isCheck returns nothing
41414154
//
@@ -4147,22 +4160,22 @@ native GetFrameSlider takes framehandle whichFrame returns framehandle
41474160
native AddFrameSlider takes framehandle whichFrame returns framehandle
41484161
//
41494162

4150-
// CListBox API
4151-
native GetFrameItemsBorder takes framehandle listBox returns real
4152-
native SetFrameItemsBorder takes framehandle listBox, real value returns nothing
4153-
native GetFrameItemsHeight takes framehandle listBox returns real
4154-
native SetFrameItemsHeight takes framehandle listBox, real value returns nothing
4155-
4156-
// These functions return CListBoxItem frames.
4157-
native AddFrameListItem takes framehandle listBox, string text, framehandle whichFrame returns framehandle
4158-
native GetFrameListItemCount takes framehandle listBox returns integer
4159-
native GetFrameListItemById takes framehandle listBox, integer id returns framehandle
4160-
native SetFrameListItemById takes framehandle listBox, integer id, framehandle whichFrame returns nothing
4161-
native GetFrameListItemByFrame takes framehandle listBox, framehandle frameToFind returns framehandle
4162-
native SetFrameListItemByFrame takes framehandle listBox, framehandle frameToFind, framehandle whichFrame returns nothing
4163-
native RemoveFrameListItem takes framehandle listBox, framehandle whichFrame returns nothing // this uses CListBoxItem
4164-
native RemoveFrameListItemById takes framehandle listBox, integer id returns nothing
4165-
native RemoveFrameListItemByFrame takes framehandle listBox, framehandle whichFrame returns nothing
4163+
// CListBox / CMenu / CPopupMenu / CRadioGroup API
4164+
native GetFrameItemsBorder takes framehandle whichFrame returns real
4165+
native SetFrameItemsBorder takes framehandle whichFrame, real value returns nothing
4166+
native GetFrameItemsHeight takes framehandle whichFrame returns real
4167+
native SetFrameItemsHeight takes framehandle whichFrame, real value returns nothing
4168+
4169+
// These functions return CListBoxItem frames for CListBox / CMenu / CPopupMenu and CCheckBox/CGlueCheckBox for CRadioGroup.
4170+
native AddFrameListItem takes framehandle whichFrame, string text, framehandle frameToAdd returns framehandle
4171+
native GetFrameListItemCount takes framehandle whichFrame returns integer
4172+
native GetFrameListItemById takes framehandle whichFrame, integer id returns framehandle
4173+
native SetFrameListItemById takes framehandle whichFrame, integer id, framehandle listBoxItem returns nothing
4174+
native GetFrameListItemByFrame takes framehandle whichFrame, framehandle frameToFind returns framehandle
4175+
native SetFrameListItemByFrame takes framehandle whichFrame, framehandle frameToFind, framehandle listBoxItem returns nothing
4176+
native RemoveFrameListItem takes framehandle whichFrame, framehandle listBoxItem returns nothing // this uses CListBoxItem
4177+
native RemoveFrameListItemById takes framehandle whichFrame, integer id returns nothing
4178+
native RemoveFrameListItemByFrame takes framehandle whichFrame, framehandle listBoxItem returns nothing
41664179
//
41674180

41684181
// CListBoxItem API
@@ -4176,13 +4189,13 @@ native GetFrameHighlightTexture takes framehandle whichFrame, integer highlightI
41764189
native SetFrameHighlightTexture takes framehandle whichFrame, integer highlightId, string texturePath, blendmode blendMode returns nothing // 0 - FOCUS | 1 - ON HOVER
41774190
//
41784191

4179-
// Backdrop API | Border API | For corner flags refer to BORDER_FLAG. For CBackdropFrame and its children and for CSimpleFrame, backdropId has to be always 0.
4192+
// Backdrop API | Border API | For border flags refer to BORDER_FLAG. For CBackdropFrame and its children and for CSimpleFrame, backdropId has to be always 0.
41804193
// For CFrames that contain backdrops, use ids to differentiate between them, this is similar to CSimpleButton states, etc.
41814194
native GetFrameBackdrop takes framehandle whichFrame, integer backdropId returns framehandle // will return itself if frame is CBackdropFrame or CSimpleFrame.
41824195
native IsFrameBorderEnabled takes framehandle whichFrame, integer backdropId returns boolean
41834196
native SetFrameBorderEnabled takes framehandle whichFrame, integer backdropId, boolean isEnable returns nothing
41844197
native GetFrameBorderFlags takes framehandle whichFrame, integer backdropId returns integer
4185-
native SetFrameBorderFlags takes framehandle whichFrame, integer backdropId, integer cornerFlag returns nothing
4198+
native SetFrameBorderFlags takes framehandle whichFrame, integer backdropId, integer borderFlag returns nothing
41864199
native GetFrameBorderSize takes framehandle whichFrame, integer backdropId returns real
41874200
native SetFrameBorderSize takes framehandle whichFrame, integer backdropId, real value returns nothing
41884201
native GetFrameBackgroundSize takes framehandle whichFrame, integer backdropId returns real
@@ -4212,6 +4225,7 @@ native GetTriggerFrameReal takes nothing returns real // aka GetTriggerFrameValu
42124225
native GetTriggerFrameBoolean takes nothing returns boolean
42134226
native GetTriggerFrameString takes nothing returns string // aka GetTriggerFrameText
42144227
native GetTriggerFrameMouseButton takes nothing returns mousebuttontype
4228+
native GetTriggerFrameTargetFrame takes nothing returns framehandle
42154229

42164230
native TriggerRegisterFrameEvent takes trigger whichTrigger, framehandle whichFrame, frameeventtype frameEvent returns event
42174231
native RegisterFrameMouseButton takes framehandle whichFrame, mousebuttontype whichButton, boolean isAdd returns nothing // Add/Remove for event handling on Left/Middle/Right Mouse buttons, works for any CSimpleButton / CControl and whichever frame extends them.

0 commit comments

Comments
 (0)