summaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples')
-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()