-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathSimpleAction.py
More file actions
28 lines (22 loc) · 887 Bytes
/
SimpleAction.py
File metadata and controls
28 lines (22 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Import StreamController modules
from src.backend.PluginManager.ActionBase import ActionBase
from src.backend.DeckManagement.DeckController import DeckController
from src.backend.PageManagement.Page import Page
from src.backend.PluginManager.PluginBase import PluginBase
# Import python modules
import os
# Import gtk modules - used for the config rows
import gi
gi.require_version("Gtk", "4.0")
gi.require_version("Adw", "1")
from gi.repository import Gtk, Adw
class SimpleAction(ActionBase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def on_ready(self) -> None:
icon_path = os.path.join(self.plugin_base.PATH, "assets", "info.png")
self.set_media(media_path=icon_path, size=0.75)
def on_key_down(self) -> None:
print("Key down")
def on_key_up(self) -> None:
print("Key up")