summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2021-05-24 22:37:09 -0400
committerGlenn Smith <glenn@vector35.com>2021-05-26 16:48:34 -0400
commita46902ef8bbde08221ffd869054e206c0dfc2234 (patch)
treeedce5b743129d49a4748b6e32406152aa622e37d /python
parente278b2452efbf1b653f2d7d6b6d8090128d02ff3 (diff)
Updated examples and docs
Diffstat (limited to 'python')
-rw-r--r--python/examples/ui_notifications.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/examples/ui_notifications.py b/python/examples/ui_notifications.py
index 2dad11a3..d0c414a1 100644
--- a/python/examples/ui_notifications.py
+++ b/python/examples/ui_notifications.py
@@ -77,6 +77,16 @@ class UINotification(UIContextNotification):
else:
print(f"py OnAddressChange {location.getOffset()}")
+ def GetNameForFile(self, context, file, name):
+ # This function only works in C++: Name is an out param (cpp: &name), and not modifiable by python.
+ print(f"py GetNameForFile {file.getFilename()} {name}")
+ return False
+
+ def GetNameForPath(self, context, path, name):
+ # This function only works in C++: Name is an out param (cpp: &name), and not modifiable by python.
+ print(f"py GetNameForPath {path} {name}")
+ return False
+
# Register as a global so it doesn't get destructed
notif = UINotification()