summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-06-22 09:06:40 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-05 10:08:09 -0400
commitea719d78353d7b8f9add137199c6c9cc3f396149 (patch)
tree6e0af650db442d35c64a3e4bf1867c87f1405b51 /python
parent61b4bb24e06aa955484293d35fa926c07887544b (diff)
Fix highlight colors on BasicBlock objects
Diffstat (limited to 'python')
-rw-r--r--python/basicblock.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index ed6bc9e3..1bc29167 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -485,7 +485,7 @@ class BasicBlock(object):
return self.get_disassembly_text()
@property
- def highlight(self) -> 'binaryninja.highlightHighlightColor':
+ def highlight(self) -> 'binaryninja.highlight.HighlightColor':
"""Gets or sets the highlight color for basic block
:Example:
@@ -494,10 +494,10 @@ class BasicBlock(object):
>>> current_basic_block.highlight
<color: blue>
"""
- return binaryninja.highlightHighlightColor._from_core_struct(core.BNGetBasicBlockHighlight(self.handle))
+ return binaryninja.highlight.HighlightColor._from_core_struct(core.BNGetBasicBlockHighlight(self.handle))
@highlight.setter
- def highlight(self, value:'binaryninja.highlightHighlightColor') -> None:
+ def highlight(self, value:'binaryninja.highlight.HighlightColor') -> None:
self.set_user_highlight(value)
@property
@@ -560,13 +560,13 @@ class BasicBlock(object):
il_instr = self.il_function[lines[i].instrIndex] # type: ignore
else:
il_instr = None
- color = binaryninja.highlightHighlightColor._from_core_struct(lines[i].highlight)
+ color = binaryninja.highlight.HighlightColor._from_core_struct(lines[i].highlight)
tokens = binaryninja.function.InstructionTextToken._from_core_struct(lines[i].tokens, lines[i].count)
result.append(binaryninja.function.DisassemblyTextLine(tokens, addr, il_instr, color))
core.BNFreeDisassemblyTextLines(lines, count.value)
return result
- def set_auto_highlight(self, color:'binaryninja.highlightHighlightColor') -> None:
+ def set_auto_highlight(self, color:'binaryninja.highlight.HighlightColor') -> None:
"""
``set_auto_highlight`` highlights the current BasicBlock with the supplied color.
@@ -574,13 +574,13 @@ class BasicBlock(object):
:param HighlightStandardColor or HighlightColor color: Color value to use for highlighting
"""
- if not isinstance(color, HighlightStandardColor) and not isinstance(color, HighlightColor):
+ if not isinstance(color, HighlightStandardColor) and not isinstance(color, binaryninja.highlight.HighlightColor):
raise ValueError("Specified color is not one of HighlightStandardColor, HighlightColor")
if isinstance(color, HighlightStandardColor):
- color = binaryninja.highlightHighlightColor(color)
+ color = binaryninja.highlight.HighlightColor(color)
core.BNSetAutoBasicBlockHighlight(self.handle, color._get_core_struct())
- def set_user_highlight(self, color:'binaryninja.highlightHighlightColor') -> None:
+ def set_user_highlight(self, color:'binaryninja.highlight.HighlightColor') -> None:
"""
``set_user_highlight`` highlights the current BasicBlock with the supplied color
@@ -590,10 +590,10 @@ class BasicBlock(object):
>>> current_basic_block.set_user_highlight(HighlightColor(red=0xff, blue=0xff, green=0))
>>> current_basic_block.set_user_highlight(HighlightStandardColor.BlueHighlightColor)
"""
- if not isinstance(color, HighlightStandardColor) and not isinstance(color, binaryninja.highlightHighlightColor):
+ if not isinstance(color, HighlightStandardColor) and not isinstance(color, binaryninja.highlight.HighlightColor):
raise ValueError("Specified color is not one of HighlightStandardColor, HighlightColor")
if isinstance(color, HighlightStandardColor):
- color = binaryninja.highlightHighlightColor(color)
+ color = binaryninja.highlight.HighlightColor(color)
core.BNSetUserBasicBlockHighlight(self.handle, color._get_core_struct())
def get_instruction_containing_address(self, addr:int) -> Tuple[bool, int]: