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

49 lines
1.1 KiB
C
Raw Normal View History

2019-09-02 19:10:18 +03: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 11:25:19 +03:00
#include "boxes/generic_box.h"
2019-09-02 19:10:18 +03:00
2019-09-05 08:18:21 +03:00
namespace Data {
struct CloudTheme;
} // namespace Data
2019-09-02 19:10:18 +03:00
namespace Window {
2019-09-03 11:25:19 +03:00
class Controller;
2019-09-02 19:10:18 +03:00
namespace Theme {
2019-09-05 08:18:21 +03:00
void StartEditor(
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud);
2019-09-03 11:25:19 +03: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 11:25:19 +03:00
void SaveThemeBox(
not_null<GenericBox*> box,
not_null<Window::Controller*> window,
const Data::CloudTheme &cloud,
2019-09-03 11:25:19 +03:00
const QByteArray &palette);
2019-09-02 19:10:18 +03:00
[[nodiscard]] bool PaletteChanged(
const QByteArray &editorPalette,
const Data::CloudTheme &cloud);
2019-09-02 19:10:18 +03:00
} // namespace Theme
} // namespace Window