blob: aea5a92d5c2af1cf55839de13aeeefdd424a4f7b [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2022 The Chromium Authors
Tom Anderson80d3ad42022-05-03 12:09:272// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Tom Anderson4ee83742022-07-14 20:58:415#ifndef UI_LINUX_LINUX_UI_FACTORY_H_
6#define UI_LINUX_LINUX_UI_FACTORY_H_
Tom Anderson80d3ad42022-05-03 12:09:277
Takuto Ikuta7aff87d22025-05-15 15:18:428#include <vector>
9
Tom Anderson074a5d412022-08-30 18:54:5310#include "base/component_export.h"
Ali Hijazie63cbaf62023-12-20 19:29:3511#include "base/memory/raw_ptr.h"
Tom Anderson80d3ad42022-05-03 12:09:2712
Tom Anderson992d9872022-07-14 21:24:5013namespace ui {
14
15class LinuxUi;
Tom Andersoncd61f3b22022-09-14 16:27:4916class LinuxUiTheme;
Tom Anderson074a5d412022-08-30 18:54:5317enum class SystemTheme : int;
Tom Anderson80d3ad42022-05-03 12:09:2718
Tom Anderson074a5d412022-08-30 18:54:5319// Returns a LinuxUi for the default toolkit. May create a LinuxUi instance if
20// one does not exist. May return nullptr if no toolkits are available.
21COMPONENT_EXPORT(LINUX_UI_FACTORY)
22LinuxUi* GetDefaultLinuxUi();
23
Tom Anderson975c84e12022-09-14 22:17:5824// Returns a LinuxUiTheme for the default toolkit. May create a LinuxUiTheme
25// instance if one does not exist. May return nullptr if no toolkits are
26// available. Should only be used by tests or LinuxUi internals. Otherwise, use
27// the accessors in LinuxUiTheme instead.
28COMPONENT_EXPORT(LINUX_UI_FACTORY)
29LinuxUiTheme* GetDefaultLinuxUiTheme();
30
Tom Anderson074a5d412022-08-30 18:54:5331COMPONENT_EXPORT(LINUX_UI_FACTORY)
Tom Andersoncd61f3b22022-09-14 16:27:4932LinuxUiTheme* GetLinuxUiTheme(SystemTheme system_theme);
Tom Anderson074a5d412022-08-30 18:54:5333
Tom Anderson49431822023-07-21 22:35:4034// Returns all `LinuxUiTheme`s that have been created.
35COMPONENT_EXPORT(LINUX_UI_FACTORY)
Ali Hijazie63cbaf62023-12-20 19:29:3536const std::vector<raw_ptr<LinuxUiTheme, VectorExperimental>>&
37GetLinuxUiThemes();
Tom Anderson49431822023-07-21 22:35:4038
Tom Anderson074a5d412022-08-30 18:54:5339COMPONENT_EXPORT(LINUX_UI_FACTORY)
40SystemTheme GetDefaultSystemTheme();
Tom Anderson992d9872022-07-14 21:24:5041
42} // namespace ui
Tom Anderson80d3ad42022-05-03 12:09:2743
Tom Anderson4ee83742022-07-14 20:58:4144#endif // UI_LINUX_LINUX_UI_FACTORY_H_