mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-08 13:18:09 +03:00
remove Latte library as requirement
--implement things simpler by using the same CoreTypes header file both for LatteCore.Types import statement and App c++ implementation. Let's leave in the future to decide if a LibLatte is really necessary.
This commit is contained in:
parent
790e0af406
commit
63187ce5b4
@ -22,9 +22,7 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED NO_MODULE COMPONENTS DBus Gui
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
||||
Activities Archive CoreAddons GuiAddons Crash DBusAddons Declarative GlobalAccel I18n
|
||||
IconThemes KIO NewStuff Notifications Plasma PlasmaQuick Wayland WindowSystem XmlGui)
|
||||
|
||||
find_package(Latte REQUIRED REQUIRED NO_MODULE)
|
||||
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
|
||||
URL "http://www.x.org"
|
||||
@ -84,6 +82,13 @@ string(REPLACE "-Wformat-security" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
|
||||
message(STATUS "COMPILER FLAGS : ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# Share Same Core Types between declarativeimports and app
|
||||
set(CORETYPESHEADER "LIBCORETYPES_H")
|
||||
configure_file(declarativeimports/coretypes.h.in declarativeimports/core/types.h)
|
||||
set(CORETYPESHEADER "APPCORETYPES_H")
|
||||
configure_file(declarativeimports/coretypes.h.in app/coretypes.h)
|
||||
|
||||
# subdirectories
|
||||
add_subdirectory(declarativeimports)
|
||||
add_subdirectory(indicators)
|
||||
add_subdirectory(app)
|
||||
|
@ -5,6 +5,7 @@ set(lattedock-app_SRCS
|
||||
lattecorona.cpp
|
||||
screenpool.cpp
|
||||
main.cpp
|
||||
coretypes.h
|
||||
)
|
||||
|
||||
add_subdirectory(indicator)
|
||||
@ -66,7 +67,6 @@ if(${KF5_VERSION_MINOR} LESS "62")
|
||||
KF5::ProcessCore
|
||||
KF5::WaylandClient
|
||||
KF5::XmlGui
|
||||
Latte
|
||||
)
|
||||
else()
|
||||
target_link_libraries(latte-dock
|
||||
@ -91,7 +91,6 @@ else()
|
||||
KF5::PlasmaQuick
|
||||
KF5::WaylandClient
|
||||
KF5::XmlGui
|
||||
Latte
|
||||
)
|
||||
|
||||
endif()
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "lattecorona.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "alternativeshelper.h"
|
||||
#include "apptypes.h"
|
||||
#include "lattedockadaptor.h"
|
||||
@ -1276,7 +1277,7 @@ void Corona::importFullConfiguration(const QString &file)
|
||||
}
|
||||
|
||||
inline void Corona::qmlRegisterTypes() const
|
||||
{
|
||||
{
|
||||
qmlRegisterUncreatableMetaObject(Latte::Settings::staticMetaObject,
|
||||
"org.kde.latte.private.app", // import statement
|
||||
0, 1, // major and minor version of the import
|
||||
@ -1291,6 +1292,7 @@ inline void Corona::qmlRegisterTypes() const
|
||||
qmlRegisterType<Latte::ViewPart::TrackerPart::AllScreensTracker>();
|
||||
qmlRegisterType<Latte::WindowSystem::SchemeColors>();
|
||||
qmlRegisterType<Latte::WindowSystem::Tracker::LastActiveWindow>();
|
||||
qmlRegisterType<Latte::Types>();
|
||||
#else
|
||||
qmlRegisterAnonymousType<QScreen>("latte-dock", 1);
|
||||
qmlRegisterAnonymousType<Latte::View>("latte-dock", 1);
|
||||
@ -1299,6 +1301,7 @@ inline void Corona::qmlRegisterTypes() const
|
||||
qmlRegisterAnonymousType<Latte::ViewPart::TrackerPart::AllScreensTracker>("latte-dock", 1);
|
||||
qmlRegisterAnonymousType<Latte::WindowSystem::SchemeColors>("latte-dock", 1);
|
||||
qmlRegisterAnonymousType<Latte::WindowSystem::Tracker::LastActiveWindow>("latte-dock", 1);
|
||||
qmlRegisterAnonymousType<Latte::Types>("latte-dock", 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define LATTECORONA_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "plasma/quick/configview.h"
|
||||
#include "layout/storage.h"
|
||||
#include "view/panelshadows_p.h"
|
||||
@ -36,9 +37,6 @@
|
||||
// KDE
|
||||
#include <KAboutApplicationDialog>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace KDeclarative {
|
||||
class QmlObjectSharedEngine;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "centrallayout.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "sharedlayout.h"
|
||||
#include "../apptypes.h"
|
||||
#include "../lattecorona.h"
|
||||
@ -35,8 +36,6 @@
|
||||
#include <KConfigGroup>
|
||||
#include <KActivities/Consumer>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define GENERICLAYOUT_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "abstractlayout.h"
|
||||
|
||||
// Qt
|
||||
@ -32,9 +33,6 @@
|
||||
// Plasma
|
||||
#include <Plasma>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Plasma {
|
||||
class Applet;
|
||||
class Containment;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "importer.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "manager.h"
|
||||
#include "../lattecorona.h"
|
||||
#include "../screenpool.h"
|
||||
@ -39,8 +40,6 @@
|
||||
#include <KLocalizedString>
|
||||
#include <KNotification>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
enum SessionType
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "launcherssignals.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../lattecorona.h"
|
||||
#include "../layout/centrallayout.h"
|
||||
#include "../layouts/manager.h"
|
||||
@ -33,8 +34,6 @@
|
||||
#include <Plasma/Applet>
|
||||
#include <Plasma/Containment>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace Layouts {
|
||||
|
@ -21,13 +21,14 @@
|
||||
#ifndef PLASMASCREENGEOMETRIES_H
|
||||
#define PLASMASCREENGEOMETRIES_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
|
||||
// Qt
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
class Corona;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define SETTINGSLAYOUTSCONTROLLER_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../data/layoutdata.h"
|
||||
#include "../data/layoutstable.h"
|
||||
#include "../views/layoutsheaderview.h"
|
||||
@ -34,8 +35,6 @@
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QTableView>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
class Corona;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define SETTINGSDIALOG_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "genericdialog.h"
|
||||
#include "../controllers/layoutscontroller.h"
|
||||
#include "../handlers/tablayoutshandler.h"
|
||||
@ -40,9 +41,6 @@
|
||||
// KDE
|
||||
#include <KHelpMenu>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Ui {
|
||||
class SettingsDialog;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "tablayoutshandler.h"
|
||||
|
||||
//! local
|
||||
#include <coretypes.h>
|
||||
#include "ui_settingsdialog.h"
|
||||
#include "../universalsettings.h"
|
||||
#include "../dialogs/detailsdialog.h"
|
||||
@ -45,8 +46,6 @@
|
||||
#include <KIO/OpenFileManagerWindowJob>
|
||||
#include <KNewStuff3/KNS3/DownloadDialog>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace Settings {
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "tabpreferenceshandler.h"
|
||||
|
||||
//! local
|
||||
#include <coretypes.h>
|
||||
#include "ui_settingsdialog.h"
|
||||
#include "../universalsettings.h"
|
||||
#include "../dialogs/settingsdialog.h"
|
||||
@ -28,8 +29,6 @@
|
||||
#include "../../lattecorona.h"
|
||||
#include "../../plasma/extended/theme.h"
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace Settings {
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define UNIVERSALSETTINGS_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../apptypes.h"
|
||||
#include "../lattecorona.h"
|
||||
|
||||
@ -38,9 +39,6 @@
|
||||
#include <KConfigGroup>
|
||||
#include <KSharedConfig>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace Layouts {
|
||||
class Manager;
|
||||
|
@ -21,6 +21,9 @@
|
||||
#ifndef GLOBALSHORTCUTS_H
|
||||
#define GLOBALSHORTCUTS_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
|
||||
// Qt
|
||||
#include <QAction>
|
||||
#include <QPointer>
|
||||
@ -29,8 +32,6 @@
|
||||
// KDE
|
||||
#include <kmodifierkeyinfo.h>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Plasma {
|
||||
class Containment;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "effects.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "panelshadows_p.h"
|
||||
#include "view.h"
|
||||
#include "settings/primaryconfigview.h"
|
||||
@ -31,8 +32,6 @@
|
||||
#include <KWindowEffects>
|
||||
#include <KWindowSystem>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace ViewPart {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "indicator.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "indicatorinfo.h"
|
||||
#include "../view.h"
|
||||
#include "../../lattecorona.h"
|
||||
@ -34,8 +35,6 @@
|
||||
#include <KDeclarative/ConfigPropertyMap>
|
||||
#include <KDeclarative/QmlObjectSharedEngine>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace ViewPart {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "positioner.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "effects.h"
|
||||
#include "view.h"
|
||||
#include "visibilitymanager.h"
|
||||
@ -35,8 +36,6 @@
|
||||
#include <KWayland/Client/surface.h>
|
||||
#include <KWindowSystem>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
namespace ViewPart {
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define PRIMARYCONFIGVIEW_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../../plasma/quick/configview.h"
|
||||
#include "../../wm/windowinfowrap.h"
|
||||
|
||||
@ -35,9 +36,6 @@
|
||||
#include <plasma/package.h>
|
||||
#include <Plasma/FrameSvg>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Plasma {
|
||||
class Applet;
|
||||
class Containment;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define SECONDARYCONFIGVIEW_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../../wm/windowinfowrap.h"
|
||||
|
||||
//Qt
|
||||
@ -33,8 +34,6 @@
|
||||
#include <plasma/package.h>
|
||||
#include <Plasma/FrameSvg>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Plasma {
|
||||
class Applet;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define VIEW_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "containmentinterface.h"
|
||||
#include "effects.h"
|
||||
#include "positioner.h"
|
||||
@ -46,8 +47,6 @@
|
||||
#include <QPointer>
|
||||
#include <QTimer>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Plasma {
|
||||
class Types;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <array>
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../plasma/quick/containmentview.h"
|
||||
|
||||
// Qt
|
||||
@ -33,8 +34,6 @@
|
||||
// Plasma
|
||||
#include <Plasma/Containment>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
class Corona;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define ABSTRACTWINDOWINTERFACE_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "schemecolors.h"
|
||||
#include "tasktools.h"
|
||||
#include "windowinfowrap.h"
|
||||
@ -49,8 +50,6 @@
|
||||
// Plasma
|
||||
#include <Plasma>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
class Corona;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define WINDOWSYSTEMWINDOWSTRACKER_H
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "../windowinfowrap.h"
|
||||
|
||||
// Qt
|
||||
@ -30,8 +31,6 @@
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
namespace Latte {
|
||||
class View;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "waylandinterface.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "view/positioner.h"
|
||||
#include "view/view.h"
|
||||
#include "view/helpers/screenedgeghostwindow.h"
|
||||
@ -33,9 +34,6 @@
|
||||
#include <QtX11Extras/QX11Info>
|
||||
#include <QRasterWindow>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
// KDE
|
||||
#include <KWindowSystem>
|
||||
#include <KWindowInfo>
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "xwindowinterface.h"
|
||||
|
||||
// local
|
||||
#include <coretypes.h>
|
||||
#include "tasktools.h"
|
||||
#include "view/view.h"
|
||||
#include "view/helpers/screenedgeghostwindow.h"
|
||||
@ -36,9 +37,6 @@
|
||||
#include <KWindowInfo>
|
||||
#include <KIconThemes/KIconLoader>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
// X11
|
||||
#include <NETWM>
|
||||
#include <xcb/xcb.h>
|
||||
|
@ -7,6 +7,7 @@ set(lattecoreplugin_SRCS
|
||||
commontools.cpp
|
||||
iconitem.cpp
|
||||
quickwindowsystem.cpp
|
||||
types.h
|
||||
)
|
||||
|
||||
add_subdirectory(plasma/extended)
|
||||
@ -21,7 +22,6 @@ target_link_libraries(lattecoreplugin
|
||||
KF5::PlasmaQuick
|
||||
KF5::QuickAddons
|
||||
KF5::IconThemes
|
||||
Latte
|
||||
)
|
||||
|
||||
if(HAVE_X11)
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "iconitem.h"
|
||||
#include "quickwindowsystem.h"
|
||||
|
||||
#include <types.h>
|
||||
|
||||
// Qt
|
||||
#include <QtQml>
|
||||
|
||||
// Latte
|
||||
#include <Latte>
|
||||
|
||||
void LatteCorePlugin::registerTypes(const char *uri)
|
||||
{
|
||||
|
100
declarativeimports/coretypes.h.in
Normal file
100
declarativeimports/coretypes.h.in
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
|
||||
*
|
||||
* This file is part of Latte-Dock
|
||||
*
|
||||
* Latte-Dock is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Latte-Dock is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef @CORETYPESHEADER@
|
||||
#define @CORETYPESHEADER@
|
||||
|
||||
// Qt
|
||||
#include <QObject>
|
||||
#include <QMetaEnum>
|
||||
#include <QMetaType>
|
||||
|
||||
namespace Latte {
|
||||
|
||||
class Types
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
public:
|
||||
Types() = delete;
|
||||
~Types(){};
|
||||
|
||||
enum ViewType
|
||||
{
|
||||
DockView = 0,
|
||||
PanelView
|
||||
};
|
||||
Q_ENUM(ViewType);
|
||||
|
||||
enum Visibility
|
||||
{
|
||||
None = -1,
|
||||
AlwaysVisible = 0,
|
||||
AutoHide,
|
||||
DodgeActive,
|
||||
DodgeMaximized,
|
||||
DodgeAllWindows,
|
||||
WindowsGoBelow,
|
||||
WindowsCanCover,
|
||||
WindowsAlwaysCover,
|
||||
SideBar,
|
||||
NormalWindow = 20
|
||||
};
|
||||
Q_ENUM(Visibility);
|
||||
|
||||
enum Alignment
|
||||
{
|
||||
Center = 0,
|
||||
Left,
|
||||
Right,
|
||||
Top,
|
||||
Bottom,
|
||||
Justify = 10
|
||||
};
|
||||
Q_ENUM(Alignment);
|
||||
|
||||
enum EdgesAndAlignments
|
||||
{
|
||||
BottomEdgeCenterAlign = 0,
|
||||
BottomEdgeLeftAlign,
|
||||
BottomEdgeRightAlign,
|
||||
TopEdgeCenterAlign,
|
||||
TopEdgeLeftAlign,
|
||||
TopEdgeRightAlign,
|
||||
LeftEdgeCenterAlign,
|
||||
LeftEdgeTopAlign,
|
||||
LeftEdgeBottomAlign,
|
||||
RightEdgeCenterAlign,
|
||||
RightEdgeTopAlign,
|
||||
RightEdgeBottomAlign
|
||||
};
|
||||
Q_ENUM(EdgesAndAlignments);
|
||||
|
||||
enum LaunchersGroup
|
||||
{
|
||||
UniqueLaunchers = 0,
|
||||
LayoutLaunchers = 1,
|
||||
GlobalLaunchers = 2
|
||||
};
|
||||
Q_ENUM(LaunchersGroup);
|
||||
};
|
||||
|
||||
}//end of namespace
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user