1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 01:33:50 +03:00

try to support a public liblatte library

This commit is contained in:
Michail Vourlakos 2020-04-22 14:09:42 +03:00
parent 1ad1dd2982
commit ac3ccb5b98
38 changed files with 87 additions and 45 deletions

View File

@ -23,6 +23,8 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Activities Archive CoreAddons GuiAddons Crash DBusAddons Declarative GlobalAccel I18n Activities Archive CoreAddons GuiAddons Crash DBusAddons Declarative GlobalAccel I18n
IconThemes KIO NewStuff Notifications Plasma PlasmaQuick Wayland WindowSystem XmlGui) IconThemes KIO NewStuff Notifications Plasma PlasmaQuick Wayland WindowSystem XmlGui)
find_package(Latte REQUIRED)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
URL "http://www.x.org" URL "http://www.x.org"

View File

@ -23,7 +23,6 @@ add_subdirectory(settings/views)
add_subdirectory(settings/widgets) add_subdirectory(settings/widgets)
add_subdirectory(shortcuts) add_subdirectory(shortcuts)
add_subdirectory(tools) add_subdirectory(tools)
add_subdirectory(types)
add_subdirectory(view) add_subdirectory(view)
add_subdirectory(view/helpers) add_subdirectory(view/helpers)
add_subdirectory(view/indicator) add_subdirectory(view/indicator)

View File

@ -20,14 +20,14 @@
#ifndef INDICATORFACTORY_H #ifndef INDICATORFACTORY_H
#define INDICATORFACTORY_H #define INDICATORFACTORY_H
// local
#include "../types/types.h"
// Qt // Qt
#include <QHash> #include <QHash>
#include <QObject> #include <QObject>
#include <QWidget> #include <QWidget>
// Latte
#include <Latte/types.h>
class KPluginMetaData; class KPluginMetaData;
namespace Latte { namespace Latte {

View File

@ -24,7 +24,6 @@
// local // local
#include "plasma/quick/configview.h" #include "plasma/quick/configview.h"
#include "layout/storage.h" #include "layout/storage.h"
#include "types/types.h"
#include "view/panelshadows_p.h" #include "view/panelshadows_p.h"
// Qt // Qt
@ -37,6 +36,9 @@
// KDE // KDE
#include <KAboutApplicationDialog> #include <KAboutApplicationDialog>
// Latte
#include <Latte/types.h>
namespace KDeclarative { namespace KDeclarative {
class QmlObjectSharedEngine; class QmlObjectSharedEngine;
} }

View File

@ -20,9 +20,6 @@
#ifndef ABSTRACTLAYOUT_H #ifndef ABSTRACTLAYOUT_H
#define ABSTRACTLAYOUT_H #define ABSTRACTLAYOUT_H
// local
#include "../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -32,6 +29,9 @@
// Plasma // Plasma
#include <Plasma> #include <Plasma>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Types; class Types;
} }

View File

@ -29,12 +29,14 @@
#include "../layouts/synchronizer.h" #include "../layouts/synchronizer.h"
#include "../settings/universalsettings.h" #include "../settings/universalsettings.h"
#include "../view/view.h" #include "../view/view.h"
#include "../types/types.h"
// KDE // KDE
#include <KConfigGroup> #include <KConfigGroup>
#include <KActivities/Consumer> #include <KActivities/Consumer>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
CentralLayout::CentralLayout(QObject *parent, QString layoutFile, QString assignedName) CentralLayout::CentralLayout(QObject *parent, QString layoutFile, QString assignedName)

View File

@ -22,7 +22,6 @@
// local // local
#include "abstractlayout.h" #include "abstractlayout.h"
#include "../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -33,6 +32,9 @@
// Plasma // Plasma
#include <Plasma> #include <Plasma>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Applet; class Applet;
class Containment; class Containment;

View File

@ -26,7 +26,6 @@
#include "../screenpool.h" #include "../screenpool.h"
#include "../layout/abstractlayout.h" #include "../layout/abstractlayout.h"
#include "../settings/universalsettings.h" #include "../settings/universalsettings.h"
#include "../types/types.h"
// Qt // Qt
#include <QFile> #include <QFile>
@ -40,6 +39,9 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <KNotification> #include <KNotification>
// Latte
#include <Latte/types.h>
enum SessionType enum SessionType
{ {
DefaultSession = 0, DefaultSession = 0,

View File

@ -25,7 +25,6 @@
#include "../layout/centrallayout.h" #include "../layout/centrallayout.h"
#include "../layouts/manager.h" #include "../layouts/manager.h"
#include "../layouts/synchronizer.h" #include "../layouts/synchronizer.h"
#include "../types/tasks.h"
// Qt // Qt
#include <QQuickItem> #include <QQuickItem>
@ -34,6 +33,9 @@
#include <Plasma/Applet> #include <Plasma/Applet>
#include <Plasma/Containment> #include <Plasma/Containment>
// Latte
#include <Latte/tasks.h>
namespace Latte { namespace Latte {
namespace Layouts { namespace Layouts {

View File

@ -22,8 +22,6 @@
#include "config-latte.h" #include "config-latte.h"
#include "lattecorona.h" #include "lattecorona.h"
#include "layouts/importer.h" #include "layouts/importer.h"
#include "types/tasks.h"
#include "types/types.h"
// C++ // C++
#include <memory> #include <memory>
@ -60,9 +58,6 @@ inline void detectPlatform(int argc, char **argv);
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
qmlRegisterUncreatableType<Latte::Tasks>("org.kde.latte", 0, 2, "Tasks", "Latte Tasks Types uncreatable");
qmlRegisterUncreatableType<Latte::Types>("org.kde.latte", 0, 2, "Types", "Latte Types uncreatable");
//Plasma scales itself to font DPI //Plasma scales itself to font DPI
//on X, where we don't have compositor scaling, this generally works fine. //on X, where we don't have compositor scaling, this generally works fine.
//also there are bugs on older Qt, especially when it comes to fractional scaling //also there are bugs on older Qt, especially when it comes to fractional scaling

View File

@ -25,7 +25,8 @@
#include <QObject> #include <QObject>
#include <QTimer> #include <QTimer>
#include "../../types/types.h" // Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
class Corona; class Corona;

View File

@ -27,7 +27,6 @@
#include "../views/layoutsheaderview.h" #include "../views/layoutsheaderview.h"
#include "../models/layoutsmodel.h" #include "../models/layoutsmodel.h"
#include "../../lattecorona.h" #include "../../lattecorona.h"
#include "../../types/types.h"
// Qt // Qt
#include <QAbstractItemModel> #include <QAbstractItemModel>
@ -35,6 +34,9 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include <QTableView> #include <QTableView>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
class Corona; class Corona;
class CentralLayout; class CentralLayout;

View File

@ -21,14 +21,14 @@
#ifndef SETTINGSDATALAYOUT_H #ifndef SETTINGSDATALAYOUT_H
#define SETTINGSDATALAYOUT_H #define SETTINGSDATALAYOUT_H
//local
#include "../../types/types.h"
//Qt //Qt
#include <QMetaType> #include <QMetaType>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Settings { namespace Settings {
namespace Data { namespace Data {

View File

@ -21,7 +21,8 @@
#ifndef SETTINGSDATAPREFERENCES_H #ifndef SETTINGSDATAPREFERENCES_H
#define SETTINGSDATAPREFERENCES_H #define SETTINGSDATAPREFERENCES_H
#include "../../types/types.h" // Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Settings { namespace Settings {

View File

@ -33,7 +33,6 @@
#include "../../layouts/manager.h" #include "../../layouts/manager.h"
#include "../../layouts/synchronizer.h" #include "../../layouts/synchronizer.h"
#include "../../plasma/extended/theme.h" #include "../../plasma/extended/theme.h"
#include "../../types/types.h"
// Qt // Qt
#include <QButtonGroup> #include <QButtonGroup>

View File

@ -27,7 +27,6 @@
#include "../controllers/layoutscontroller.h" #include "../controllers/layoutscontroller.h"
#include "../handlers/tablayoutshandler.h" #include "../handlers/tablayoutshandler.h"
#include "../handlers/tabpreferenceshandler.h" #include "../handlers/tabpreferenceshandler.h"
#include "../../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -41,6 +40,9 @@
// KDE // KDE
#include <KHelpMenu> #include <KHelpMenu>
// Latte
#include <Latte/types.h>
namespace Ui { namespace Ui {
class SettingsDialog; class SettingsDialog;
} }

View File

@ -26,7 +26,9 @@
#include "../dialogs/detailsdialog.h" #include "../dialogs/detailsdialog.h"
#include "../widgets/patternwidget.h" #include "../widgets/patternwidget.h"
#include "../../layout/abstractlayout.h" #include "../../layout/abstractlayout.h"
#include "../../types/types.h"
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Settings { namespace Settings {

View File

@ -31,7 +31,6 @@
#include "../../layout/centrallayout.h" #include "../../layout/centrallayout.h"
#include "../../layouts/importer.h" #include "../../layouts/importer.h"
#include "../../layouts/manager.h" #include "../../layouts/manager.h"
#include "../../types/types.h"
//! Qt //! Qt
#include <QFileDialog> #include <QFileDialog>
@ -45,6 +44,9 @@
#include <KIO/OpenFileManagerWindowJob> #include <KIO/OpenFileManagerWindowJob>
#include <KNewStuff3/KNS3/DownloadDialog> #include <KNewStuff3/KNS3/DownloadDialog>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Settings { namespace Settings {
namespace Handler { namespace Handler {

View File

@ -26,7 +26,9 @@
#include "../dialogs/settingsdialog.h" #include "../dialogs/settingsdialog.h"
#include "../../lattecorona.h" #include "../../lattecorona.h"
#include "../../plasma/extended/theme.h" #include "../../plasma/extended/theme.h"
#include "../../types/types.h"
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Settings { namespace Settings {

View File

@ -23,7 +23,6 @@
// local // local
#include "../lattecorona.h" #include "../lattecorona.h"
#include "../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -38,6 +37,9 @@
#include <KConfigGroup> #include <KConfigGroup>
#include <KSharedConfig> #include <KSharedConfig>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace Layouts { namespace Layouts {
class Manager; class Manager;

View File

@ -21,9 +21,6 @@
#ifndef GLOBALSHORTCUTS_H #ifndef GLOBALSHORTCUTS_H
#define GLOBALSHORTCUTS_H #define GLOBALSHORTCUTS_H
// local
#include "../types/types.h"
// Qt // Qt
#include <QAction> #include <QAction>
#include <QPointer> #include <QPointer>
@ -32,6 +29,9 @@
// KDE // KDE
#include <kmodifierkeyinfo.h> #include <kmodifierkeyinfo.h>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Containment; class Containment;
} }

View File

@ -23,7 +23,6 @@
#include "panelshadows_p.h" #include "panelshadows_p.h"
#include "view.h" #include "view.h"
#include "settings/primaryconfigview.h" #include "settings/primaryconfigview.h"
#include "../types/types.h"
// Qt // Qt
#include <QRegion> #include <QRegion>
@ -32,6 +31,9 @@
#include <KWindowEffects> #include <KWindowEffects>
#include <KWindowSystem> #include <KWindowSystem>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace ViewPart { namespace ViewPart {

View File

@ -24,7 +24,6 @@
#include "../view.h" #include "../view.h"
#include "../../lattecorona.h" #include "../../lattecorona.h"
#include "../../indicator/factory.h" #include "../../indicator/factory.h"
#include "../../types/types.h"
// Qt // Qt
#include <QFileDialog> #include <QFileDialog>
@ -35,6 +34,9 @@
#include <KDeclarative/ConfigPropertyMap> #include <KDeclarative/ConfigPropertyMap>
#include <KDeclarative/QmlObjectSharedEngine> #include <KDeclarative/QmlObjectSharedEngine>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace ViewPart { namespace ViewPart {

View File

@ -26,7 +26,6 @@
#include "../lattecorona.h" #include "../lattecorona.h"
#include "../screenpool.h" #include "../screenpool.h"
#include "../settings/universalsettings.h" #include "../settings/universalsettings.h"
#include "../types/types.h"
// Qt // Qt
#include <QDebug> #include <QDebug>
@ -36,6 +35,9 @@
#include <KWayland/Client/surface.h> #include <KWayland/Client/surface.h>
#include <KWindowSystem> #include <KWindowSystem>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
namespace ViewPart { namespace ViewPart {

View File

@ -32,7 +32,6 @@
#include "../../settings/universalsettings.h" #include "../../settings/universalsettings.h"
#include "../../shortcuts/globalshortcuts.h" #include "../../shortcuts/globalshortcuts.h"
#include "../../shortcuts/shortcutstracker.h" #include "../../shortcuts/shortcutstracker.h"
#include "../../types/tasks.h"
#include "../../wm/abstractwindowinterface.h" #include "../../wm/abstractwindowinterface.h"
// Qt // Qt
@ -52,6 +51,9 @@
// Plasma // Plasma
#include <Plasma/Package> #include <Plasma/Package>
// Latte
#include <Latte/tasks.h>
namespace Latte { namespace Latte {
namespace ViewPart { namespace ViewPart {

View File

@ -24,7 +24,6 @@
// local // local
#include "../../plasma/quick/configview.h" #include "../../plasma/quick/configview.h"
#include "../../wm/windowinfowrap.h" #include "../../wm/windowinfowrap.h"
#include "../../types/types.h"
//Qt //Qt
#include <QObject> #include <QObject>
@ -36,6 +35,9 @@
#include <plasma/package.h> #include <plasma/package.h>
#include <Plasma/FrameSvg> #include <Plasma/FrameSvg>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Applet; class Applet;
class Containment; class Containment;

View File

@ -22,7 +22,6 @@
// local // local
#include "../../wm/windowinfowrap.h" #include "../../wm/windowinfowrap.h"
#include "../../types/types.h"
//Qt //Qt
#include <QObject> #include <QObject>
@ -34,6 +33,9 @@
#include <plasma/package.h> #include <plasma/package.h>
#include <Plasma/FrameSvg> #include <Plasma/FrameSvg>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Applet; class Applet;
class Containment; class Containment;

View File

@ -33,7 +33,6 @@
#include "../layout/genericlayout.h" #include "../layout/genericlayout.h"
#include "../plasma/quick/containmentview.h" #include "../plasma/quick/containmentview.h"
#include "../plasma/quick/configview.h" #include "../plasma/quick/configview.h"
#include "../types/types.h"
// C++ // C++
#include <array> #include <array>
@ -47,6 +46,9 @@
#include <QPointer> #include <QPointer>
#include <QTimer> #include <QTimer>
// Latte
#include <Latte/types.h>
namespace Plasma { namespace Plasma {
class Types; class Types;
class Corona; class Corona;

View File

@ -25,7 +25,6 @@
// local // local
#include "../plasma/quick/containmentview.h" #include "../plasma/quick/containmentview.h"
#include "../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -34,6 +33,9 @@
// Plasma // Plasma
#include <Plasma/Containment> #include <Plasma/Containment>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
class Corona; class Corona;
class View; class View;

View File

@ -26,8 +26,6 @@
#include "tasktools.h" #include "tasktools.h"
#include "windowinfowrap.h" #include "windowinfowrap.h"
#include "tracker/windowstracker.h" #include "tracker/windowstracker.h"
#include "../types/types.h"
//#include "../liblatte2/extras.h"
// C++ // C++
#include <unordered_map> #include <unordered_map>
@ -51,6 +49,9 @@
// Plasma // Plasma
#include <Plasma> #include <Plasma>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
class Corona; class Corona;
namespace WindowSystem { namespace WindowSystem {

View File

@ -22,7 +22,6 @@
// local // local
#include "../windowinfowrap.h" #include "../windowinfowrap.h"
#include "../../types/types.h"
// Qt // Qt
#include <QObject> #include <QObject>
@ -31,6 +30,9 @@
#include <QMap> #include <QMap>
#include <QTimer> #include <QTimer>
// Latte
#include <Latte/types.h>
namespace Latte { namespace Latte {
class View; class View;
namespace Layout { namespace Layout {

View File

@ -25,7 +25,6 @@
#include "view/view.h" #include "view/view.h"
#include "view/helpers/screenedgeghostwindow.h" #include "view/helpers/screenedgeghostwindow.h"
#include "../lattecorona.h" #include "../lattecorona.h"
#include "../types/types.h"
// Qt // Qt
#include <QDebug> #include <QDebug>
@ -34,6 +33,9 @@
#include <QtX11Extras/QX11Info> #include <QtX11Extras/QX11Info>
#include <QRasterWindow> #include <QRasterWindow>
// Latte
#include <Latte/types.h>
// KDE // KDE
#include <KWindowSystem> #include <KWindowSystem>
#include <KWindowInfo> #include <KWindowInfo>

View File

@ -24,7 +24,6 @@
#include "tasktools.h" #include "tasktools.h"
#include "view/view.h" #include "view/view.h"
#include "view/helpers/screenedgeghostwindow.h" #include "view/helpers/screenedgeghostwindow.h"
#include "../types/types.h"
// Qt // Qt
#include <QDebug> #include <QDebug>
@ -37,6 +36,9 @@
#include <KWindowInfo> #include <KWindowInfo>
#include <KIconThemes/KIconLoader> #include <KIconThemes/KIconLoader>
// Latte
#include <Latte/types.h>
// X11 // X11
#include <NETWM> #include <NETWM>
#include <xcb/xcb.h> #include <xcb/xcb.h>