blob: 2e40e8e489b9307f004e212d50d7747e1810b6fa (
plain)
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
|
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Theming;
/**
* Interface ITheme
*
* @since 25.0.0
*/
interface ITheme {
public const TYPE_THEME = 1;
public const TYPE_FONT = 2;
/**
* Unique theme id
* Will be used to search for ID.png in the img folder
*
* @since 25.0.0
*/
public function getId(): string;
/**
* Theme type
* TYPE_THEME or TYPE_FONT
*
* @since 25.0.0
*/
public function getType(): int;
/**
* The theme translated title
*
* @since 25.0.0
*/
public function getTitle(): string;
/**
* The theme enable checkbox translated label
*
* @since 25.0.0
*/
public function getEnableLabel(): string;
/**
* The theme translated description
*
* @since 25.0.0
*/
public function getDescription(): string;
/**
* Get the meta attribute matching the theme
* e.g. https://html.spec.whatwg.org/multipage/semantics.html#meta-color-scheme
* @return array{name?: string, content?: string}[]
* @since 29.0.0
*/
public function getMeta(): array;
/**
* Get the media query triggering this theme
* Optional, ignored if falsy
*
* @return string
* @since 25.0.0
*/
public function getMediaQuery(): string;
/**
* Return the list of changed css variables
*
* @return array
* @since 25.0.0
*/
public function getCSSVariables(): array;
/**
* Return the custom css necessary for that app
* ⚠️ Warning, should be used slightly.
* Theoretically, editing the variables should be enough.
*
* @return string
* @since 25.0.0
*/
public function getCustomCss(): string;
}
|