tdesktop/Telegram/SourceFiles/window/themes/window_theme_editor_box.h

59 lines
1.3 KiB
C
Raw Normal View History

2019-09-02 16:10:18 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
2019-09-03 08:25:19 +00:00
#include "boxes/generic_box.h"
2019-09-02 16:10:18 +00:00
2019-09-05 05:18:21 +00:00
namespace Data {
struct CloudTheme;
} // namespace Data
2019-09-02 16:10:18 +00:00
namespace Window {
2019-09-03 08:25:19 +00:00
class Controller;
2019-09-02 16:10:18 +00:00
namespace Theme {
2019-09-09 20:58:41 +00:00
struct Object;
struct ParsedTheme;
2019-09-05 05:18:21 +00:00
void StartEditor(
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud);
2019-09-03 08:25:19 +00:00
void CreateBox(
not_null<GenericBox*> box,
not_null<Window::Controller*> window);
void CreateForExistingBox(
not_null<GenericBox*> box,
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud);
void SaveTheme(
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud,
const QByteArray &palette,
Fn<void()> unlock);
2019-09-03 08:25:19 +00:00
void SaveThemeBox(
not_null<GenericBox*> box,
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud,
2019-09-03 08:25:19 +00:00
const QByteArray &palette);
2019-09-02 16:10:18 +00:00
[[nodiscard]] bool PaletteChanged(
const QByteArray &editorPalette,
const Data::CloudTheme &cloud);
[[nodiscard]] QByteArray CollectForExport(const QByteArray &palette);
2019-09-09 20:58:41 +00:00
[[nodiscard]] ParsedTheme ParseTheme(
const Object &theme,
bool onlyPalette = false,
bool parseCurrent = true);
2019-09-02 16:10:18 +00:00
} // namespace Theme
} // namespace Window