-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcinnamon-api.yml
More file actions
108 lines (91 loc) · 3.46 KB
/
cinnamon-api.yml
File metadata and controls
108 lines (91 loc) · 3.46 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
patterns:
# APIs that have Cinnamon wrapper equivalents.
# Spices should use the wrappers instead of the raw APIs.
# -- App System --
- name: gio_desktop_app_info
regex: 'new\s+Gio\.DesktopAppInfo\s*\('
message: |
Use `Cinnamon.AppSystem.get_default().lookup_app(id)` instead of creating
`Gio.DesktopAppInfo` directly. `CinnamonApp` provides unified app state
tracking (windows, PIDs, running state) on top of the desktop entry info.
severity: warning
extensions:
- .js
# -- Recent Files --
- name: gtk_recent_manager
regex: 'Gtk\.RecentManager'
message: |
Use `imports.misc.docInfo.getDocManager()` instead of `Gtk.RecentManager`.
`DocManager` provides a cached, sorted, limited list of recent documents
with idle-delayed change signals.
severity: warning
extensions:
- .js
# -- Volume / Mount Management --
- name: gio_volume_monitor
regex: 'Gio\.VolumeMonitor'
message: |
Use `Main.placesManager` instead of `Gio.VolumeMonitor` directly.
`PlacesManager` provides a unified API for bookmarks, mounts, volumes,
and drives with debounced updates and safe eject/unmount handling.
severity: warning
extensions:
- .js
# -- Notifications --
- name: gio_notification
regex: 'new\s+Gio\.Notification\s*\('
message: |
Use `imports.ui.messageTray` (`Notification` + `Source`) instead of `Gio.Notification`.
Cinnamon does not use GNotification internally.
severity: warning
extensions:
- .js
# -- File Dialogs --
- name: file_dialog
regex: 'Gtk\.FileChooser'
message: |
Use `imports.misc.fileDialog` (`open()`, `save()`, `openFolder()`) instead.
Gtk dialogs cannot be used in the Cinnamon runtime.
severity: warning
extensions:
- .js
# -- Keybindings --
- name: raw_keybinding
regex: 'global\.display\.(add_custom_keybinding|remove_keybinding)\s*\('
message: |
Use `Main.keybindingManager.addHotKey()` / `removeHotKey()` instead of
calling `global.display` keybinding methods directly.
For xlets, use `addXletHotKey()` / `removeXletHotKey()` for proper
multi-instance support.
severity: warning
extensions:
- .js
# -- Pointer --
- name: raw_pointer_tracking
regex: 'Clutter\.get_default_backend\(\)\.get_default_seat\(\)'
message: |
Use `imports.misc.pointerTracker.PointerTracker` instead of accessing
the Clutter seat directly for pointer operations.
severity: warning
extensions:
- .js
- name: raw_warp_pointer
regex: '\.warp_pointer\s*\('
message: |
Use `imports.misc.pointerTracker.PointerTracker` instead of calling
`seat.warp_pointer()` directly.
severity: warning
extensions:
- .js
# -- UPower --
- name: raw_upower
regex: 'imports\.gi\.UPowerGlib'
cinnamon_version: "6.8"
message: |
(Cinnamon 6.8) Use `imports.misc.powerUtils` instead of `UPowerGlib` directly.
`powerUtils` provides shared helpers for battery icon names, device kind
strings/icons, level descriptions, and re-exports `UPDeviceKind`,
`UPDeviceState`, and `UPDeviceLevel` constants.
severity: warning
extensions:
- .js