Reads the context menu :param timeout: Optional. Any value other than None indicates a non-blocking read :type timeout: :return: :rtype:
(self, timeout=None)
| 12946 | self._metadata = value |
| 12947 | |
| 12948 | def read(self, timeout=None): |
| 12949 | """ |
| 12950 | Reads the context menu |
| 12951 | :param timeout: Optional. Any value other than None indicates a non-blocking read |
| 12952 | :type timeout: |
| 12953 | :return: |
| 12954 | :rtype: |
| 12955 | """ |
| 12956 | if self.last_message_event != TIMEOUT_KEY and self.last_message_event is not None: |
| 12957 | event = self.last_message_event |
| 12958 | self.last_message_event = None |
| 12959 | return event |
| 12960 | event, values = self.window.read(timeout=timeout) |
| 12961 | if event.endswith('DOUBLE_CLICK'): |
| 12962 | return EVENT_SYSTEM_TRAY_ICON_DOUBLE_CLICKED |
| 12963 | elif event == '-IMAGE-': |
| 12964 | return EVENT_SYSTEM_TRAY_ICON_ACTIVATED |
| 12965 | |
| 12966 | return event |
| 12967 | |
| 12968 | def hide(self): |
| 12969 | """ |