├── .travis.yml ├── .travis ├── PKGBUILD.in ├── bintray.json.in └── bintray.sh ├── AUTHORS.md ├── CMakeLists.txt ├── CONTRIBUTORS.md ├── LICENSE.GPLv2 ├── LICENSE.GPLv3 ├── LICENSE.LGPLv2.1 ├── LICENSE.LGPLv3 ├── README.md ├── cmake ├── COPYING-CMAKE-SCRIPTS ├── CheckFileExists.cmake ├── FindBcmHost.cmake ├── FindFontconfig.cmake ├── FindLibdl.cmake ├── FindLibdrm.cmake ├── FindLibinput.cmake ├── FindOpenGLES.cmake ├── FindQt5PlatformSupport.cmake ├── FindUDev.cmake ├── Findgbm.cmake ├── GenerateHeaders.cmake ├── GetGitRevision.cmake └── PrivateHeaders.cmake ├── cmake_uninstall.cmake.in ├── compositor ├── CMakeLists.txt ├── main.cpp └── translations │ ├── af.ts │ ├── ar.ts │ ├── ast.ts │ ├── ast_ES.ts │ ├── bg.ts │ ├── cs_CZ.ts │ ├── da_DK.ts │ ├── de.ts │ ├── el.ts │ ├── es.ts │ ├── es_AR.ts │ ├── fa_IR.ts │ ├── fr.ts │ ├── hi.ts │ ├── hr_HR.ts │ ├── hu.ts │ ├── id.ts │ ├── it.ts │ ├── it_IT.ts │ ├── ja_JP.ts │ ├── kk.ts │ ├── nl.ts │ ├── nl_NL.ts │ ├── no.ts │ ├── pam.ts │ ├── pl.ts │ ├── pt.ts │ ├── pt_BR.ts │ ├── ru.ts │ ├── si_LK.ts │ ├── sk.ts │ ├── template.ts │ ├── tr.ts │ ├── update.sh │ ├── vi.ts │ └── zh_CN.ts ├── data ├── CMakeLists.txt ├── protocols │ ├── greenisland │ │ ├── greenisland-outputmanagement.xml │ │ ├── greenisland-screencaster.xml │ │ ├── greenisland-screenshooter.xml │ │ └── greenisland.xml │ ├── gtk │ │ └── gtk-shell.xml │ ├── plasma │ │ ├── plasma-effects.xml │ │ ├── plasma-shell.xml │ │ └── plasma-window-management.xml │ ├── qt │ │ ├── brcm.xml │ │ ├── drm-egl-server-buffer.xml │ │ ├── hardware-integration.xml │ │ ├── libhybris-egl-server-buffer.xml │ │ ├── qt-windowmanager.xml │ │ ├── qtkey-extension.xml │ │ ├── server-buffer-extension.xml │ │ ├── surface-extension.xml │ │ ├── touch-extension.xml │ │ └── xcomposite.xml │ └── wayland │ │ ├── text-input-unstable-v2.xml │ │ ├── wayland.xml │ │ └── xdg-shell.xml ├── screen │ ├── CMakeLists.txt │ ├── four-960x540.json │ ├── fullhd-hidpi.json │ ├── one-1024x768.json │ ├── one-1920x1080.json │ ├── one-960x540.json │ ├── phone-1080x1920.json │ ├── phone-720x1280.json │ ├── rotation-inverted.json │ ├── rotation-left.json │ ├── rotation-right.json │ ├── tablet-2048x1536.json │ ├── two-1024x768.json │ ├── two-rotated.json │ └── two-uneven.json └── wayland-protocols │ └── unstable │ └── fullscreen-shell │ └── fullscreen-shell-unstable-v1.xml ├── declarative ├── CMakeLists.txt ├── compositor │ ├── CMakeLists.txt │ ├── WaylandCursorItem.qml │ ├── WaylandOutputWindow.qml │ ├── WindowChrome.qml │ ├── fpscounter.cpp │ ├── fpscounter.h │ ├── keyeventfilter.cpp │ ├── keyeventfilter.h │ ├── plugin.cpp │ ├── qmldir │ ├── qwaylandmousetracker.cpp │ └── qwaylandmousetracker_p.h └── xwayland │ ├── CMakeLists.txt │ ├── XWaylandWindowChrome.qml │ ├── plugin.cpp │ ├── qmldir │ ├── sigwatch.cpp │ ├── sigwatch.h │ ├── sizehints.h │ ├── xcbatom.cpp │ ├── xcbatom.h │ ├── xcbatoms.cpp │ ├── xcbatoms.h │ ├── xcbcursors.cpp │ ├── xcbcursors.h │ ├── xcbproperties.cpp │ ├── xcbproperties.h │ ├── xcbresources.cpp │ ├── xcbresources.h │ ├── xcbwindow.cpp │ ├── xcbwindow.h │ ├── xcbwrapper.cpp │ ├── xcbwrapper.h │ ├── xwayland.cpp │ ├── xwayland.h │ ├── xwaylandmanager.cpp │ ├── xwaylandmanager.h │ ├── xwaylandquickshellintegration.cpp │ ├── xwaylandquickshellintegration.h │ ├── xwaylandquickshellsurfaceitem.cpp │ ├── xwaylandquickshellsurfaceitem.h │ ├── xwaylandserver.cpp │ ├── xwaylandserver.h │ ├── xwaylandshellsurface.cpp │ └── xwaylandshellsurface.h ├── headers ├── CMakeLists.txt ├── cmakedirs.h.in └── config.h.in ├── launcher ├── CMakeLists.txt ├── compositorlauncher.cpp ├── compositorlauncher.h ├── compositorprocess.cpp ├── compositorprocess.h └── main.cpp ├── plugins ├── CMakeLists.txt ├── egldeviceintegration │ ├── CMakeLists.txt │ ├── brcm │ │ ├── CMakeLists.txt │ │ ├── brcm.json │ │ ├── eglfsbrcmintegration.cpp │ │ ├── eglfsbrcmintegration.h │ │ └── main.cpp │ ├── kms │ │ ├── CMakeLists.txt │ │ ├── eglfskmscursor.cpp │ │ ├── eglfskmscursor.h │ │ ├── eglfskmsdevice.cpp │ │ ├── eglfskmsdevice.h │ │ ├── eglfskmsintegration.cpp │ │ ├── eglfskmsintegration.h │ │ ├── eglfskmsscreen.cpp │ │ ├── eglfskmsscreen.h │ │ ├── eglfskmswindow.cpp │ │ ├── eglfskmswindow.h │ │ ├── kms.json │ │ └── main.cpp │ ├── mali │ │ ├── CMakeLists.txt │ │ ├── eglfsmaliintegration.cpp │ │ ├── eglfsmaliintegration.h │ │ ├── main.cpp │ │ └── mali.json │ ├── viv │ │ ├── CMakeLists.txt │ │ ├── eglfs_viv.pro │ │ ├── eglfsvivintegration.cpp │ │ ├── eglfsvivintegration.h │ │ ├── main.cpp │ │ └── viv.json │ ├── wayland │ │ ├── CMakeLists.txt │ │ ├── eglfswaylandblitter.cpp │ │ ├── eglfswaylandblitter.h │ │ ├── eglfswaylandcontext.cpp │ │ ├── eglfswaylandcontext.h │ │ ├── eglfswaylandinput.cpp │ │ ├── eglfswaylandinput.h │ │ ├── eglfswaylandintegration.cpp │ │ ├── eglfswaylandintegration.h │ │ ├── eglfswaylandscreen.cpp │ │ ├── eglfswaylandscreen.h │ │ ├── eglfswaylandwindow.cpp │ │ ├── eglfswaylandwindow.h │ │ ├── main.cpp │ │ ├── stateguard.h │ │ └── wayland.json │ └── x11 │ │ ├── CMakeLists.txt │ │ ├── eglfsx11integration.cpp │ │ ├── eglfsx11integration.h │ │ ├── main.cpp │ │ └── x11.json └── extensions │ ├── CMakeLists.txt │ ├── plasma │ ├── CMakeLists.txt │ ├── plasmaeffects.cpp │ ├── plasmaeffects.h │ ├── plasmashell.cpp │ ├── plasmashell.h │ ├── plasmasurface.cpp │ ├── plasmasurface.h │ └── plugin.cpp │ └── xwayland │ ├── CMakeLists.txt │ ├── sigwatch.cpp │ ├── sigwatch.h │ ├── sizehints.h │ ├── xcbatom.cpp │ ├── xcbatom.h │ ├── xcbatoms.cpp │ ├── xcbatoms.h │ ├── xcbcursors.cpp │ ├── xcbcursors.h │ ├── xcbproperties.cpp │ ├── xcbproperties.h │ ├── xcbresources.cpp │ ├── xcbresources.h │ ├── xcbwindow.cpp │ ├── xcbwindow.h │ ├── xcbwrapper.cpp │ ├── xcbwrapper.h │ ├── xwayland.cpp │ ├── xwayland.h │ ├── xwaylandmanager.cpp │ ├── xwaylandmanager.h │ ├── xwaylandplugin.cpp │ ├── xwaylandplugin.h │ ├── xwaylandserver.cpp │ ├── xwaylandserver.h │ ├── xwaylandsurface.cpp │ ├── xwaylandsurface.h │ ├── xwaylandwindow.cpp │ └── xwaylandwindow.h ├── qpa ├── CMakeLists.txt ├── greenisland.json └── main.cpp ├── shells ├── CMakeLists.txt └── simple │ ├── Compositor.qml │ ├── ScreenView.qml │ ├── images │ └── wallpaper.png │ ├── metadata.desktop │ └── overlays │ └── UnresponsiveOverlay.qml ├── src ├── CMakeLists.txt ├── GreenIslandConfig.cmake.in ├── client │ ├── CMakeLists.txt │ ├── GreenIslandClientConfig.cmake.in │ ├── buffer.cpp │ ├── buffer.h │ ├── buffer_p.h │ ├── clientconnection.cpp │ ├── clientconnection.h │ ├── clientconnection_p.h │ ├── compositor.cpp │ ├── compositor.h │ ├── compositor_p.h │ ├── cursortheme.cpp │ ├── cursortheme.h │ ├── cursortheme_p.h │ ├── fullscreenshell.cpp │ ├── fullscreenshell.h │ ├── fullscreenshell_p.h │ ├── keyboard.cpp │ ├── keyboard.h │ ├── keyboard_p.h │ ├── output.cpp │ ├── output.h │ ├── output_p.h │ ├── outputconfiguration.cpp │ ├── outputconfiguration.h │ ├── outputconfiguration_p.h │ ├── outputmanagement.cpp │ ├── outputmanagement.h │ ├── outputmanagement_p.h │ ├── pointer.cpp │ ├── pointer.h │ ├── pointer_p.h │ ├── region.cpp │ ├── region.h │ ├── region_p.h │ ├── registry.cpp │ ├── registry.h │ ├── registry_p.h │ ├── screencaster.cpp │ ├── screencaster.h │ ├── screencaster_p.h │ ├── screenshooter.cpp │ ├── screenshooter.h │ ├── screenshooter_p.h │ ├── seat.cpp │ ├── seat.h │ ├── seat_p.h │ ├── shm.cpp │ ├── shm.h │ ├── shm_p.h │ ├── shmformats_p.cpp │ ├── shmformats_p.h │ ├── shmpool.cpp │ ├── shmpool.h │ ├── shmpool_p.h │ ├── surface.cpp │ ├── surface.h │ ├── surface_p.h │ ├── touch.cpp │ ├── touch.h │ └── touch_p.h ├── hardwareintegration │ ├── CMakeLists.txt │ ├── brcm-egl │ │ ├── CMakeLists.txt │ │ ├── brcm-egl.json │ │ ├── brcmbuffer.cpp │ │ ├── brcmbuffer.h │ │ ├── brcmeglintegration.cpp │ │ ├── brcmeglintegration.h │ │ └── main.cpp │ ├── drm-egl-server │ │ ├── drm-egl-server.json │ │ ├── drm-egl-server.pri │ │ ├── drmeglserverbufferintegration.cpp │ │ ├── drmeglserverbufferintegration.h │ │ └── main.cpp │ ├── libhybris-egl-server │ │ ├── libhybris-egl-server.json │ │ ├── libhybris-egl-server.pri │ │ ├── libhybriseglserverbufferintegration.cpp │ │ ├── libhybriseglserverbufferintegration.h │ │ └── main.cpp │ ├── wayland-egl │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── wayland-egl.json │ │ ├── waylandeglclientbufferintegration.cpp │ │ └── waylandeglclientbufferintegration.h │ ├── xcomposite-egl │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── xcomposite-egl.json │ │ ├── xcompositeeglintegration.cpp │ │ └── xcompositeeglintegration.h │ ├── xcomposite-glx │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── xcomposite-glx.json │ │ ├── xcompositeglxintegration.cpp │ │ └── xcompositeglxintegration.h │ └── xcomposite_share │ │ ├── CMakeLists.txt │ │ ├── xcompositebuffer.cpp │ │ ├── xcompositebuffer.h │ │ ├── xcompositehandler.cpp │ │ ├── xcompositehandler.h │ │ └── xlibinclude.h ├── platform │ ├── CMakeLists.txt │ ├── GreenIslandPlatformConfig.cmake.in │ ├── deviceintegration │ │ ├── cursor-atlas.png │ │ ├── cursor.json │ │ ├── cursor.qrc │ │ ├── deviceintegration_p.cpp │ │ ├── deviceintegration_p.h │ │ ├── egldeviceintegration.cpp │ │ ├── egldeviceintegration.h │ │ ├── eglfscontext.cpp │ │ ├── eglfscontext.h │ │ ├── eglfscursor.cpp │ │ ├── eglfscursor.h │ │ ├── eglfsintegration.cpp │ │ ├── eglfsintegration.h │ │ ├── eglfsnativeinterface.cpp │ │ ├── eglfsnativeinterface.h │ │ ├── eglfsoffscreenwindow.cpp │ │ ├── eglfsoffscreenwindow.h │ │ ├── eglfsscreen.cpp │ │ ├── eglfsscreen.h │ │ ├── eglfswindow.cpp │ │ ├── eglfswindow.h │ │ ├── eglfsxkb.cpp │ │ └── eglfsxkb.h │ ├── eglconvenience │ │ ├── eglconvenience.cpp │ │ ├── eglconvenience.h │ │ ├── eglpbuffer.cpp │ │ ├── eglpbuffer.h │ │ ├── eglplatformcontext.cpp │ │ ├── eglplatformcontext.h │ │ ├── eglstreamconvenience.cpp │ │ └── eglstreamconvenience.h │ ├── libinput │ │ ├── libinputgesture.cpp │ │ ├── libinputgesture.h │ │ ├── libinputhandler.cpp │ │ ├── libinputhandler.h │ │ ├── libinputhandler_p.h │ │ ├── libinputkeyboard.cpp │ │ ├── libinputkeyboard.h │ │ ├── libinputmanager_p.cpp │ │ ├── libinputmanager_p.h │ │ ├── libinputpointer.cpp │ │ ├── libinputpointer.h │ │ ├── libinputtouch.cpp │ │ └── libinputtouch.h │ ├── logging.cpp │ ├── logging.h │ ├── logind │ │ ├── logind.cpp │ │ ├── logind.h │ │ ├── vthandler.cpp │ │ └── vthandler.h │ ├── platformcompositor │ │ ├── openglcompositor.cpp │ │ ├── openglcompositor.h │ │ ├── openglcompositorbackingstore.cpp │ │ └── openglcompositorbackingstore.h │ └── udev │ │ ├── udev.cpp │ │ ├── udev.h │ │ ├── udev_p.h │ │ ├── udevdevice.cpp │ │ ├── udevdevice.h │ │ ├── udevenumerate.cpp │ │ ├── udevenumerate.h │ │ ├── udevmonitor.cpp │ │ └── udevmonitor.h ├── server │ ├── CMakeLists.txt │ ├── GreenIslandServerConfig.cmake.in │ ├── GreenIslandServerConfigExtras.cmake │ ├── GreenIslandServerConfigExtrasLocal.cmake │ ├── GreenIslandServerMacros.cmake │ ├── core │ │ ├── abstractplugin.cpp │ │ ├── abstractplugin.h │ │ ├── compositorsettings.cpp │ │ ├── compositorsettings.h │ │ ├── compositorsettings_p.h │ │ ├── diagnostic_p.cpp │ │ ├── diagnostic_p.h │ │ ├── homeapplication.cpp │ │ ├── homeapplication.h │ │ ├── homeapplication_p.h │ │ ├── quickoutput.cpp │ │ └── quickoutput.h │ ├── extensions │ │ ├── applicationmanager.cpp │ │ ├── applicationmanager.h │ │ ├── applicationmanager_p.h │ │ ├── gtkshell.cpp │ │ ├── gtkshell.h │ │ ├── gtkshell_p.h │ │ ├── screencaster.cpp │ │ ├── screencaster.h │ │ ├── screencaster_p.h │ │ ├── screenshooter.cpp │ │ ├── screenshooter.h │ │ ├── screenshooter_p.h │ │ ├── taskmanager.cpp │ │ ├── taskmanager.h │ │ └── taskmanager_p.h │ ├── input │ │ ├── keymap.cpp │ │ ├── keymap.h │ │ └── keymap_p.h │ ├── output │ │ ├── outputchangeset.cpp │ │ ├── outputchangeset.h │ │ ├── outputchangeset_p.h │ │ ├── outputconfiguration.cpp │ │ ├── outputconfiguration.h │ │ ├── outputconfiguration_p.h │ │ ├── outputmanagement.cpp │ │ ├── outputmanagement.h │ │ ├── outputmanagement_p.h │ │ ├── quickoutputconfiguration.cpp │ │ ├── quickoutputconfiguration.h │ │ └── quickoutputconfiguration_p.h │ ├── screen │ │ ├── fakescreenbackend.cpp │ │ ├── fakescreenbackend.h │ │ ├── nativescreenbackend.cpp │ │ ├── nativescreenbackend.h │ │ ├── quickscreenmanager.cpp │ │ ├── quickscreenmanager.h │ │ ├── screenbackend.cpp │ │ ├── screenbackend.h │ │ ├── screenbackend_p.h │ │ ├── screenmanager.cpp │ │ ├── screenmanager.h │ │ └── screenmanager_p.h │ ├── serverlogging_p.cpp │ ├── serverlogging_p.h │ └── shell │ │ ├── clientwindow.cpp │ │ ├── clientwindow.h │ │ ├── clientwindow_p.h │ │ ├── clientwindowquickitem.cpp │ │ ├── clientwindowquickitem.h │ │ └── clientwindowquickitem_p.h └── waylandcompositor │ ├── CMakeLists.txt │ ├── GreenIslandCompositorConfig.cmake.in │ ├── compositor_api │ ├── qwaylandbufferref.cpp │ ├── qwaylandbufferref.h │ ├── qwaylandclient.cpp │ ├── qwaylandclient.h │ ├── qwaylandcompositor.cpp │ ├── qwaylandcompositor.h │ ├── qwaylandcompositor_p.h │ ├── qwaylanddestroylistener.cpp │ ├── qwaylanddestroylistener.h │ ├── qwaylanddestroylistener_p.h │ ├── qwaylanddrag.cpp │ ├── qwaylanddrag.h │ ├── qwaylandinputmethodcontrol.cpp │ ├── qwaylandinputmethodcontrol.h │ ├── qwaylandinputmethodcontrol_p.h │ ├── qwaylandkeyboard.cpp │ ├── qwaylandkeyboard.h │ ├── qwaylandkeyboard_p.h │ ├── qwaylandoutput.cpp │ ├── qwaylandoutput.h │ ├── qwaylandoutput_p.h │ ├── qwaylandpointer.cpp │ ├── qwaylandpointer.h │ ├── qwaylandpointer_p.h │ ├── qwaylandquickcompositor.cpp │ ├── qwaylandquickcompositor.h │ ├── qwaylandquickitem.cpp │ ├── qwaylandquickitem.h │ ├── qwaylandquickitem_p.h │ ├── qwaylandquickoutput.cpp │ ├── qwaylandquickoutput.h │ ├── qwaylandquicksurface.cpp │ ├── qwaylandquicksurface.h │ ├── qwaylandresource.cpp │ ├── qwaylandresource.h │ ├── qwaylandseat.cpp │ ├── qwaylandseat.h │ ├── qwaylandseat_p.h │ ├── qwaylandsurface.cpp │ ├── qwaylandsurface.h │ ├── qwaylandsurface_p.h │ ├── qwaylandsurfacegrabber.cpp │ ├── qwaylandsurfacegrabber.h │ ├── qwaylandtouch.cpp │ ├── qwaylandtouch.h │ ├── qwaylandtouch_p.h │ ├── qwaylandview.cpp │ ├── qwaylandview.h │ └── qwaylandview_p.h │ ├── extensions │ ├── qwaylandqtwindowmanager.cpp │ ├── qwaylandqtwindowmanager.h │ ├── qwaylandqtwindowmanager_p.h │ ├── qwaylandquickshellsurfaceitem.cpp │ ├── qwaylandquickshellsurfaceitem.h │ ├── qwaylandquickshellsurfaceitem_p.h │ ├── qwaylandshell.cpp │ ├── qwaylandshell.h │ ├── qwaylandshell_p.h │ ├── qwaylandshellsurface.cpp │ ├── qwaylandshellsurface.h │ ├── qwaylandshellsurface_p.h │ ├── qwaylandtextinput.cpp │ ├── qwaylandtextinput.h │ ├── qwaylandtextinput_p.h │ ├── qwaylandtextinputmanager.cpp │ ├── qwaylandtextinputmanager.h │ ├── qwaylandtextinputmanager_p.h │ ├── qwaylandwlshell.cpp │ ├── qwaylandwlshell.h │ ├── qwaylandwlshell_p.h │ ├── qwaylandwlshellintegration.cpp │ ├── qwaylandwlshellintegration_p.h │ ├── qwaylandxdgshell.cpp │ ├── qwaylandxdgshell.h │ ├── qwaylandxdgshell_p.h │ ├── qwaylandxdgshellintegration.cpp │ ├── qwaylandxdgshellintegration_p.h │ ├── qwlextendedsurface.cpp │ ├── qwlextendedsurface_p.h │ ├── qwlqtkey.cpp │ ├── qwlqtkey_p.h │ ├── qwlqttouch.cpp │ └── qwlqttouch_p.h │ ├── global │ ├── qwaylandcompositorextension.cpp │ ├── qwaylandcompositorextension.h │ ├── qwaylandcompositorextension_p.h │ ├── qwaylandexport.h │ └── qwaylandquickextension.h │ ├── hardware_integration │ ├── qwlclientbufferintegration.cpp │ ├── qwlclientbufferintegration_p.h │ ├── qwlclientbufferintegrationfactory.cpp │ ├── qwlclientbufferintegrationfactory_p.h │ ├── qwlclientbufferintegrationplugin.cpp │ ├── qwlclientbufferintegrationplugin_p.h │ ├── qwlhwintegration.cpp │ ├── qwlhwintegration_p.h │ ├── qwlserverbufferintegration.cpp │ ├── qwlserverbufferintegration_p.h │ ├── qwlserverbufferintegrationfactory.cpp │ ├── qwlserverbufferintegrationfactory_p.h │ ├── qwlserverbufferintegrationplugin.cpp │ └── qwlserverbufferintegrationplugin_p.h │ ├── shaders │ ├── surface.vert │ ├── surface_oes_external.frag │ ├── surface_rgba.frag │ ├── surface_rgbx.frag │ ├── surface_y_u_v.frag │ ├── surface_y_uv.frag │ └── surface_y_xuxv.frag │ ├── shared │ ├── qwaylandinputmethodeventbuilder.cpp │ ├── qwaylandinputmethodeventbuilder_p.h │ ├── qwaylandmimehelper.cpp │ ├── qwaylandmimehelper_p.h │ ├── qwaylandsharedmemoryformathelper_p.h │ ├── qwaylandshmformathelper_p.h │ ├── qwaylandxkb.cpp │ └── qwaylandxkb_p.h │ └── wayland_wrapper │ ├── qwldatadevice.cpp │ ├── qwldatadevice_p.h │ ├── qwldatadevicemanager.cpp │ ├── qwldatadevicemanager_p.h │ ├── qwldataoffer.cpp │ ├── qwldataoffer_p.h │ ├── qwldatasource.cpp │ ├── qwldatasource_p.h │ ├── qwlregion.cpp │ ├── qwlregion_p.h │ ├── qwlsurfacebuffer.cpp │ └── qwlsurfacebuffer_p.h ├── tests ├── CMakeLists.txt ├── auto │ ├── CMakeLists.txt │ ├── client │ │ ├── CMakeLists.txt │ │ ├── tst_display.cpp │ │ ├── tst_output.cpp │ │ ├── tst_registry.cpp │ │ └── tst_shmpool.cpp │ └── platform │ │ ├── CMakeLists.txt │ │ ├── fakelogind.cpp │ │ ├── fakelogind.h │ │ ├── tst_logind.cpp │ │ └── tst_udev.cpp └── manual │ ├── CMakeLists.txt │ ├── platform │ ├── CMakeLists.txt │ └── tst_libinput.cpp │ └── shells │ └── xdg-shell │ ├── XdgPopupChrome.qml │ ├── XdgSurfaceChrome.qml │ └── main.qml └── tools ├── CMakeLists.txt ├── screencaster ├── CMakeLists.txt ├── application.cpp ├── application.h ├── main.cpp ├── recorder.cpp └── recorder.h └── waylandscanner ├── CMakeLists.txt └── waylandscanner.cpp /.travis/PKGBUILD.in: -------------------------------------------------------------------------------- 1 | # Maintainer: Pier Luigi Fiorini 2 | 3 | pkgname=greenisland-git 4 | pkgver=@PKGVER@ 5 | pkgrel=1 6 | pkgdesc="Green Island: Qt-based compositor infrastructure for Wayland" 7 | arch=('i686' 'x86_64' 'armv6h' 'armv7h') 8 | url='http://hawaiios.org' 9 | license=('GPL2' 'GPL3' 'LGPL3') 10 | depends=('systemd' 'wayland-protocols' 'libdrm' 'libinput' 'qt5-declarative' 11 | 'xkeyboard-config' 'libxkbcommon' 'fontconfig' 'freetype2') 12 | provides=('greenisland') 13 | conflicts=('greenisland') 14 | replaces=('greenisland') 15 | makedepends=('git' 'extra-cmake-modules' 'xcb-util-cursor' 'libxcursor') 16 | 17 | _gitroot="git://github.com/greenisland/greenisland.git" 18 | _gitbranch=@GITBRANCH@ 19 | _gitname=greenisland 20 | source=(${_gitname}::${_gitroot}#branch=${_gitbranch}) 21 | md5sums=('SKIP') 22 | 23 | pkgver() { 24 | cd ${srcdir}/${_gitname} 25 | echo "$(git log -1 --format="%cd" --date=short | tr -d '-').$(git log -1 --format="%h")" 26 | } 27 | 28 | prepare() { 29 | mkdir build 30 | } 31 | 32 | build() { 33 | cd build 34 | cmake ../${_gitname} \ 35 | -DCMAKE_INSTALL_PREFIX=/usr \ 36 | -DLIB_INSTALL_DIR=lib \ 37 | -DLIBEXEC_INSTALL_DIR=lib \ 38 | -DQML_INSTALL_DIR=lib/qt/qml \ 39 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ 40 | -DCMAKE_BUILD_TYPE=RelWithDebInfo 41 | make 42 | } 43 | 44 | package() { 45 | cd build 46 | make DESTDIR="${pkgdir}" install 47 | } 48 | -------------------------------------------------------------------------------- /.travis/bintray.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "greenisland", 4 | "repo": "archlinux-@GITBRANCH@", 5 | "subject": "greenisland", 6 | "desc": "QtQuick Wayland compositor and shell for desktop and mobile", 7 | "website_url": "http://hawaiios.org", 8 | "issue_tracker_url": "https://github.com/greenisland/greenisland", 9 | "vcs_url": "https://github.com/greenisland/greenisland", 10 | "licenses": ["GPL-3.0"], 11 | "labels": ["qt", "qtquick", "qml", "wayland"] 12 | }, 13 | "version": { 14 | "name": "@PKGVER@", 15 | "desc": "Arch Linux build from CI", 16 | "released": "@TODAY@", 17 | "vcs_tag": "@GITREV@", 18 | "attributes": [ 19 | {"name": "gitrevision", "values": ["@GITREV@"], "type": "string"}, 20 | {"name": "gitdate", "values": ["@GITDATE@"], "type": "date"} 21 | ], 22 | "gpgSign": false 23 | }, 24 | "files": [ 25 | {"includePattern": "cibuild/(greenisland-git-.*.pkg.tar.xz)", "uploadPattern": "@ARCH@/$1", "matrixParams": {"override": 1}}, 26 | {"includePattern": "cibuild/(greenisland.db.tar.gz)", "uploadPattern": "@ARCH@/greenisland.db", "matrixParams": {"override": 1}} 27 | ], 28 | "publish": true 29 | } 30 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | Green Island 2 | ============ 3 | 4 | # Authors 5 | 6 | * Pier Luigi Fiorini 7 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | Green Island 2 | ============ 3 | 4 | This is the list of contributors to this project. 5 | 6 | Names are sorted by number of commits at time of this writing. 7 | Commit data generated by: 8 | 9 | ```sh 10 | git shortlog -s -e -n 11 | ``` 12 | 13 | Commit counts have ben removed, since they change pretty frequently. 14 | 15 | * Pier Luigi Fiorini 16 | * Andreas Müller 17 | * n3rdopolis 18 | * Andy Nichols 19 | * Adam Zahran 20 | * Chris Leach 21 | * Michael Spencer 22 | * Sebastian Kügler 23 | -------------------------------------------------------------------------------- /cmake/COPYING-CMAKE-SCRIPTS: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions 3 | are met: 4 | 5 | 1. Redistributions of source code must retain the copyright 6 | notice, this list of conditions and the following disclaimer. 7 | 2. Redistributions in binary form must reproduce the copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 3. The name of the author may not be used to endorse or promote products 11 | derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /cmake/CheckFileExists.cmake: -------------------------------------------------------------------------------- 1 | #============================================================================= 2 | # Copyright (C) 2012-2013 Pier Luigi Fiorini 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | # * Neither the name of Pier Luigi Fiorini nor the names of his 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | #============================================================================= 32 | 33 | macro(CHECK_FILE_EXISTS INCLUDE VARIABLE) 34 | if(EXISTS ${INCLUDE}) 35 | message(STATUS "Looking for ${INCLUDE} - found") 36 | set(${VARIABLE}_FOUND 1 CACHE INTERNAL "Have file ${INCLUDE}") 37 | else() 38 | message(STATUS "Looking for ${INCLUDE} - not found") 39 | set(${VARIABLE}_FOUND 0 CACHE INTERNAL "Have file ${INCLUDE}") 40 | endif() 41 | endmacro() 42 | -------------------------------------------------------------------------------- /cmake/FindFontconfig.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the Fontconfig 2 | # Once done this will define 3 | # 4 | # FONTCONFIG_FOUND - system has Fontconfig 5 | # FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers 6 | # FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG 7 | # FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG 8 | 9 | # Copyright (c) 2006,2007 Laurent Montel, 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | 15 | if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) 16 | 17 | # in cache already 18 | set(FONTCONFIG_FOUND TRUE) 19 | 20 | else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) 21 | 22 | if (NOT WIN32) 23 | # use pkg-config to get the directories and then use these values 24 | # in the FIND_PATH() and FIND_LIBRARY() calls 25 | find_package(PkgConfig) 26 | pkg_check_modules(PC_FONTCONFIG QUIET fontconfig) 27 | 28 | set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) 29 | endif (NOT WIN32) 30 | 31 | find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h 32 | PATHS 33 | ${PC_FONTCONFIG_INCLUDEDIR} 34 | ${PC_FONTCONFIG_INCLUDE_DIRS} 35 | /usr/X11/include 36 | ) 37 | 38 | find_library(FONTCONFIG_LIBRARIES NAMES fontconfig 39 | PATHS 40 | ${PC_FONTCONFIG_LIBDIR} 41 | ${PC_FONTCONFIG_LIBRARY_DIRS} 42 | ) 43 | 44 | include(FindPackageHandleStandardArgs) 45 | find_package_handle_standard_args(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR ) 46 | 47 | mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) 48 | 49 | endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) 50 | 51 | -------------------------------------------------------------------------------- /cmake/FindOpenGLES.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find OpenGLES 2 | # Once done this will define 3 | # 4 | # OPENGLES_FOUND - system has OpenGLES and EGL 5 | # OPENGL_EGL_FOUND - system has EGL 6 | # OPENGLES_INCLUDE_DIR - the GLES include directory 7 | # OPENGLES_LIBRARY - the GLES library 8 | # OPENGLES_EGL_INCLUDE_DIR - the EGL include directory 9 | # OPENGLES_EGL_LIBRARY - the EGL library 10 | # OPENGLES_LIBRARIES - all libraries needed for OpenGLES 11 | # OPENGLES_INCLUDES - all includes needed for OpenGLES 12 | 13 | FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h 14 | /usr/openwin/share/include 15 | /opt/graphics/OpenGL/include /usr/X11R6/include 16 | /usr/include 17 | ) 18 | 19 | FIND_LIBRARY(OPENGLES_LIBRARY 20 | NAMES GLESv2 21 | PATHS /opt/graphics/OpenGL/lib 22 | /usr/openwin/lib 23 | /usr/shlib /usr/X11R6/lib 24 | /usr/lib 25 | ) 26 | 27 | FIND_PATH(OPENGLES_EGL_INCLUDE_DIR EGL/egl.h 28 | /usr/openwin/share/include 29 | /opt/graphics/OpenGL/include /usr/X11R6/include 30 | /usr/include 31 | ) 32 | 33 | FIND_LIBRARY(OPENGLES_EGL_LIBRARY 34 | NAMES EGL 35 | PATHS /usr/shlib /usr/X11R6/lib 36 | /usr/lib 37 | ) 38 | 39 | SET(OPENGL_EGL_FOUND "NO") 40 | IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) 41 | SET(OPENGL_EGL_FOUND "YES") 42 | ENDIF() 43 | 44 | SET(OPENGLES_FOUND "NO") 45 | IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND 46 | OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) 47 | SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES} 48 | ${OPENGLES_EGL_LIBRARY}) 49 | SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR}) 50 | SET(OPENGLES_FOUND "YES") 51 | ENDIF() 52 | 53 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 9 | if(EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 11 | OUTPUT VARIABLE rm_out RETURN_VALUE rm_retval) 12 | if(NOT "${rm_retval}" STREQUAL 0) 13 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 14 | endif(NOT "${rm_retval}" STREQUAL 0) 15 | else(EXISTS "$ENV{DESTDIR}${file}") 16 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 17 | endif(EXISTS "$ENV{DESTDIR}${file}") 18 | endforeach(file ${files}) 19 | -------------------------------------------------------------------------------- /compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../headers/GreenIsland" 4 | ) 5 | 6 | set(SOURCES 7 | main.cpp 8 | ) 9 | 10 | add_executable(greenisland ${SOURCES}) 11 | target_link_libraries(greenisland 12 | PUBLIC 13 | Qt5::Core 14 | Qt5::Gui 15 | Qt5::Qml 16 | GreenIsland::Server 17 | ) 18 | 19 | if(systemd_FOUND) 20 | target_link_libraries(greenisland PRIVATE ${systemd_LIBRARIES}) 21 | endif() 22 | 23 | install(TARGETS greenisland DESTINATION ${BIN_INSTALL_DIR}) 24 | -------------------------------------------------------------------------------- /compositor/translations/af.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/ar.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/ast.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/ast_ES.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Compositor Wayland pal entornu d'escritoriu Hawaii 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | segs 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/bg.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/cs_CZ.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Sazeč Wayland pro pracovní prostředí Hawaii 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | Vytvořit dotek pro nezpracované události myši 11 | 12 | 13 | Full screen compositor window 14 | Okno sazeče na celou obrazovku 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | Doba nečinnosti v sekundách (alespoň 5 sekund) 19 | 20 | 21 | secs 22 | s 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/da_DK.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/de.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/el.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/es.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Compositor Waylando para el entorno de escritorio Hawaii 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | Compositor de ventanas a pantalla completa 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | Tiempo de espera en segundos (al menos 5 segundos) 19 | 20 | 21 | secs 22 | Segundos 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/es_AR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/fa_IR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/fr.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Compositeur Wayland pour l'environnement de bureau Hawaii 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | Synthétiser une touche pour les évènements de souris non gérés 11 | 12 | 13 | Full screen compositor window 14 | Compositeur de fenêtre plein écran 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | Temps d'inactivité en secondes (au moins 5 secondes) 19 | 20 | 21 | secs 22 | secondes 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/hi.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/hr_HR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/hu.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Wayland kompozitor a Hawaii asztali környezet számra 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | Teljes képernyős kompozitor ablak 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | Tétlenségi idő másodpercben (legalább 5) 19 | 20 | 21 | secs 22 | mp 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/id.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/it.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/it_IT.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/ja_JP.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/kk.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/nl.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/nl_NL.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/no.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/pam.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/pl.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/pt.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/pt_BR.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/ru.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/si_LK.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/sk.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | Wayland kompozitor pre pracovné prostredie Hawaii 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | Vytvoriť dotyk pre nespracované udalosti myši 11 | 12 | 13 | Full screen compositor window 14 | Okno kompozitora na celú obrazovku 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | Doba nečinnosti v sekundách (aspoň 5 sekúnd) 19 | 20 | 21 | secs 22 | sek. 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/template.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Command line arguments 6 | 7 | Wayland compositor for the Hawaii desktop environment 8 | 9 | 10 | 11 | Synthesize touch for unhandled mouse events 12 | 13 | 14 | 15 | Full screen compositor window 16 | 17 | 18 | 19 | Idle time in seconds (at least 5 seconds) 20 | 21 | 22 | 23 | secs 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /compositor/translations/tr.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | lupdate -no-obsolete -locations none .. -ts template.ts 3 | -------------------------------------------------------------------------------- /compositor/translations/vi.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /compositor/translations/zh_CN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | Command line arguments 4 | 5 | Wayland compositor for the Hawaii desktop environment 6 | 7 | 8 | 9 | Synthesize touch for unhandled mouse events 10 | 11 | 12 | 13 | Full screen compositor window 14 | 15 | 16 | 17 | Idle time in seconds (at least 5 seconds) 18 | 19 | 20 | 21 | secs 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /data/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(screen) 2 | -------------------------------------------------------------------------------- /data/protocols/gtk/gtk-shell.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | gtk_shell is a protocol extension providing additional features for 6 | clients implementing it. It is not backward compatible, and a client must 7 | always only bind to the specific version it implements. If a client binds 8 | to a version different from the version the server provides, an error will 9 | be raised. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /data/screen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(FILES 2 | four-960x540.json 3 | fullhd-hidpi.json 4 | one-1024x768.json 5 | one-1920x1080.json 6 | one-960x540.json 7 | phone-1080x1920.json 8 | phone-720x1280.json 9 | rotation-inverted.json 10 | rotation-left.json 11 | rotation-right.json 12 | tablet-2048x1536.json 13 | two-1024x768.json 14 | two-rotated.json 15 | two-uneven.json 16 | ) 17 | 18 | install(FILES ${FILES} DESTINATION ${DATA_INSTALL_DIR}/greenisland/screen-data) 19 | -------------------------------------------------------------------------------- /data/screen/four-960x540.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 540, 8 | "width": 960 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | }, 18 | { 19 | "mode": { 20 | "refreshRate": 60000, 21 | "size": { 22 | "height": 540, 23 | "width": 960 24 | } 25 | }, 26 | "name": "Fake2", 27 | "orientation": 2, 28 | "position": { 29 | "x": 960, 30 | "y": 0 31 | } 32 | }, 33 | { 34 | "mode": { 35 | "refreshRate": 60000, 36 | "size": { 37 | "height": 540, 38 | "width": 960 39 | } 40 | }, 41 | "name": "Fake3", 42 | "orientation": 2, 43 | "position": { 44 | "x": 0, 45 | "y": 540 46 | } 47 | }, 48 | { 49 | "mode": { 50 | "refreshRate": 60000, 51 | "size": { 52 | "height": 540, 53 | "width": 960 54 | } 55 | }, 56 | "name": "Fake4", 57 | "orientation": 2, 58 | "position": { 59 | "x": 960, 60 | "y": 540 61 | } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /data/screen/fullhd-hidpi.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 540, 8 | "width": 960 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | }, 17 | "scale": 2 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /data/screen/one-1024x768.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/one-1920x1080.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 1080, 8 | "width": 1920 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/one-960x540.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 540, 8 | "width": 960 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/phone-1080x1920.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 1920, 8 | "width": 1080 9 | } 10 | }, 11 | "name": "Phone", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/phone-720x1280.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 1280, 8 | "width": 720 9 | } 10 | }, 11 | "name": "Phone", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/rotation-inverted.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 8, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/rotation-left.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake", 12 | "orientation": 1, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/rotation-right.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 4, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /data/screen/tablet-2048x1536.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 1536, 8 | "width": 2048 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "physicalSize": { 14 | "height": "14780", 15 | "width": "19710" 16 | }, 17 | "position": { 18 | "x": 0, 19 | "y": 0 20 | }, 21 | "scale": 2 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /data/screen/two-1024x768.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | }, 18 | { 19 | "mode": { 20 | "refreshRate": 60000, 21 | "size": { 22 | "height": 768, 23 | "width": 1024 24 | } 25 | }, 26 | "name": "Fake2", 27 | "orientation": 2, 28 | "primary": true, 29 | "position": { 30 | "x": 1024, 31 | "y": 0 32 | } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /data/screen/two-rotated.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 768, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | }, 18 | { 19 | "mode": { 20 | "refreshRate": 60000, 21 | "size": { 22 | "height": 768, 23 | "width": 1024 24 | } 25 | }, 26 | "name": "Fake2", 27 | "orientation": 8, 28 | "position": { 29 | "x": 1024, 30 | "y": 0 31 | } 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /data/screen/two-uneven.json: -------------------------------------------------------------------------------- 1 | { 2 | "outputs": [ 3 | { 4 | "mode": { 5 | "refreshRate": 60000, 6 | "size": { 7 | "height": 640, 8 | "width": 1024 9 | } 10 | }, 11 | "name": "Fake1", 12 | "orientation": 2, 13 | "position": { 14 | "x": 0, 15 | "y": 0 16 | } 17 | }, 18 | { 19 | "mode": { 20 | "refreshRate": 60000, 21 | "size": { 22 | "height": 768, 23 | "width": 1024 24 | } 25 | }, 26 | "name": "Fake2", 27 | "orientation": 2, 28 | "position": { 29 | "x": 1024, 30 | "y": 0 31 | } 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /declarative/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(compositor) 2 | if(ENABLE_XWAYLAND) 3 | add_subdirectory(xwayland) 4 | endif() 5 | -------------------------------------------------------------------------------- /declarative/compositor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Qt5Gui REQUIRED COMPONENTS Private) 2 | find_package(Qt5Qml REQUIRED COMPONENTS Private) 3 | find_package(Qt5Quick REQUIRED COMPONENTS Private) 4 | 5 | # Qt 5.5.x doesn't define Qt5Qml and Qt5Quick private 6 | # include directories, so we have to fix it 7 | foreach(_mod Qml Quick) 8 | foreach(_dir ${Qt5${_mod}_INCLUDE_DIRS}) 9 | set(_path "${_dir}/Qt${_mod}/${Qt5${_mod}_VERSION_STRING}") 10 | if(EXISTS ${_path}) 11 | list(APPEND Qt5${_mod}_PRIVATE_INCLUDE_DIRS ${_path}) 12 | endif() 13 | 14 | set(_path "${_dir}/Qt${_mod}/${Qt5${_mod}_VERSION_STRING}/Qt${_mod}") 15 | if(EXISTS ${_path}) 16 | list(APPEND Qt5${_mod}_PRIVATE_INCLUDE_DIRS ${_path}) 17 | endif() 18 | endforeach() 19 | endforeach() 20 | 21 | include_directories( 22 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 23 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers/GreenIsland" 24 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 25 | ${Qt5Qml_PRIVATE_INCLUDE_DIRS} 26 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} 27 | ) 28 | 29 | set(SOURCES 30 | plugin.cpp 31 | fpscounter.cpp 32 | keyeventfilter.cpp 33 | qwaylandmousetracker.cpp 34 | ) 35 | 36 | add_library(greenislandplugin SHARED ${SOURCES}) 37 | target_link_libraries(greenislandplugin 38 | Qt5::Qml 39 | Qt5::Quick 40 | GreenIsland::Compositor 41 | GreenIsland::Server 42 | ) 43 | 44 | install(TARGETS greenislandplugin LIBRARY 45 | DESTINATION ${QML_INSTALL_DIR}/GreenIsland) 46 | 47 | set(MODULE_FILES 48 | qmldir 49 | WaylandCursorItem.qml 50 | WaylandOutputWindow.qml 51 | WindowChrome.qml 52 | ) 53 | install(FILES ${MODULE_FILES} 54 | DESTINATION ${QML_INSTALL_DIR}/GreenIsland) 55 | -------------------------------------------------------------------------------- /declarative/compositor/fpscounter.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef FPSCOUNTER_H 29 | #define FPSCOUNTER_H 30 | 31 | #include 32 | #include 33 | 34 | class FpsCounter : public QQuickItem 35 | { 36 | Q_OBJECT 37 | Q_PROPERTY(unsigned int fps READ fps NOTIFY fpsChanged) 38 | public: 39 | explicit FpsCounter(QQuickItem *parent = 0); 40 | 41 | unsigned int fps() const; 42 | 43 | Q_SIGNALS: 44 | void fpsChanged(); 45 | 46 | private Q_SLOTS: 47 | void setup(); 48 | void frameSwapped(); 49 | void updateFps(); 50 | 51 | private: 52 | unsigned int m_counter; 53 | unsigned int m_fps; 54 | QTimer m_timer; 55 | }; 56 | 57 | #endif // FPSCOUNTER_H 58 | -------------------------------------------------------------------------------- /declarative/compositor/keyeventfilter.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2014-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef KEYEVENTFILTER_H 29 | #define KEYEVENTFILTER_H 30 | 31 | #include 32 | #include 33 | 34 | class KeyEventFilter : public QQuickItem 35 | { 36 | Q_OBJECT 37 | public: 38 | KeyEventFilter(QQuickItem *parent = Q_NULLPTR); 39 | 40 | protected: 41 | bool eventFilter(QObject *, QEvent *); 42 | 43 | private: 44 | QPointer m_window; 45 | }; 46 | 47 | #endif // KEYEVENTFILTER_H 48 | -------------------------------------------------------------------------------- /declarative/compositor/qmldir: -------------------------------------------------------------------------------- 1 | module GreenIsland 2 | plugin greenislandplugin 3 | WaylandCursorItem 1.0 WaylandCursorItem.qml 4 | WaylandOutputWindow 1.0 WaylandOutputWindow.qml 5 | WindowChrome 1.0 WindowChrome.qml 6 | -------------------------------------------------------------------------------- /declarative/xwayland/qmldir: -------------------------------------------------------------------------------- 1 | module GreenIsland.XWayland 2 | plugin GreenIslandXWaylandPlugin 3 | XWaylandWindowChrome 1.0 XWaylandWindowChrome.qml 4 | -------------------------------------------------------------------------------- /declarative/xwayland/sigwatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Unix signal watcher for Qt. 3 | * 4 | * Copyright (C) 2014 Simon Knopp 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef SIGWATCH_H 26 | #define SIGWATCH_H 27 | 28 | #include 29 | #include 30 | 31 | class UnixSignalWatcherPrivate; 32 | 33 | 34 | /*! 35 | * \brief The UnixSignalWatcher class converts Unix signals to Qt signals. 36 | * 37 | * To watch for a given signal, e.g. \c SIGINT, call \c watchForSignal(SIGINT) 38 | * and \c connect() your handler to unixSignal(). 39 | */ 40 | 41 | class UnixSignalWatcher : public QObject 42 | { 43 | Q_OBJECT 44 | public: 45 | explicit UnixSignalWatcher(QObject *parent = 0); 46 | ~UnixSignalWatcher(); 47 | 48 | void watchForSignal(int signal); 49 | 50 | signals: 51 | void unixSignal(int signal); 52 | 53 | private: 54 | UnixSignalWatcherPrivate * const d_ptr; 55 | Q_DECLARE_PRIVATE(UnixSignalWatcher) 56 | Q_PRIVATE_SLOT(d_func(), void _q_onNotify(int)) 57 | }; 58 | 59 | #endif // SIGWATCH_H 60 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbatom.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_ATOM_H 28 | #define XCB_ATOM_H 29 | 30 | #include 31 | 32 | #include "xwaylandmanager.h" 33 | 34 | namespace Xcb { 35 | 36 | class Atom 37 | { 38 | Q_DISABLE_COPY(Atom) 39 | public: 40 | explicit Atom(const QByteArray &name, bool onlyIfExists = false); 41 | Atom(); 42 | ~Atom(); 43 | 44 | inline const QByteArray &name() const { 45 | return m_name; 46 | } 47 | 48 | bool isValid(); 49 | 50 | operator xcb_atom_t() const; 51 | 52 | static QString nameFromAtom(xcb_atom_t atom); 53 | 54 | private: 55 | QByteArray m_name; 56 | bool m_retrieved; 57 | xcb_intern_atom_cookie_t m_cookie; 58 | xcb_atom_t m_atom; 59 | 60 | void getReply(); 61 | }; 62 | 63 | } // namespace Xcb 64 | 65 | #endif // XCB_ATOM_H 66 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbcursors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_CURSORS_H 28 | #define XCB_CURSORS_H 29 | 30 | #include 31 | 32 | namespace Xcb { 33 | 34 | namespace Cursors { 35 | 36 | xcb_cursor_t *createCursors(); 37 | void destroyCursors(xcb_cursor_t *c); 38 | 39 | } // namespace Cursors 40 | 41 | } // namespace Xcb 42 | 43 | #endif // XCB_CURSORS_H 44 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbproperties.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "xcbproperties.h" 28 | #include "xcbresources.h" 29 | #include "xcbwrapper.h" 30 | 31 | namespace Xcb { 32 | 33 | namespace Properties { 34 | 35 | void dump(xcb_atom_t property, xcb_get_property_reply_t *reply) 36 | { 37 | if (!reply) 38 | return; 39 | 40 | qint32 *incrValue; 41 | const char *textValue, *name; 42 | int len; 43 | xcb_atom_t *atomValue; 44 | 45 | if (reply->type == Xcb::resources()->atoms->incr) { 46 | incrValue = static_cast(xcb_get_property_value(reply)); 47 | } else if (reply->type == Xcb::resources()->atoms->utf8_string || reply->type == Xcb::resources()->atoms->string) { 48 | if (reply->value_len > 40) 49 | len = 40; 50 | else 51 | len = reply->value_len; 52 | } else if (reply->type == XCB_ATOM_ATOM) { 53 | atomValue = reinterpret_cast(xcb_get_property_value(reply)); 54 | for (int i = 0; i < reply->value_len; i++) 55 | name = strdup(Xcb::Atom::nameFromAtom(atomValue[i]).toUtf8().constData()); 56 | } 57 | } 58 | 59 | } // namespace Cursors 60 | 61 | } // namespace Xcb 62 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbproperties.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_PROPERTIES_H 28 | #define XCB_PROPERTIES_H 29 | 30 | #include 31 | 32 | namespace Xcb { 33 | 34 | namespace Properties { 35 | 36 | void dump(xcb_atom_t property, xcb_get_property_reply_t *reply); 37 | 38 | } // namespace Cursors 39 | 40 | } // namespace Xcb 41 | 42 | #endif // XCB_PROPERTIES_H 43 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbresources.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_RESOURCES_H 28 | #define XCB_RESOURCES_H 29 | 30 | #include "xcbatoms.h" 31 | 32 | #include 33 | 34 | namespace Xcb { 35 | 36 | class Resources 37 | { 38 | public: 39 | Resources(); 40 | ~Resources(); 41 | 42 | const xcb_query_extension_reply_t *xfixes; 43 | Atoms *atoms; 44 | xcb_render_pictforminfo_t formatRgb; 45 | xcb_render_pictforminfo_t formatRgba; 46 | }; 47 | 48 | } // namespace Xcb 49 | 50 | #endif // XCB_RESOURCES_H 51 | -------------------------------------------------------------------------------- /declarative/xwayland/xcbwrapper.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_WRAPPER_H 28 | #define XCB_WRAPPER_H 29 | 30 | #include 31 | 32 | #include 33 | 34 | namespace Xcb { 35 | 36 | class Resources; 37 | 38 | xcb_connection_t *connection(); 39 | xcb_screen_t *screen(); 40 | xcb_window_t rootWindow(); 41 | xcb_visualid_t rootVisual(); 42 | Resources *resources(); 43 | 44 | void openConnection(int fd); 45 | void closeConnection(); 46 | 47 | bool isOurResource(quint32 id); 48 | 49 | } // namespace Xcb 50 | 51 | #endif // XCB_WRAPPER_H 52 | -------------------------------------------------------------------------------- /headers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Create the config.h header file 2 | configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) 3 | 4 | # Create the cmakedirs.h header file 5 | configure_file(cmakedirs.h.in ${CMAKE_CURRENT_BINARY_DIR}/cmakedirs.h) 6 | -------------------------------------------------------------------------------- /headers/config.h.in: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2012-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_CONFIG_H 29 | #define GREENISLAND_CONFIG_H 30 | 31 | #define GREENISLAND_VERSION_STRING "@PROJECT_VERSION@" 32 | 33 | #cmakedefine01 HAVE_SYSTEMD 34 | 35 | #endif // GREENISLAND_CONFIG_H 36 | -------------------------------------------------------------------------------- /launcher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../headers" 3 | ) 4 | 5 | set(SOURCES 6 | main.cpp 7 | compositorlauncher.cpp 8 | compositorprocess.cpp 9 | ) 10 | 11 | add_executable(greenisland-launcher ${SOURCES}) 12 | target_link_libraries(greenisland-launcher Qt5::Core) 13 | 14 | install(TARGETS greenisland-launcher DESTINATION ${BIN_INSTALL_DIR}) 15 | -------------------------------------------------------------------------------- /plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # System copy of GreenIsland::Platform 2 | if(ENABLE_ONLY_EGLDEVICEINTEGRATION) 3 | find_package(GreenIsland REQUIRED) 4 | endif() 5 | 6 | add_subdirectory(egldeviceintegration) 7 | #if(NOT ENABLE_ONLY_EGLDEVICEINTEGRATION) 8 | # add_subdirectory(extensions) 9 | #endif() 10 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(ENABLE_EGLDEVICEINTEGRATION_KMS) 2 | add_subdirectory(kms) 3 | endif() 4 | add_subdirectory(wayland) 5 | if(ENABLE_EGLDEVICEINTEGRATION_X11) 6 | add_subdirectory(x11) 7 | endif() 8 | if(ENABLE_EGLDEVICEINTEGRATION_BRCM AND BcmHost_FOUND) 9 | add_subdirectory(brcm) 10 | endif() 11 | if(ENABLE_EGLDEVICEINTEGRATION_MALI) 12 | add_subdirectory(mali) 13 | endif() 14 | if(ENABLE_EGLDEVICEINTEGRATION_VIV) 15 | add_subdirectory(viv) 16 | endif() 17 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/brcm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers/GreenIsland" 4 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 6 | ) 7 | 8 | set(SOURCES 9 | eglfsbrcmintegration.cpp 10 | main.cpp 11 | ) 12 | 13 | add_library(brcm SHARED MODULE ${SOURCES}) 14 | target_link_libraries(brcm 15 | GreenIsland::Platform 16 | BcmHost::BcmHost 17 | BcmHost::EGL 18 | BcmHost::GLESv2 19 | ) 20 | 21 | install(TARGETS brcm 22 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 23 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/brcm/brcm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "greenisland_brcm" ], 3 | "Hardware": "brcm" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/brcm/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfsbrcmintegration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSBrcmIntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "brcm.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSBrcmIntegrationPlugin::create() 43 | { 44 | return new EglFSBrcmIntegration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/kms/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Libdrm) 2 | set_package_properties(Libdrm PROPERTIES 3 | TYPE REQUIRED 4 | PURPOSE "Required for DRM/KMS support") 5 | find_package(gbm) 6 | set_package_properties(gbm PROPERTIES 7 | TYPE REQUIRED 8 | PURPOSE "Required for DRM/KMS support") 9 | 10 | include_directories( 11 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 12 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 13 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 14 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 15 | ) 16 | 17 | set(SOURCES 18 | eglfskmscursor.cpp 19 | eglfskmsdevice.cpp 20 | eglfskmsintegration.cpp 21 | eglfskmsscreen.cpp 22 | eglfskmswindow.cpp 23 | main.cpp 24 | ) 25 | 26 | add_library(kms SHARED MODULE ${SOURCES}) 27 | target_link_libraries(kms 28 | GreenIsland::Platform 29 | Libdrm::Libdrm 30 | gbm::gbm 31 | ) 32 | 33 | install(TARGETS kms 34 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 35 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/kms/eglfskmswindow.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:QTLGPL$ 10 | * 11 | * GNU Lesser General Public License Usage 12 | * This file may be used under the terms of the GNU Lesser General 13 | * Public License version 3 as published by the Free Software 14 | * Foundation and appearing in the file LICENSE.LGPLv3 included in the 15 | * packaging of this file. Please review the following information to 16 | * ensure the GNU Lesser General Public License version 3 requirements 17 | * will be met: https://www.gnu.org/licenses/lgpl.html. 18 | * 19 | * GNU General Public License Usage 20 | * Alternatively, this file may be used under the terms of the GNU 21 | * General Public License version 2.0 or (at your option) the GNU General 22 | * Public license version 3 or any later version approved by the KDE Free 23 | * Qt Foundation. The licenses are as published by the Free Software 24 | * Foundation and appearing in the file LICENSE.GPLv2 and LICENSE.GPLv3 25 | * included in the packaging of this file. Please review the following 26 | * information to ensure the GNU General Public License requirements will 27 | * be met: https://www.gnu.org/licenses/gpl-2.0.html and 28 | * https://www.gnu.org/licenses/gpl-3.0.html. 29 | * 30 | * $END_LICENSE$ 31 | ***************************************************************************/ 32 | 33 | #ifndef GREENISLAND_EGLFSKMSWINDOW_H 34 | #define GREENISLAND_EGLFSKMSWINDOW_H 35 | 36 | #include 37 | 38 | namespace GreenIsland { 39 | 40 | namespace Platform { 41 | 42 | class EglFSKmsWindow : public EglFSWindow 43 | { 44 | public: 45 | EglFSKmsWindow(QWindow *w); 46 | 47 | void resizeSurface(); 48 | }; 49 | 50 | } // namespace Platform 51 | 52 | } // namespace GreenIsland 53 | 54 | #endif // GREENISLAND_EGLFSKMSWINDOW_H 55 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/kms/kms.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "greenisland_kms" ], 3 | "Hardware": "kms" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/kms/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfskmsintegration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSKmsIntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "kms.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSKmsIntegrationPlugin::create() 43 | { 44 | return new EglFSKmsIntegration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/mali/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers/GreenIsland" 4 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 6 | ) 7 | 8 | set(SOURCES 9 | eglfsmaliintegration.cpp 10 | main.cpp 11 | ) 12 | 13 | add_library(mali SHARED MODULE ${SOURCES}) 14 | target_link_libraries(mali 15 | GreenIsland::Platform 16 | ) 17 | 18 | install(TARGETS mali 19 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 20 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/mali/eglfsmaliintegration.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 The Qt Company Ltd. 5 | * 6 | * $BEGIN_LICENSE:QTLGPL$ 7 | * 8 | * GNU Lesser General Public License Usage 9 | * This file may be used under the terms of the GNU Lesser General 10 | * Public License version 3 as published by the Free Software 11 | * Foundation and appearing in the file LICENSE.LGPLv3 included in the 12 | * packaging of this file. Please review the following information to 13 | * ensure the GNU Lesser General Public License version 3 requirements 14 | * will be met: https://www.gnu.org/licenses/lgpl.html. 15 | * 16 | * GNU General Public License Usage 17 | * Alternatively, this file may be used under the terms of the GNU 18 | * General Public License version 2.0 or (at your option) the GNU General 19 | * Public license version 3 or any later version approved by the KDE Free 20 | * Qt Foundation. The licenses are as published by the Free Software 21 | * Foundation and appearing in the file LICENSE.GPLv2 and LICENSE.GPLv3 22 | * included in the packaging of this file. Please review the following 23 | * information to ensure the GNU General Public License requirements will 24 | * be met: https://www.gnu.org/licenses/gpl-2.0.html and 25 | * https://www.gnu.org/licenses/gpl-3.0.html. 26 | * 27 | * $END_LICENSE$ 28 | ***************************************************************************/ 29 | 30 | #ifndef GREENISLAND_EGLFSMALIINTEGRATION_H 31 | #define GREENISLAND_EGLFSMALIINTEGRATION_H 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Platform { 38 | 39 | class EglFSMaliIntegration : public EGLDeviceIntegration 40 | { 41 | public: 42 | void platformInit() Q_DECL_OVERRIDE; 43 | EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; 44 | void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; 45 | }; 46 | 47 | } // namespace Platform 48 | 49 | } // namespace GreenIsland 50 | 51 | #endif // GREENISLAND_EGLFSMALIINTEGRATION_H 52 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/mali/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfsmaliintegration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSMaliIntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "mali.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSMaliIntegrationPlugin::create() 43 | { 44 | return new EglFSMaliIntegration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/mali/mali.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "greenisland_mali" ], 3 | "Hardware": "mali" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/viv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers/GreenIsland" 4 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 6 | ) 7 | 8 | add_definitions(-DLINUX=1 -DEGL_API_FB=1) 9 | 10 | set(SOURCES 11 | eglfsvivintegration.cpp 12 | main.cpp 13 | ) 14 | 15 | add_library(viv SHARED MODULE ${SOURCES}) 16 | target_link_libraries(viv 17 | GreenIsland::Platform 18 | Wayland::Server 19 | GAL 20 | ) 21 | 22 | install(TARGETS viv 23 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 24 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/viv/eglfs_viv.pro: -------------------------------------------------------------------------------- 1 | TARGET = qeglfs-viv-integration 2 | 3 | PLUGIN_TYPE = egldeviceintegrations 4 | PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin 5 | load(qt_plugin) 6 | 7 | QT += core-private gui-private platformsupport-private eglfs_device_lib-private 8 | 9 | INCLUDEPATH += $$PWD/../.. 10 | CONFIG += egl 11 | DEFINES += LINUX=1 EGL_API_FB=1 12 | LIBS += -lGAL 13 | QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF 14 | 15 | SOURCES += $$PWD/qeglfsvivmain.cpp \ 16 | $$PWD/qeglfsvivintegration.cpp 17 | 18 | HEADERS += $$PWD/qeglfsvivintegration.h 19 | 20 | OTHER_FILES += $$PWD/eglfs_viv.json 21 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/viv/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfsvivintegration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSVivIntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "viv.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSVivIntegrationPlugin::create() 43 | { 44 | return new EglFSVivIntegration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/viv/viv.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "greenisland_viv" ], 3 | "Hardware": "viv" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/wayland/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Qt5PlatformSupport REQUIRED) 2 | include_directories( 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 4 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 5 | ${Qt5PlatformSupport_INCLUDE_DIR} 6 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 7 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 8 | ) 9 | 10 | add_definitions(-DQT_EGL_WAYLAND) 11 | 12 | set(SOURCES 13 | eglfswaylandblitter.cpp 14 | eglfswaylandcontext.cpp 15 | eglfswaylandinput.cpp 16 | eglfswaylandintegration.cpp 17 | eglfswaylandscreen.cpp 18 | eglfswaylandwindow.cpp 19 | main.cpp 20 | ) 21 | 22 | include(ECMQtDeclareLoggingCategory) 23 | ecm_qt_declare_logging_category(SOURCES 24 | HEADER eglfswaylandlogging.h 25 | IDENTIFIER GreenIsland::Platform::gLcEglFSWayland 26 | CATEGORY_NAME greenisland.qpa.wayland 27 | DEFAULT_SEVERITY Debug 28 | ) 29 | 30 | add_library(wayland MODULE ${SOURCES}) 31 | target_link_libraries(wayland 32 | GreenIsland::Platform 33 | GreenIsland::Client 34 | Wayland::Egl 35 | ) 36 | 37 | install(TARGETS wayland 38 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 39 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/wayland/eglfswaylandblitter.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_EGLFSWAYLANDBLITTER_H 29 | #define GREENISLAND_EGLFSWAYLANDBLITTER_H 30 | 31 | #include 32 | 33 | class QOpenGLShaderProgram; 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Platform { 38 | 39 | class EglFSWaylandContext; 40 | class EglFSWaylandWindow; 41 | 42 | class EglFSWaylandBlitter : public QOpenGLFunctions 43 | { 44 | public: 45 | EglFSWaylandBlitter(EglFSWaylandContext *context); 46 | ~EglFSWaylandBlitter(); 47 | 48 | void blit(EglFSWaylandWindow *window); 49 | 50 | private: 51 | EglFSWaylandContext *m_context; 52 | QOpenGLShaderProgram *m_blitProgram; 53 | }; 54 | 55 | } // namespace Platform 56 | 57 | } // namespace GreenIsland 58 | 59 | #endif // GREENISLAND_EGLFSWAYLANDBLITTER_H 60 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/wayland/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfswaylandintegration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSWaylandIntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "wayland.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSWaylandIntegrationPlugin::create() 43 | { 44 | return new EglFSWaylandIntegration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/wayland/wayland.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "eglfs_wayland" ], 3 | "Hardware": "wayland" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/x11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT X11_FOUND) 2 | message(FATAL_ERROR "X11 is required to build X11 EGL device integration") 3 | endif() 4 | find_package(XCB REQUIRED COMPONENTS XCB) 5 | find_package(X11_XCB REQUIRED) 6 | 7 | include_directories( 8 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 9 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 10 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 11 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 12 | ) 13 | 14 | set(SOURCES 15 | eglfsx11integration.cpp 16 | main.cpp 17 | ) 18 | 19 | add_library(x11 SHARED MODULE ${SOURCES}) 20 | target_link_libraries(x11 21 | GreenIsland::Platform 22 | ${X11_LIBRARIES} 23 | XCB::XCB 24 | X11::XCB 25 | ) 26 | 27 | install(TARGETS x11 28 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/egldeviceintegration) 29 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/x11/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | 30 | #include "eglfsx11integration.h" 31 | 32 | using namespace GreenIsland::Platform; 33 | 34 | class EglFSX11IntegrationPlugin : public EGLDeviceIntegrationPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID GreenIslandDeviceIntegrationFactoryInterface_iid FILE "x11.json") 38 | public: 39 | EGLDeviceIntegration *create() Q_DECL_OVERRIDE; 40 | }; 41 | 42 | EGLDeviceIntegration *EglFSX11IntegrationPlugin::create() 43 | { 44 | return new EglFSX11Integration; 45 | } 46 | 47 | #include "main.moc" 48 | -------------------------------------------------------------------------------- /plugins/egldeviceintegration/x11/x11.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "eglfs_x11" ], 3 | "Hardware": "x11" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(plasma) 2 | if(ENABLE_XWAYLAND) 3 | add_subdirectory(xwayland) 4 | endif() 5 | -------------------------------------------------------------------------------- /plugins/extensions/plasma/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${CMAKE_SOURCE_DIR}/src/server/GreenIslandServerConfigExtrasLocal.cmake) 2 | include(${CMAKE_SOURCE_DIR}/src/server/GreenIslandServerMacros.cmake) 3 | 4 | include_directories( 5 | ${CMAKE_SOURCE_DIR}/src 6 | ${CMAKE_SOURCE_DIR}/src/waylandcompositor 7 | ${CMAKE_BINARY_DIR}/src 8 | ${CMAKE_BINARY_DIR}/src/waylandcompositor 9 | ${CMAKE_BINARY_DIR}/headers 10 | ${CMAKE_BINARY_DIR}/headers/GreenIsland 11 | ) 12 | 13 | set(SOURCES 14 | plugin.cpp 15 | plasmaeffects.cpp 16 | plasmashell.cpp 17 | plasmasurface.cpp 18 | ) 19 | 20 | greenisland_add_server_protocol(SOURCES 21 | PROTOCOL ${CMAKE_SOURCE_DIR}/data/protocols/plasma/plasma-shell.xml 22 | BASENAME plasma-shell 23 | PREFIX org_kde_plasma_ 24 | ) 25 | greenisland_add_server_protocol(SOURCES 26 | PROTOCOL ${CMAKE_SOURCE_DIR}/data/protocols/plasma/plasma-effects.xml 27 | BASENAME plasma-effects 28 | PREFIX org_kde_plasma_ 29 | ) 30 | 31 | add_library(plasma MODULE ${SOURCES}) 32 | target_link_libraries(plasma 33 | GreenIsland::Server 34 | Wayland::Server) 35 | 36 | install(TARGETS plasma 37 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/extensions) 38 | -------------------------------------------------------------------------------- /plugins/extensions/plasma/plugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include 29 | 30 | #include "plasmaeffects.h" 31 | #include "plasmashell.h" 32 | 33 | namespace GreenIsland { 34 | 35 | class GREENISLANDSERVER_EXPORT PlasmaPlugin : public AbstractPlugin 36 | { 37 | Q_OBJECT 38 | Q_PLUGIN_METADATA(IID "org.hawaiios.greenisland.Plugin") 39 | Q_INTERFACES(GreenIsland::AbstractPlugin) 40 | public: 41 | PlasmaPlugin() 42 | : AbstractPlugin() 43 | , m_compositor(Q_NULLPTR) 44 | { 45 | } 46 | 47 | QString name() const 48 | { 49 | return QStringLiteral("plasma"); 50 | } 51 | 52 | void registerPlugin(Compositor *compositor) 53 | { 54 | m_compositor = compositor; 55 | } 56 | 57 | void addGlobalInterfaces() 58 | { 59 | PlasmaShell *plasmaShell = new PlasmaShell(m_compositor); 60 | m_compositor->addGlobalInterface(plasmaShell); 61 | m_compositor->addGlobalInterface(new PlasmaEffects(plasmaShell)); 62 | } 63 | 64 | private: 65 | Compositor *m_compositor; 66 | }; 67 | 68 | } 69 | 70 | #include "plugin.moc" 71 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # All the required XCB components 2 | #find_package(XCB 3 | # REQUIRED COMPONENTS 4 | # DAMAGE 5 | # SYNC 6 | # RANDR 7 | # KEYSYMS 8 | # IMAGE 9 | # SHM 10 | # GLX 11 | # OPTIONAL_COMPONENTS 12 | # ICCCM 13 | # CURSOR 14 | #) 15 | find_package(XCB 16 | REQUIRED COMPONENTS 17 | XCB 18 | XFIXES 19 | CURSOR 20 | COMPOSITE 21 | RENDER 22 | SHAPE 23 | ) 24 | set_package_properties(XCB PROPERTIES TYPE REQUIRED) 25 | 26 | if(NOT X11_FOUND) 27 | message(FATAL_ERROR "X11 is required to build XWayland support") 28 | endif() 29 | if(NOT X11_Xcursor_FOUND) 30 | message(FATAL_ERROR "Xcursor is required to build XWayland support") 31 | endif() 32 | 33 | include_directories( 34 | ${CMAKE_SOURCE_DIR}/src 35 | ${CMAKE_SOURCE_DIR}/src/waylandcompositor 36 | ${CMAKE_BINARY_DIR}/src 37 | ${CMAKE_BINARY_DIR}/src/waylandcompositor 38 | ${CMAKE_BINARY_DIR}/headers 39 | ${CMAKE_BINARY_DIR}/headers/GreenIsland 40 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 41 | ) 42 | 43 | set(SOURCES 44 | xcbatom.cpp 45 | xcbatoms.cpp 46 | xcbcursors.cpp 47 | xcbwindow.cpp 48 | xcbwrapper.cpp 49 | xcbresources.cpp 50 | xwayland.cpp 51 | xwaylandmanager.cpp 52 | xwaylandplugin.cpp 53 | xwaylandwindow.cpp 54 | xwaylandserver.cpp 55 | xwaylandsurface.cpp 56 | sigwatch.cpp 57 | ) 58 | 59 | add_library(xwayland MODULE ${SOURCES}) 60 | target_link_libraries(xwayland 61 | Qt5::Core 62 | Qt5::Gui 63 | GreenIsland::Server 64 | XCB::XCB 65 | XCB::XFIXES 66 | XCB::CURSOR 67 | XCB::COMPOSITE 68 | XCB::RENDER 69 | XCB::SHAPE 70 | ${X11_Xcursor_LIB} 71 | Wayland::Server) 72 | 73 | install(TARGETS xwayland 74 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/extensions) 75 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/sigwatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Unix signal watcher for Qt. 3 | * 4 | * Copyright (C) 2014 Simon Knopp 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef SIGWATCH_H 26 | #define SIGWATCH_H 27 | 28 | #include 29 | #include 30 | 31 | class UnixSignalWatcherPrivate; 32 | 33 | 34 | /*! 35 | * \brief The UnixSignalWatcher class converts Unix signals to Qt signals. 36 | * 37 | * To watch for a given signal, e.g. \c SIGINT, call \c watchForSignal(SIGINT) 38 | * and \c connect() your handler to unixSignal(). 39 | */ 40 | 41 | class UnixSignalWatcher : public QObject 42 | { 43 | Q_OBJECT 44 | public: 45 | explicit UnixSignalWatcher(QObject *parent = 0); 46 | ~UnixSignalWatcher(); 47 | 48 | void watchForSignal(int signal); 49 | 50 | signals: 51 | void unixSignal(int signal); 52 | 53 | private: 54 | UnixSignalWatcherPrivate * const d_ptr; 55 | Q_DECLARE_PRIVATE(UnixSignalWatcher) 56 | Q_PRIVATE_SLOT(d_func(), void _q_onNotify(int)) 57 | }; 58 | 59 | #endif // SIGWATCH_H 60 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbatom.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_ATOM_H 28 | #define XCB_ATOM_H 29 | 30 | #include 31 | 32 | #include "xwaylandmanager.h" 33 | 34 | namespace Xcb { 35 | 36 | class Atom 37 | { 38 | Q_DISABLE_COPY(Atom) 39 | public: 40 | explicit Atom(const QByteArray &name, bool onlyIfExists = false); 41 | Atom(); 42 | ~Atom(); 43 | 44 | inline const QByteArray &name() const { 45 | return m_name; 46 | } 47 | 48 | bool isValid(); 49 | 50 | operator xcb_atom_t() const; 51 | 52 | static QString nameFromAtom(xcb_atom_t atom); 53 | 54 | private: 55 | QByteArray m_name; 56 | bool m_retrieved; 57 | xcb_intern_atom_cookie_t m_cookie; 58 | xcb_atom_t m_atom; 59 | 60 | void getReply(); 61 | }; 62 | 63 | } // namespace Xcb 64 | 65 | #endif // XCB_ATOM_H 66 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbcursors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_CURSORS_H 28 | #define XCB_CURSORS_H 29 | 30 | #include 31 | 32 | namespace Xcb { 33 | 34 | namespace Cursors { 35 | 36 | xcb_cursor_t *createCursors(); 37 | void destroyCursors(xcb_cursor_t *c); 38 | 39 | } // namespace Cursors 40 | 41 | } // namespace Xcb 42 | 43 | #endif // XCB_CURSORS_H 44 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbproperties.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "xcbproperties.h" 28 | #include "xcbresources.h" 29 | #include "xcbwrapper.h" 30 | 31 | namespace Xcb { 32 | 33 | namespace Properties { 34 | 35 | void dump(xcb_atom_t property, xcb_get_property_reply_t *reply) 36 | { 37 | if (!reply) 38 | return; 39 | 40 | qint32 *incrValue; 41 | const char *textValue, *name; 42 | int len; 43 | xcb_atom_t *atomValue; 44 | 45 | switch (reply->type) { 46 | case Xcb::resources()->atoms->incr: 47 | incrValue = static_cast(xcb_get_property_value(reply)); 48 | break; 49 | case Xcb::resources()->atoms->utf8_string: 50 | case Xcb::resources()->atoms->string: 51 | if (reply->value_len > 40) 52 | len = 40; 53 | else 54 | len = reply->value_len; 55 | break; 56 | case XCB_ATOM_ATOM: 57 | atomValue = xcb_get_property_value(reply); 58 | for (int i = 0; i < reply->value_len; i++) { 59 | name = Xcb::Atom::nameFromAtom(atomValue[i]); 60 | } 61 | } 62 | 63 | } // namespace Cursors 64 | 65 | } // namespace Xcb 66 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbproperties.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_PROPERTIES_H 28 | #define XCB_PROPERTIES_H 29 | 30 | #include 31 | 32 | namespace Xcb { 33 | 34 | namespace Properties { 35 | 36 | void dump(xcb_atom_t property, xcb_get_property_reply_t *reply); 37 | 38 | } // namespace Cursors 39 | 40 | } // namespace Xcb 41 | 42 | #endif // XCB_PROPERTIES_H 43 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbresources.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:GPL2+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation, either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_RESOURCES_H 28 | #define XCB_RESOURCES_H 29 | 30 | #include "xcbatoms.h" 31 | 32 | #include 33 | 34 | namespace Xcb { 35 | 36 | class Resources 37 | { 38 | public: 39 | Resources(); 40 | ~Resources(); 41 | 42 | const xcb_query_extension_reply_t *xfixes; 43 | Atoms *atoms; 44 | xcb_render_pictforminfo_t formatRgb; 45 | xcb_render_pictforminfo_t formatRgba; 46 | }; 47 | 48 | } // namespace Xcb 49 | 50 | #endif // XCB_RESOURCES_H 51 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xcbwrapper.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XCB_WRAPPER_H 28 | #define XCB_WRAPPER_H 29 | 30 | #include 31 | 32 | #include 33 | 34 | namespace Xcb { 35 | 36 | class Resources; 37 | 38 | xcb_connection_t *connection(); 39 | xcb_screen_t *screen(); 40 | xcb_window_t rootWindow(); 41 | xcb_visualid_t rootVisual(); 42 | Resources *resources(); 43 | 44 | void openConnection(int fd); 45 | void closeConnection(); 46 | 47 | bool isOurResource(quint32 id); 48 | 49 | } // namespace Xcb 50 | 51 | #endif // XCB_WRAPPER_H 52 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xwayland.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XWAYLAND_H 28 | #define XWAYLAND_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | Q_DECLARE_LOGGING_CATEGORY(XWAYLAND) 35 | Q_DECLARE_LOGGING_CATEGORY(XWAYLAND_TRACE) 36 | 37 | namespace GreenIsland { 38 | 39 | class Compositor; 40 | class XWaylandManager; 41 | class XWaylandServer; 42 | 43 | class XWayland : public QObject 44 | { 45 | Q_OBJECT 46 | public: 47 | XWayland(Compositor *compositor, QObject *parent = 0); 48 | ~XWayland(); 49 | 50 | bool isInitialized() const; 51 | 52 | public Q_SLOTS: 53 | void initialize(); 54 | 55 | private Q_SLOTS: 56 | void serverStarted(); 57 | void surfaceCreated(QWaylandSurface *surface); 58 | 59 | private: 60 | Compositor *m_compositor; 61 | XWaylandServer *m_server; 62 | XWaylandManager *m_manager; 63 | }; 64 | 65 | } 66 | 67 | #endif // XWAYLAND_H 68 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xwaylandplugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #include "xwayland.h" 28 | #include "xwaylandplugin.h" 29 | 30 | namespace GreenIsland { 31 | 32 | XWaylandPlugin::XWaylandPlugin() 33 | : AbstractPlugin() 34 | { 35 | } 36 | 37 | QString XWaylandPlugin::name() const 38 | { 39 | return QStringLiteral("XWayland"); 40 | } 41 | 42 | void XWaylandPlugin::registerPlugin(Compositor *compositor) 43 | { 44 | XWayland *xwayland = new XWayland(compositor, this); 45 | connect(compositor, &Compositor::screenConfigurationAcquired, this, [xwayland] { 46 | QMetaObject::invokeMethod(xwayland, "initialize", Qt::QueuedConnection); 47 | }); 48 | } 49 | 50 | } 51 | 52 | #include "moc_xwaylandplugin.cpp" 53 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xwaylandplugin.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XWAYLANDPLUGIN_H 28 | #define XWAYLANDPLUGIN_H 29 | 30 | #include 31 | 32 | namespace GreenIsland { 33 | 34 | class GREENISLANDSERVER_EXPORT XWaylandPlugin : public AbstractPlugin 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID "org.greenisland.Plugin") 38 | Q_INTERFACES(GreenIsland::AbstractPlugin) 39 | public: 40 | XWaylandPlugin(); 41 | 42 | QString name() const; 43 | 44 | void registerPlugin(Compositor *compositor); 45 | }; 46 | 47 | } 48 | 49 | #endif // XWAYLANDPLUGIN_H 50 | -------------------------------------------------------------------------------- /plugins/extensions/xwayland/xwaylandsurface.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef XWAYLANDSURFACE_H 28 | #define XWAYLANDSURFACE_H 29 | 30 | #include 31 | 32 | #include "xwaylandwindow.h" 33 | 34 | namespace GreenIsland { 35 | 36 | class ClientWindow; 37 | 38 | class XWaylandSurface : public QObject, public QWaylandSurfaceInterface 39 | { 40 | public: 41 | XWaylandSurface(XWaylandWindow *window); 42 | ~XWaylandSurface(); 43 | 44 | inline ClientWindow *clientWindow() const { 45 | return m_window; 46 | } 47 | 48 | void setAppId(const QString &id); 49 | void setTitle(const QString &title); 50 | void setType(const QWaylandSurface::WindowType &type); 51 | 52 | protected: 53 | bool runOperation(QWaylandSurfaceOp *op) Q_DECL_OVERRIDE; 54 | 55 | private: 56 | ClientWindow *m_window; 57 | }; 58 | 59 | } 60 | 61 | #endif // XWAYLANDSURFACE_H 62 | -------------------------------------------------------------------------------- /qpa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../headers/GreenIsland" 4 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 5 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 6 | ) 7 | 8 | set(SOURCES 9 | main.cpp 10 | ) 11 | 12 | add_library(GreenIslandEglFS MODULE ${SOURCES}) 13 | target_link_libraries(GreenIslandEglFS 14 | Qt5::Core 15 | Qt5::Gui 16 | GreenIsland::Platform 17 | ) 18 | 19 | install(TARGETS GreenIslandEglFS DESTINATION ${PLUGIN_INSTALL_DIR}/platforms) 20 | -------------------------------------------------------------------------------- /qpa/greenisland.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "greenisland" ] 3 | } 4 | -------------------------------------------------------------------------------- /shells/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_SOURCE_DIR}/../src/server/GreenIslandServerMacros.cmake") 2 | 3 | greenisland_install_shell(org.hawaiios.greenisland simple) 4 | -------------------------------------------------------------------------------- /shells/simple/images/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/greenisland/088b657a26d5f909bfe42fd7b5fec4d96265afe9/shells/simple/images/wallpaper.png -------------------------------------------------------------------------------- /shells/simple/metadata.desktop: -------------------------------------------------------------------------------- 1 | [Shell] 2 | MainScript=Compositor.qml 3 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(GenerateExportHeader) 2 | include(ECMPackageConfigHelpers) 3 | include(ECMSetupVersion) 4 | include(ECMGenerateHeaders) 5 | 6 | ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX GREENISLAND 7 | VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/../headers/GreenIsland/greenisland_version.h" 8 | PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/GreenIslandConfigVersion.cmake" 9 | SOVERSION ${PROJECT_SOVERSION}) 10 | 11 | set(HAWAII_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/Hawaii") 12 | set(GREENISLAND_INCLUDEDIR "${HAWAII_INCLUDEDIR}/GreenIsland") 13 | 14 | set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/GreenIsland") 15 | 16 | ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/GreenIslandConfig.cmake.in" 17 | "${CMAKE_CURRENT_BINARY_DIR}/GreenIslandConfig.cmake" 18 | INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}) 19 | 20 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/GreenIslandConfig.cmake" 21 | "${CMAKE_CURRENT_BINARY_DIR}/GreenIslandConfigVersion.cmake" 22 | DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 23 | COMPONENT Devel) 24 | 25 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../headers/GreenIsland/greenisland_version.h" 26 | DESTINATION ${GREENISLAND_INCLUDEDIR} COMPONENT Devel) 27 | 28 | include(GenerateHeaders) 29 | include(PrivateHeaders) 30 | 31 | add_subdirectory(client) 32 | add_subdirectory(hardwareintegration) 33 | add_subdirectory(platform) 34 | add_subdirectory(server) 35 | add_subdirectory(waylandcompositor) 36 | -------------------------------------------------------------------------------- /src/GreenIslandConfig.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT GreenIsland_FIND_COMPONENTS) 2 | set(GreenIsland_NOT_FOUND_MESSAGE "The GreenIsland package requires at least one component") 3 | set(GreenIsland_FOUND False) 4 | return() 5 | endif() 6 | 7 | set(_GreenIsland_FIND_PARTS_REQUIRED) 8 | if (GreenIsland_FIND_REQUIRED) 9 | set(_GreenIsland_FIND_PARTS_REQUIRED REQUIRED) 10 | endif() 11 | set(_GreenIsland_FIND_PARTS_QUIET) 12 | if (GreenIsland_FIND_QUIETLY) 13 | set(_GreenIsland_FIND_PARTS_QUIET QUIET) 14 | endif() 15 | 16 | get_filename_component(_greenisland_install_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) 17 | 18 | set(_GreenIsland_NOTFOUND_MESSAGE) 19 | 20 | foreach(module ${GreenIsland_FIND_COMPONENTS}) 21 | find_package(GreenIsland${module} 22 | ${_GreenIsland_FIND_PARTS_QUIET} 23 | ${_GreenIsland_FIND_PARTS_REQUIRED} 24 | PATHS "${_greenisland_install_prefix}" NO_DEFAULT_PATH 25 | ) 26 | if (NOT GreenIsland${module}_FOUND) 27 | if (GreenIsland_FIND_REQUIRED_${module}) 28 | set(_GreenIsland_NOTFOUND_MESSAGE "${_GreenIsland_NOTFOUND_MESSAGE}Failed to find GreenIsland component \"${module}\" config file at \"${_greenisland_install_prefix}/GreenIsland${module}/GreenIsland${module}Config.cmake\"\n") 29 | elseif(NOT GreenIsland_FIND_QUIETLY) 30 | message(WARNING "Failed to find GreenIsland component \"${module}\" config file at \"${_greenisland_install_prefix}/GreenIsland${module}/GreenIsland${module}Config.cmake\"") 31 | endif() 32 | endif() 33 | endforeach() 34 | 35 | if (_GreenIsland_NOTFOUND_MESSAGE) 36 | set(GreenIsland_NOT_FOUND_MESSAGE "${_GreenIsland_NOTFOUND_MESSAGE}") 37 | set(GreenIsland_FOUND False) 38 | endif() 39 | -------------------------------------------------------------------------------- /src/client/GreenIslandClientConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | find_dependency(Qt5Core @REQUIRED_QT_VERSION@) 4 | find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) 5 | find_dependency(Wayland @REQUIRED_WAYLAND_VERSION@) 6 | 7 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandClientTargets.cmake") 8 | -------------------------------------------------------------------------------- /src/client/compositor.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLANDCLIENT_COMPOSITOR_H 29 | #define GREENISLANDCLIENT_COMPOSITOR_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Client { 38 | 39 | class CompositorPrivate; 40 | class Region; 41 | class Registry; 42 | class Surface; 43 | 44 | class GREENISLANDCLIENT_EXPORT Compositor : public QObject 45 | { 46 | Q_OBJECT 47 | Q_DECLARE_PRIVATE(Compositor) 48 | public: 49 | Surface *createSurface(QObject *parent = Q_NULLPTR); 50 | Region *createRegion(QObject *parent = Q_NULLPTR); 51 | Region *createRegion(const QRegion ®ion, QObject *parent = Q_NULLPTR); 52 | 53 | static QByteArray interfaceName(); 54 | 55 | private: 56 | Compositor(QObject *parent = Q_NULLPTR); 57 | 58 | friend class Registry; 59 | }; 60 | 61 | } // namespace Client 62 | 63 | } // namespace GreenIsland 64 | 65 | #endif // GREENISLANDCLIENT_COMPOSITOR_H 66 | -------------------------------------------------------------------------------- /src/client/outputmanagement.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLANDCLIENT_OUTPUTMANAGEMENT_H 29 | #define GREENISLANDCLIENT_OUTPUTMANAGEMENT_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Client { 38 | 39 | class OutputConfiguration; 40 | class OutputManagementPrivate; 41 | class Registry; 42 | 43 | class GREENISLANDCLIENT_EXPORT OutputManagement : public QObject 44 | { 45 | Q_OBJECT 46 | Q_DECLARE_PRIVATE(OutputManagement) 47 | public: 48 | OutputConfiguration *createConfiguration(QObject *parent = Q_NULLPTR); 49 | 50 | static QByteArray interfaceName(); 51 | 52 | private: 53 | explicit OutputManagement(QObject *parent = Q_NULLPTR); 54 | 55 | friend class Registry; 56 | }; 57 | 58 | } // namespace Client 59 | 60 | } // namespace GreenIsland 61 | 62 | #endif // GREENISLANDCLIENT_OUTPUTMANAGEMENT_H 63 | -------------------------------------------------------------------------------- /src/client/region.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLANDCLIENT_REGION_H 29 | #define GREENISLANDCLIENT_REGION_H 30 | 31 | #include 32 | #include 33 | 34 | #include 35 | 36 | namespace GreenIsland { 37 | 38 | namespace Client { 39 | 40 | class RegionPrivate; 41 | 42 | class GREENISLANDCLIENT_EXPORT Region : public QObject 43 | { 44 | Q_OBJECT 45 | Q_DECLARE_PRIVATE(Region) 46 | public: 47 | Region(const QRegion ®ion, QObject *parent = Q_NULLPTR); 48 | 49 | bool isInitialized() const; 50 | 51 | void add(const QRegion ®ion); 52 | void add(const QRect &rect); 53 | 54 | void subtract(const QRegion ®ion); 55 | void subtract(const QRect &rect); 56 | 57 | static QByteArray interfaceName(); 58 | }; 59 | 60 | } // namespace Client 61 | 62 | } // namespace GreenIsland 63 | 64 | #endif // GREENISLANDCLIENT_REGION_H 65 | -------------------------------------------------------------------------------- /src/client/shmformats_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLANDCLIENT_SHMFORMATS_P_H 29 | #define GREENISLANDCLIENT_SHMFORMATS_P_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | #include 36 | 37 | namespace GreenIsland { 38 | 39 | namespace Client { 40 | 41 | class GREENISLANDCLIENT_EXPORT ShmFormats 42 | { 43 | public: 44 | static wl_shm_format fromQt(QImage::Format format); 45 | static QImage::Format fromWayland(wl_shm_format format); 46 | }; 47 | 48 | } // namespace Client 49 | 50 | } // namespace GreenIsland 51 | 52 | #endif // GREENISLANDCLIENT_SHMFORMATS_P_H 53 | -------------------------------------------------------------------------------- /src/hardwareintegration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(BcmHost_FOUND) 2 | add_subdirectory(brcm-egl) 3 | endif() 4 | add_subdirectory(wayland-egl) 5 | if(X11_FOUND AND X11_Xcomposite_FOUND) 6 | if(EGL_FOUND OR OPENGL_FOUND) 7 | add_subdirectory(xcomposite_share) 8 | endif() 9 | if(EGL_FOUND) 10 | add_subdirectory(xcomposite-egl) 11 | endif() 12 | if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL") 13 | add_subdirectory(xcomposite-glx) 14 | endif() 15 | endif() 16 | -------------------------------------------------------------------------------- /src/hardwareintegration/brcm-egl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 3 | "${CMAKE_CURRENT_SOURCE_DIR}/../waylandcompositor" 4 | "${CMAKE_CURRENT_BINARY_DIR}/.." 5 | "${CMAKE_CURRENT_BINARY_DIR}/../waylandcompositor" 6 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 7 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers/GreenIsland" 8 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 9 | ) 10 | 11 | add_definitions(-DQT_NO_OPENGL_ES_3) 12 | 13 | set(SOURCES 14 | brcmbuffer.cpp 15 | brcmeglintegration.cpp 16 | main.cpp 17 | ) 18 | 19 | greenisland_add_server_protocol(SOURCES 20 | PROTOCOL "${CMAKE_CURRENT_SOURCE_DIR}/data/protocols/qt/brcm.xml" 21 | BASENAME brcm 22 | PREFIX qt_ 23 | ) 24 | 25 | add_library(brcm-egl MODULE ${SOURCES}) 26 | target_link_libraries(brcm-egl 27 | GreenIsland::Compositor 28 | Wayland::Server 29 | Wayland::Egl 30 | BcmHost::BcmHost 31 | BcmHost::EGL 32 | BcmHost::GLESv2) 33 | 34 | install(TARGETS brcm-egl 35 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/hardwareintegration) 36 | -------------------------------------------------------------------------------- /src/hardwareintegration/brcm-egl/brcm-egl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "brcm" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/drm-egl-server/drm-egl-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "drm-egl-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/drm-egl-server/drm-egl-server.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | 3 | contains(QT_CONFIG, no-pkg-config) { 4 | LIBS += -lwayland-server -lEGL 5 | } else { 6 | CONFIG += link_pkgconfig 7 | PKGCONFIG += wayland-server egl 8 | } 9 | 10 | SOURCES += \ 11 | $$PWD/drmeglserverbufferintegration.cpp 12 | 13 | 14 | HEADERS += \ 15 | $$PWD/drmeglserverbufferintegration.h 16 | 17 | CONFIG += wayland-scanner 18 | WAYLANDSERVERSOURCES += $$PWD/../../../extensions/drm-egl-server-buffer.xml 19 | -------------------------------------------------------------------------------- /src/hardwareintegration/libhybris-egl-server/libhybris-egl-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "libhybris-egl-server" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/libhybris-egl-server/libhybris-egl-server.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | 3 | contains(QT_CONFIG, no-pkg-config) { 4 | LIBS += -lwayland-server -lEGL 5 | } else { 6 | CONFIG += link_pkgconfig 7 | PKGCONFIG += wayland-server egl 8 | } 9 | 10 | SOURCES += \ 11 | $$PWD/libhybriseglserverbufferintegration.cpp 12 | 13 | 14 | HEADERS += \ 15 | $$PWD/libhybriseglserverbufferintegration.h 16 | 17 | CONFIG += wayland-scanner 18 | WAYLANDSERVERSOURCES += $$PWD/../../../extensions/libhybris-egl-server-buffer.xml 19 | -------------------------------------------------------------------------------- /src/hardwareintegration/wayland-egl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 3 | "${CMAKE_CURRENT_SOURCE_DIR}/../waylandcompositor" 4 | "${CMAKE_CURRENT_BINARY_DIR}/.." 5 | "${CMAKE_CURRENT_BINARY_DIR}/../waylandcompositor" 6 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 7 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 8 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 9 | ) 10 | 11 | set(SOURCES 12 | main.cpp 13 | waylandeglclientbufferintegration.cpp 14 | ) 15 | 16 | add_library(wayland-egl MODULE ${SOURCES}) 17 | target_link_libraries(wayland-egl 18 | GreenIsland::Compositor 19 | GreenIsland::Platform 20 | Wayland::Server 21 | Wayland::Egl 22 | EGL::EGL) 23 | 24 | install(TARGETS wayland-egl 25 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/hardwareintegration) 26 | -------------------------------------------------------------------------------- /src/hardwareintegration/wayland-egl/wayland-egl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "wayland-egl" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/xcomposite-egl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 3 | "${CMAKE_CURRENT_SOURCE_DIR}/../waylandcompositor" 4 | "${CMAKE_CURRENT_BINARY_DIR}/.." 5 | "${CMAKE_CURRENT_BINARY_DIR}/../waylandcompositor" 6 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 7 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 8 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 9 | ${X11_X11_INCLUDE_PATH} 10 | ${X11_Xcomposite_INCLUDE_PATH} 11 | ) 12 | 13 | set(SOURCES 14 | main.cpp 15 | xcompositeeglintegration.cpp 16 | ) 17 | 18 | add_library(xcomposite-egl MODULE ${SOURCES}) 19 | target_link_libraries(xcomposite-egl 20 | GreenIsland::Compositor 21 | GreenIsland::XComposite 22 | Wayland::Server 23 | ${X11_X11_LIB} 24 | ${X11_Xcomposite_LIB} 25 | EGL::EGL) 26 | 27 | install(TARGETS xcomposite-egl 28 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/hardwareintegration) 29 | -------------------------------------------------------------------------------- /src/hardwareintegration/xcomposite-egl/xcomposite-egl.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "xcomposite-egl" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/xcomposite-glx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 3 | "${CMAKE_CURRENT_SOURCE_DIR}/../waylandcompositor" 4 | "${CMAKE_CURRENT_BINARY_DIR}/.." 5 | "${CMAKE_CURRENT_BINARY_DIR}/../waylandcompositor" 6 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 7 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 8 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 9 | ${X11_X11_INCLUDE_PATH} 10 | ${X11_Xcomposite_INCLUDE_PATH} 11 | ) 12 | 13 | set(SOURCES 14 | main.cpp 15 | xcompositeglxintegration.cpp 16 | ) 17 | 18 | add_library(xcomposite-glx MODULE ${SOURCES}) 19 | target_link_libraries(xcomposite-glx 20 | GreenIsland::Compositor 21 | GreenIsland::XComposite 22 | Wayland::Server 23 | ${X11_X11_LIB} 24 | ${X11_Xcomposite_LIB} 25 | ${OPENGL_LIBRARIES}) 26 | 27 | install(TARGETS xcomposite-glx 28 | DESTINATION ${PLUGIN_INSTALL_DIR}/greenisland/hardwareintegration) 29 | -------------------------------------------------------------------------------- /src/hardwareintegration/xcomposite-glx/xcomposite-glx.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keys": [ "xcomposite-glx" ] 3 | } 4 | -------------------------------------------------------------------------------- /src/hardwareintegration/xcomposite_share/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_SOURCE_DIR}/../../server/GreenIslandServerConfigExtrasLocal.cmake") 2 | include("${CMAKE_CURRENT_SOURCE_DIR}/../../server/GreenIslandServerMacros.cmake") 3 | 4 | include_directories( 5 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 6 | "${CMAKE_CURRENT_SOURCE_DIR}/../waylandcompositor" 7 | "${CMAKE_CURRENT_BINARY_DIR}/.." 8 | "${CMAKE_CURRENT_BINARY_DIR}/../waylandcompositor" 9 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 10 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 11 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 12 | ) 13 | 14 | set(SOURCES 15 | xcompositebuffer.cpp 16 | xcompositehandler.cpp 17 | ) 18 | 19 | greenisland_add_server_protocol(SOURCES 20 | PROTOCOL "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/protocols/wayland/wayland.xml" 21 | BASENAME wayland 22 | PREFIX wl_ 23 | ) 24 | greenisland_add_server_protocol(SOURCES 25 | PROTOCOL "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/protocols/qt/xcomposite.xml" 26 | BASENAME xcomposite 27 | PREFIX qt_ 28 | ) 29 | 30 | add_library(GreenIslandXComposite STATIC ${SOURCES}) 31 | add_library(GreenIsland::XComposite ALIAS GreenIslandXComposite) 32 | target_link_libraries(GreenIslandXComposite 33 | GreenIsland::Compositor 34 | Wayland::Server) 35 | -------------------------------------------------------------------------------- /src/platform/GreenIslandPlatformConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | find_dependency(Qt5Core @REQUIRED_QT_VERSION@) 4 | find_dependency(Qt5DBus @REQUIRED_QT_VERSION@) 5 | find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) 6 | find_dependency(EGL) 7 | 8 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandPlatformTargets.cmake") 9 | -------------------------------------------------------------------------------- /src/platform/deviceintegration/cursor-atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hawaii-desktop/greenisland/088b657a26d5f909bfe42fd7b5fec4d96265afe9/src/platform/deviceintegration/cursor-atlas.png -------------------------------------------------------------------------------- /src/platform/deviceintegration/cursor.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": ":/cursor-atlas.png", 3 | "cursorsPerRow": 8, 4 | "hotSpots": [ 5 | [7, 2], 6 | [12, 3], 7 | [12, 12], 8 | [12, 12], 9 | [12, 12], 10 | [12, 12], 11 | [12, 12], 12 | [12, 12], 13 | [12, 12], 14 | [11, 11], 15 | [12, 12], 16 | [12, 12], 17 | [12, 12], 18 | [9, 1], 19 | [12, 12], 20 | [1, 1], 21 | [1, 1], 22 | [12, 12], 23 | [12, 12], 24 | [7, 2], 25 | [7, 2], 26 | [7, 2] 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/platform/deviceintegration/cursor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | cursor-atlas.png 4 | cursor.json 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/platform/deviceintegration/deviceintegration_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_DEVICEINTEGRATION_P_H 29 | #define GREENISLAND_DEVICEINTEGRATION_P_H 30 | 31 | // 32 | // W A R N I N G 33 | // ------------- 34 | // 35 | // This file is not part of the Green Island API. It exists purely as an 36 | // implementation detail. This header file may change from version to 37 | // version without notice, or even be removed. 38 | // 39 | // We mean it. 40 | // 41 | 42 | namespace GreenIsland { 43 | 44 | namespace Platform { 45 | 46 | class EGLDeviceIntegration; 47 | 48 | class DeviceIntegration 49 | { 50 | public: 51 | DeviceIntegration(); 52 | ~DeviceIntegration(); 53 | 54 | inline EGLDeviceIntegration *integration() const { 55 | return m_integration; 56 | } 57 | 58 | private: 59 | EGLDeviceIntegration *m_integration; 60 | }; 61 | 62 | } // namespace Platform 63 | 64 | } // namespace GreenIsland 65 | 66 | #endif // GREENISLAND_DEVICEINTEGRATION_P_H 67 | -------------------------------------------------------------------------------- /src/platform/deviceintegration/eglfsxkb.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_EGLFSXKB_H 29 | #define GREENISLAND_EGLFSXKB_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | #include 36 | 37 | namespace GreenIsland { 38 | 39 | namespace Platform { 40 | 41 | class GREENISLANDPLATFORM_EXPORT EglFSXkb 42 | { 43 | public: 44 | static int keysymToQtKey(xkb_keysym_t keysym); 45 | static int keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, const QString &text); 46 | static Qt::KeyboardModifiers modifiers(xkb_state *state); 47 | }; 48 | 49 | } // namespace Platform 50 | 51 | } // namespace GreenIsland 52 | 53 | #endif // GREENISLAND_EGLFSXKB_H 54 | -------------------------------------------------------------------------------- /src/platform/libinput/libinputmanager_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_LIBINPUTMANAGER_P_H 29 | #define GREENISLAND_LIBINPUTMANAGER_P_H 30 | 31 | #include 32 | 33 | // 34 | // W A R N I N G 35 | // ------------- 36 | // 37 | // This file is not part of the Green Island API. It exists purely as an 38 | // implementation detail. This header file may change from version to 39 | // version without notice, or even be removed. 40 | // 41 | // We mean it. 42 | // 43 | 44 | namespace GreenIsland { 45 | 46 | namespace Platform { 47 | 48 | class LibInputHandler; 49 | 50 | class LibInputManager : public QObject 51 | { 52 | Q_OBJECT 53 | public: 54 | explicit LibInputManager(QObject *parent = 0); 55 | 56 | LibInputHandler *handler() const; 57 | 58 | private: 59 | LibInputHandler *m_handler; 60 | }; 61 | 62 | } // namespace Platform 63 | 64 | } // namespace GreenIsland 65 | 66 | #endif // GREENISLAND_LIBINPUTMANAGER_P_H 67 | -------------------------------------------------------------------------------- /src/platform/logging.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include "logging.h" 29 | 30 | Q_LOGGING_CATEGORY(lcEglConvenience, "greenisland.qpa.eglconvenience") 31 | Q_LOGGING_CATEGORY(lcDeviceIntegration, "greenisland.qpa.deviceintegration") 32 | Q_LOGGING_CATEGORY(lcInput, "greenisland.qpa.input") 33 | Q_LOGGING_CATEGORY(lcLogind, "greenisland.qpa.logind") 34 | Q_LOGGING_CATEGORY(lcUdev, "greenisland.qpa.udev") 35 | -------------------------------------------------------------------------------- /src/platform/logging.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_LOGGING_H 29 | #define GREENISLAND_LOGGING_H 30 | 31 | #include 32 | 33 | Q_DECLARE_LOGGING_CATEGORY(lcEglConvenience) 34 | Q_DECLARE_LOGGING_CATEGORY(lcDeviceIntegration) 35 | Q_DECLARE_LOGGING_CATEGORY(lcInput) 36 | Q_DECLARE_LOGGING_CATEGORY(lcLogind) 37 | Q_DECLARE_LOGGING_CATEGORY(lcUdev) 38 | 39 | #endif // GREENISLAND_LOGGING_H 40 | -------------------------------------------------------------------------------- /src/platform/logind/vthandler.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_VTHANDLER_H 29 | #define GREENISLAND_VTHANDLER_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Platform { 38 | 39 | class VtHandlerPrivate; 40 | 41 | class GREENISLANDPLATFORM_EXPORT VtHandler : public QObject 42 | { 43 | Q_OBJECT 44 | Q_DECLARE_PRIVATE(VtHandler) 45 | public: 46 | VtHandler(QObject *parent = 0); 47 | 48 | bool isActive() const; 49 | 50 | void activate(quint32 nr); 51 | 52 | Q_SIGNALS: 53 | void created(); 54 | void activeChanged(bool active); 55 | void interrupted(); 56 | void aboutToSuspend(); 57 | void resumed(); 58 | }; 59 | 60 | } // namespace Platform 61 | 62 | } // namespace GreenIsland 63 | 64 | #endif // GREENISLAND_VTHANDLER_H 65 | -------------------------------------------------------------------------------- /src/platform/udev/udev.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_UDEV_H 29 | #define GREENISLAND_UDEV_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Platform { 38 | 39 | class UdevDevice; 40 | class UdevPrivate; 41 | 42 | class GREENISLANDPLATFORM_EXPORT Udev 43 | { 44 | Q_DECLARE_PRIVATE(Udev) 45 | public: 46 | Udev(); 47 | ~Udev(); 48 | 49 | bool isValid() const; 50 | 51 | UdevDevice *deviceFromFileName(const QString &fileName) const; 52 | UdevDevice *deviceFromSubSystemAndName(const QString &subSystem, const QString &name) const; 53 | UdevDevice *deviceFromSysfsPath(const QString &sysfsPath) const; 54 | 55 | private: 56 | UdevPrivate *const d_ptr; 57 | }; 58 | 59 | } // namespace Platform 60 | 61 | } // namespace GreenIsland 62 | 63 | #endif // GREENISLAND_UDEV_H 64 | -------------------------------------------------------------------------------- /src/platform/udev/udev_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_UDEV_P_H 29 | #define GREENISLAND_UDEV_P_H 30 | 31 | extern "C" { 32 | #include 33 | } 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Platform { 38 | 39 | class Udev; 40 | 41 | class UdevPrivate 42 | { 43 | public: 44 | UdevPrivate(); 45 | ~UdevPrivate(); 46 | 47 | static UdevPrivate *get(Udev *u); 48 | 49 | struct udev *udev; 50 | }; 51 | 52 | } // namespace Platform 53 | 54 | } // namespace GreenIsland 55 | 56 | #endif // GREENISLAND_UDEV_P_H 57 | 58 | -------------------------------------------------------------------------------- /src/platform/udev/udevenumerate.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_UDEVENUMERATE_H 29 | #define GREENISLAND_UDEVENUMERATE_H 30 | 31 | #include 32 | 33 | namespace GreenIsland { 34 | 35 | namespace Platform { 36 | 37 | class UdevEnumeratePrivate; 38 | 39 | class GREENISLANDPLATFORM_EXPORT UdevEnumerate 40 | { 41 | Q_DECLARE_PRIVATE(UdevEnumerate) 42 | public: 43 | UdevEnumerate(UdevDevice::DeviceTypes types, Udev *udev); 44 | ~UdevEnumerate(); 45 | 46 | QList scan() const; 47 | 48 | private: 49 | UdevEnumeratePrivate *const d_ptr; 50 | }; 51 | 52 | } // namespace Platform 53 | 54 | } // namespace GreenIsland 55 | 56 | #endif // UDEVENUMERATE_H 57 | -------------------------------------------------------------------------------- /src/server/GreenIslandServerConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | find_dependency(Qt5Core @REQUIRED_QT_VERSION@) 4 | find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) 5 | find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) 6 | find_dependency(Qt5Qml @REQUIRED_QT_VERSION@) 7 | find_dependency(Qt5Quick @REQUIRED_QT_VERSION@) 8 | find_dependency(Wayland @REQUIRED_WAYLAND_VERSION@) 9 | find_dependency(GreenIslandCompositor @PROJECT_VERSION@) 10 | find_dependency(GreenIslandPlatform @PROJECT_VERSION@) 11 | 12 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandServerConfigExtras.cmake") 13 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandServerTargets.cmake") 14 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandServerMacros.cmake") 15 | -------------------------------------------------------------------------------- /src/server/GreenIslandServerConfigExtras.cmake: -------------------------------------------------------------------------------- 1 | if (NOT TARGET GreenIsland::greenisland-wayland-scanner) 2 | add_executable(GreenIsland::greenisland-wayland-scanner IMPORTED) 3 | 4 | set(imported_location "${PACKAGE_PREFIX_DIR}/bin/greenisland-wayland-scanner") 5 | 6 | set_target_properties(GreenIsland::greenisland-wayland-scanner PROPERTIES 7 | IMPORTED_LOCATION ${imported_location} 8 | ) 9 | endif() 10 | 11 | set(GreenIsland_WAYLAND_SCANNER_EXECUTABLE GreenIsland::greenisland-wayland-scanner) 12 | -------------------------------------------------------------------------------- /src/server/GreenIslandServerConfigExtrasLocal.cmake: -------------------------------------------------------------------------------- 1 | # GreenIslandConfigExtras.cmake copy that uses the local target 2 | 3 | set(GreenIsland_WAYLAND_SCANNER_EXECUTABLE GreenIsland::greenisland-wayland-scanner) 4 | -------------------------------------------------------------------------------- /src/server/core/abstractplugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include "abstractplugin.h" 29 | 30 | namespace GreenIsland { 31 | 32 | namespace Server { 33 | 34 | AbstractPlugin::~AbstractPlugin() 35 | { 36 | } 37 | 38 | } // namespace Server 39 | 40 | } // namespace GreenIsland 41 | 42 | #include "moc_abstractplugin.cpp" 43 | -------------------------------------------------------------------------------- /src/server/core/diagnostic_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL2.1+$ 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation, either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program. If not, see . 23 | * 24 | * $END_LICENSE$ 25 | ***************************************************************************/ 26 | 27 | #ifndef GREENISLAND_DIAGNOSTIC_P_H 28 | #define GREENISLAND_DIAGNOSTIC_P_H 29 | 30 | #include 31 | 32 | #include 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace DiagnosticOutput { 38 | 39 | QString systemInformation(); 40 | QString openGlContext(); 41 | QString framework(); 42 | QString environment(); 43 | 44 | } // namespace DiagnosticOutput 45 | 46 | } // namespace GreenIsland 47 | 48 | #endif // GREENISLAND_DIAGNOSTIC_P_H 49 | -------------------------------------------------------------------------------- /src/server/screen/fakescreenbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_FAKESCREENBACKEND_H 29 | #define GREENISLAND_FAKESCREENBACKEND_H 30 | 31 | #include 32 | 33 | namespace GreenIsland { 34 | 35 | namespace Server { 36 | 37 | class GREENISLANDSERVER_EXPORT FakeScreenBackend : public ScreenBackend 38 | { 39 | Q_OBJECT 40 | public: 41 | FakeScreenBackend(QObject *parent = Q_NULLPTR); 42 | 43 | void setConfiguration(const QString &fileName); 44 | 45 | void acquireConfiguration() Q_DECL_OVERRIDE; 46 | 47 | private: 48 | QString m_fileName; 49 | }; 50 | 51 | } // namespace Server 52 | 53 | } // namespace GreenIsland 54 | 55 | #endif // GREENISLAND_FAKESCREENBACKEND_H 56 | -------------------------------------------------------------------------------- /src/server/screen/nativescreenbackend.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_NATIVESCREENBACKEND_H 29 | #define GREENISLAND_NATIVESCREENBACKEND_H 30 | 31 | #include 32 | 33 | class QScreen; 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Server { 38 | 39 | class GREENISLANDSERVER_EXPORT NativeScreenBackend : public ScreenBackend 40 | { 41 | Q_OBJECT 42 | public: 43 | NativeScreenBackend(QObject *parent = Q_NULLPTR); 44 | 45 | void acquireConfiguration() Q_DECL_OVERRIDE; 46 | 47 | private: 48 | bool m_initialized; 49 | 50 | private Q_SLOTS: 51 | void handleScreenAdded(QScreen *qscreen); 52 | void handleScreenRemoved(QScreen *qscreen); 53 | void handleScreenChanged(QScreen *qscreen, Screen *screen); 54 | }; 55 | 56 | } // namespace Server 57 | 58 | } // namespace GreenIsland 59 | 60 | #endif // GREENISLAND_NATIVESCREENBACKEND_H 61 | -------------------------------------------------------------------------------- /src/server/screen/quickscreenmanager.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include "quickscreenmanager.h" 29 | 30 | namespace GreenIsland { 31 | 32 | namespace Server { 33 | 34 | QuickScreenManager::QuickScreenManager(QObject *parent) 35 | : ScreenManager(parent) 36 | { 37 | } 38 | 39 | void QuickScreenManager::create() 40 | { 41 | ScreenManager::create(); 42 | } 43 | 44 | void QuickScreenManager::classBegin() 45 | { 46 | } 47 | 48 | void QuickScreenManager::componentComplete() 49 | { 50 | create(); 51 | } 52 | 53 | } // namespace Server 54 | 55 | } // namespace GreenIsland 56 | 57 | #include "moc_quickscreenmanager.cpp" 58 | -------------------------------------------------------------------------------- /src/server/screen/quickscreenmanager.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_QUICKSCREENMANAGER_H 29 | #define GREENISLAND_QUICKSCREENMANAGER_H 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace GreenIsland { 36 | 37 | namespace Server { 38 | 39 | class GREENISLANDSERVER_EXPORT QuickScreenManager : public ScreenManager, public QQmlParserStatus 40 | { 41 | Q_INTERFACES(QQmlParserStatus) 42 | Q_OBJECT 43 | public: 44 | QuickScreenManager(QObject *parent = Q_NULLPTR); 45 | 46 | void create() Q_DECL_OVERRIDE; 47 | 48 | protected: 49 | void classBegin() Q_DECL_OVERRIDE; 50 | void componentComplete() Q_DECL_OVERRIDE; 51 | }; 52 | 53 | } // namespace Server 54 | 55 | } // namespace GreenIsland 56 | 57 | #endif // GREENISLAND_QUICKSCREENMANAGER_H 58 | -------------------------------------------------------------------------------- /src/server/screen/screenmanager.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_SCREENMANAGER_H 29 | #define GREENISLAND_SCREENMANAGER_H 30 | 31 | #include 32 | 33 | namespace GreenIsland { 34 | 35 | namespace Server { 36 | 37 | class ScreenManagerPrivate; 38 | 39 | class GREENISLANDSERVER_EXPORT ScreenManager : public QObject 40 | { 41 | Q_OBJECT 42 | Q_DECLARE_PRIVATE(ScreenManager) 43 | Q_PROPERTY(Screen *primaryScreen READ primaryScreen NOTIFY primaryScreenChanged) 44 | public: 45 | ScreenManager(QObject *parent = Q_NULLPTR); 46 | 47 | Screen *primaryScreen() const; 48 | 49 | Q_INVOKABLE int indexOf(Screen *screen) const; 50 | 51 | virtual void create(); 52 | 53 | Q_SIGNALS: 54 | void screenAdded(Screen *screen); 55 | void screenRemoved(Screen *screen); 56 | void primaryScreenChanged(Screen *screen); 57 | }; 58 | 59 | } // namespace Server 60 | 61 | } // namespace GreenIsland 62 | 63 | #endif // GREENISLAND_SCREENMANAGER_H 64 | -------------------------------------------------------------------------------- /src/server/serverlogging_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef GREENISLAND_SERVERLOGGING_H 29 | #define GREENISLAND_SERVERLOGGING_H 30 | 31 | #include 32 | 33 | Q_DECLARE_LOGGING_CATEGORY(gLcCore) 34 | Q_DECLARE_LOGGING_CATEGORY(gLcOutputManagement) 35 | Q_DECLARE_LOGGING_CATEGORY(gLcGtkShell) 36 | Q_DECLARE_LOGGING_CATEGORY(gLcGtkShellTrace) 37 | Q_DECLARE_LOGGING_CATEGORY(gLcScreencaster) 38 | Q_DECLARE_LOGGING_CATEGORY(gLcScreenshooter) 39 | Q_DECLARE_LOGGING_CATEGORY(gLcTaskManager) 40 | Q_DECLARE_LOGGING_CATEGORY(gLcXdgShell) 41 | Q_DECLARE_LOGGING_CATEGORY(gLcXdgShellTrace) 42 | Q_DECLARE_LOGGING_CATEGORY(gLcScreenBackend) 43 | Q_DECLARE_LOGGING_CATEGORY(gLcFakeScreenBackend) 44 | Q_DECLARE_LOGGING_CATEGORY(gLcNativeScreenBackend) 45 | 46 | #endif // GREENISLAND_SERVERLOGGING_H 47 | -------------------------------------------------------------------------------- /src/waylandcompositor/GreenIslandCompositorConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | find_dependency(Qt5Core @REQUIRED_QT_VERSION@) 4 | find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) 5 | find_dependency(Qt5Qml @REQUIRED_QT_VERSION@) 6 | find_dependency(Qt5Quick @REQUIRED_QT_VERSION@) 7 | find_dependency(Wayland @REQUIRED_WAYLAND_VERSION@) 8 | 9 | include("${CMAKE_CURRENT_LIST_DIR}/GreenIslandCompositorTargets.cmake") 10 | -------------------------------------------------------------------------------- /src/waylandcompositor/compositor_api/qwaylandresource.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 Klarälvdalens Datakonsult AB (KDAB). 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the QtWaylandCompositor module of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL3$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 3 as published by the Free Software 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the 21 | ** packaging of this file. Please review the following information to 22 | ** ensure the GNU Lesser General Public License version 3 requirements 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. 24 | ** 25 | ** GNU General Public License Usage 26 | ** Alternatively, this file may be used under the terms of the GNU 27 | ** General Public License version 2.0 or later as published by the Free 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in 29 | ** the packaging of this file. Please review the following information to 30 | ** ensure the GNU General Public License version 2.0 requirements will be 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. 32 | ** 33 | ** $QT_END_LICENSE$ 34 | ** 35 | ****************************************************************************/ 36 | 37 | #include "qwaylandresource.h" 38 | 39 | QT_BEGIN_NAMESPACE 40 | 41 | QWaylandResource::QWaylandResource() 42 | : m_resource(0) 43 | { 44 | } 45 | 46 | QWaylandResource::QWaylandResource(wl_resource *resource) 47 | : m_resource(resource) 48 | { 49 | } 50 | 51 | QT_END_NAMESPACE 52 | -------------------------------------------------------------------------------- /src/waylandcompositor/extensions/qwaylandshellsurface.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 Pier Luigi Fiorini 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the QtWaylandCompositor module of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL3$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 3 as published by the Free Software 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the 21 | ** packaging of this file. Please review the following information to 22 | ** ensure the GNU Lesser General Public License version 3 requirements 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. 24 | ** 25 | ** GNU General Public License Usage 26 | ** Alternatively, this file may be used under the terms of the GNU 27 | ** General Public License version 2.0 or later as published by the Free 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in 29 | ** the packaging of this file. Please review the following information to 30 | ** ensure the GNU General Public License version 2.0 requirements will be 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. 32 | ** 33 | ** $QT_END_LICENSE$ 34 | ** 35 | ****************************************************************************/ 36 | 37 | #include "moc_qwaylandshellsurface.cpp" 38 | -------------------------------------------------------------------------------- /src/waylandcompositor/hardware_integration/qwlclientbufferintegration.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the QtWaylandCompositor module of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL3$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 3 as published by the Free Software 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the 21 | ** packaging of this file. Please review the following information to 22 | ** ensure the GNU Lesser General Public License version 3 requirements 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. 24 | ** 25 | ** GNU General Public License Usage 26 | ** Alternatively, this file may be used under the terms of the GNU 27 | ** General Public License version 2.0 or later as published by the Free 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in 29 | ** the packaging of this file. Please review the following information to 30 | ** ensure the GNU General Public License version 2.0 requirements will be 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. 32 | ** 33 | ** $QT_END_LICENSE$ 34 | ** 35 | ****************************************************************************/ 36 | 37 | #include "qwlclientbufferintegration_p.h" 38 | 39 | QT_BEGIN_NAMESPACE 40 | 41 | namespace QtWayland { 42 | 43 | ClientBufferIntegration::ClientBufferIntegration() 44 | : m_compositor(0) 45 | { 46 | } 47 | 48 | } 49 | 50 | QT_END_NAMESPACE 51 | -------------------------------------------------------------------------------- /src/waylandcompositor/hardware_integration/qwlclientbufferintegrationplugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the QtWaylandCompositor module of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL3$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 3 as published by the Free Software 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the 21 | ** packaging of this file. Please review the following information to 22 | ** ensure the GNU Lesser General Public License version 3 requirements 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. 24 | ** 25 | ** GNU General Public License Usage 26 | ** Alternatively, this file may be used under the terms of the GNU 27 | ** General Public License version 2.0 or later as published by the Free 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in 29 | ** the packaging of this file. Please review the following information to 30 | ** ensure the GNU General Public License version 2.0 requirements will be 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. 32 | ** 33 | ** $QT_END_LICENSE$ 34 | ** 35 | ****************************************************************************/ 36 | 37 | #include "qwlclientbufferintegrationplugin_p.h" 38 | 39 | QT_BEGIN_NAMESPACE 40 | 41 | namespace QtWayland { 42 | 43 | ClientBufferIntegrationPlugin::ClientBufferIntegrationPlugin(QObject *parent) : 44 | QObject(parent) 45 | { 46 | } 47 | 48 | ClientBufferIntegrationPlugin::~ClientBufferIntegrationPlugin() 49 | { 50 | } 51 | 52 | } 53 | 54 | QT_END_NAMESPACE 55 | -------------------------------------------------------------------------------- /src/waylandcompositor/hardware_integration/qwlserverbufferintegrationplugin.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the QtWaylandCompositor module of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL3$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 3 as published by the Free Software 20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the 21 | ** packaging of this file. Please review the following information to 22 | ** ensure the GNU Lesser General Public License version 3 requirements 23 | ** will be met: https://www.gnu.org/licenses/lgpl.html. 24 | ** 25 | ** GNU General Public License Usage 26 | ** Alternatively, this file may be used under the terms of the GNU 27 | ** General Public License version 2.0 or later as published by the Free 28 | ** Software Foundation and appearing in the file LICENSE.GPL included in 29 | ** the packaging of this file. Please review the following information to 30 | ** ensure the GNU General Public License version 2.0 requirements will be 31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html. 32 | ** 33 | ** $QT_END_LICENSE$ 34 | ** 35 | ****************************************************************************/ 36 | 37 | #include "qwlserverbufferintegrationplugin_p.h" 38 | 39 | QT_BEGIN_NAMESPACE 40 | 41 | namespace QtWayland { 42 | 43 | ServerBufferIntegrationPlugin::ServerBufferIntegrationPlugin(QObject *parent) : 44 | QObject(parent) 45 | { 46 | } 47 | 48 | ServerBufferIntegrationPlugin::~ServerBufferIntegrationPlugin() 49 | { 50 | } 51 | 52 | } 53 | 54 | QT_END_NAMESPACE 55 | 56 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface.vert: -------------------------------------------------------------------------------- 1 | uniform highp mat4 qt_Matrix; 2 | attribute highp vec2 qt_VertexPosition; 3 | attribute highp vec2 qt_VertexTexCoord; 4 | varying highp vec2 v_texcoord; 5 | 6 | void main() { 7 | gl_Position = qt_Matrix * vec4(qt_VertexPosition, 0.0, 1.0); 8 | v_texcoord = qt_VertexTexCoord; 9 | } 10 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_oes_external.frag: -------------------------------------------------------------------------------- 1 | #extension GL_OES_EGL_image_external : require 2 | varying highp vec2 v_texcoord; 3 | uniform highp samplerExternalOES tex0; 4 | uniform lowp float qt_Opacity; 5 | 6 | void main() { 7 | gl_FragColor = qt_Opacity * texture2D(tex0, v_texcoord); 8 | } 9 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_rgba.frag: -------------------------------------------------------------------------------- 1 | varying highp vec2 v_texcoord; 2 | uniform highp sampler2D tex0; 3 | uniform lowp float qt_Opacity; 4 | 5 | void main() { 6 | gl_FragColor = qt_Opacity * texture2D(tex0, v_texcoord); 7 | } 8 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_rgbx.frag: -------------------------------------------------------------------------------- 1 | varying highp vec2 v_texcoord; 2 | uniform highp sampler2D tex0; 3 | uniform lowp float qt_Opacity; 4 | 5 | void main() { 6 | gl_FragColor.rgb = qt_Opacity * texture2D(tex0, v_texcoord).rgb; 7 | gl_FragColor.a = qt_Opacity; 8 | } 9 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_y_u_v.frag: -------------------------------------------------------------------------------- 1 | uniform highp sampler2D tex0; 2 | uniform highp sampler2D tex1; 3 | uniform highp sampler2D tex2; 4 | varying highp vec2 v_texcoord; 5 | uniform lowp float qt_Opacity; 6 | 7 | void main() { 8 | float y = 1.16438356 * (texture2D(tex0, v_texcoord).x - 0.0625); 9 | float u = texture2D(tex1, v_texcoord).x - 0.5; 10 | float v = texture2D(tex2, v_texcoord).x - 0.5; 11 | y *= qt_Opacity; 12 | u *= qt_Opacity; 13 | v *= qt_Opacity; 14 | gl_FragColor.r = y + 1.59602678 * v; 15 | gl_FragColor.g = y - 0.39176229 * u - 0.81296764 * v; 16 | gl_FragColor.b = y + 2.01723214 * u; 17 | gl_FragColor.a = qt_Opacity; 18 | } 19 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_y_uv.frag: -------------------------------------------------------------------------------- 1 | uniform highp sampler2D tex0; 2 | uniform highp sampler2D tex1; 3 | varying highp vec2 v_texcoord; 4 | uniform lowp float qt_Opacity; 5 | 6 | void main() { 7 | float y = 1.16438356 * (texture2D(tex0, v_texcoord).x - 0.0625); 8 | float u = texture2D(tex1, v_texcoord).r - 0.5; 9 | float v = texture2D(tex1, v_texcoord).g - 0.5; 10 | y *= qt_Opacity; 11 | u *= qt_Opacity; 12 | v *= qt_Opacity; 13 | gl_FragColor.r = y + 1.59602678 * v; 14 | gl_FragColor.g = y - 0.39176229 * u - 0.81296764 * v; 15 | gl_FragColor.b = y + 2.01723214 * u; 16 | gl_FragColor.a = qt_Opacity; 17 | } 18 | -------------------------------------------------------------------------------- /src/waylandcompositor/shaders/surface_y_xuxv.frag: -------------------------------------------------------------------------------- 1 | uniform highp sampler2D tex0; 2 | uniform highp sampler2D tex1; 3 | varying highp vec2 v_texcoord; 4 | uniform lowp float qt_Opacity; 5 | 6 | void main() { 7 | float y = 1.16438356 * (texture2D(tex0, v_texcoord).x - 0.0625); 8 | float u = texture2D(tex1, v_texcoord).g - 0.5; 9 | float v = texture2D(tex1, v_texcoord).a - 0.5; 10 | y *= qt_Opacity; 11 | u *= qt_Opacity; 12 | v *= qt_Opacity; 13 | gl_FragColor.r = y + 1.59602678 * v; 14 | gl_FragColor.g = y - 0.39176229 * u - 0.81296764 * v; 15 | gl_FragColor.b = y + 2.01723214 * u; 16 | gl_FragColor.a = qt_Opacity; 17 | } 18 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(ECMMarkAsTest) 2 | 3 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test QuickTest) 4 | 5 | add_subdirectory(auto) 6 | add_subdirectory(manual) 7 | -------------------------------------------------------------------------------- /tests/auto/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(client) 2 | add_subdirectory(platform) 3 | -------------------------------------------------------------------------------- /tests/auto/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 4 | ${Qt5Core_PRIVATE_INCLUDE_DIRS} 5 | ) 6 | 7 | add_executable(tst_client_display tst_display.cpp) 8 | target_link_libraries(tst_client_display 9 | Qt5::Test 10 | GreenIsland::Compositor 11 | GreenIsland::Client) 12 | add_test(greenisland-test-client-display tst_client_display) 13 | ecm_mark_as_test(tst_client_display) 14 | 15 | add_executable(tst_client_output tst_output.cpp) 16 | target_link_libraries(tst_client_output 17 | Qt5::Test 18 | GreenIsland::Client 19 | GreenIsland::Compositor) 20 | add_test(greenisland-test-client-output tst_client_output) 21 | ecm_mark_as_test(tst_client_output) 22 | 23 | add_executable(tst_client_registry tst_registry.cpp) 24 | target_link_libraries(tst_client_registry 25 | Qt5::Test 26 | GreenIsland::Client 27 | GreenIsland::Compositor 28 | GreenIsland::Server) 29 | add_test(greenisland-test-client-registry tst_client_registry) 30 | ecm_mark_as_test(tst_client_registry) 31 | 32 | add_executable(tst_client_shmpool tst_shmpool.cpp) 33 | target_link_libraries(tst_client_shmpool 34 | Qt5::Test 35 | GreenIsland::Client 36 | GreenIsland::Compositor) 37 | add_test(greenisland-test-client-shmpool tst_client_shmpool) 38 | ecm_mark_as_test(tst_client_shmpool) 39 | -------------------------------------------------------------------------------- /tests/auto/platform/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 4 | ) 5 | 6 | add_executable(tst_logind fakelogind.cpp tst_logind.cpp) 7 | target_link_libraries(tst_logind Qt5::Test GreenIsland::Platform) 8 | add_test(greenisland-test-logind tst_logind) 9 | ecm_mark_as_test(tst_logind) 10 | 11 | add_executable(tst_udev tst_udev.cpp) 12 | target_link_libraries(tst_udev Qt5::Test GreenIsland::Platform) 13 | add_test(greenisland-test-udev tst_udev) 14 | ecm_mark_as_test(tst_udev) 15 | -------------------------------------------------------------------------------- /tests/manual/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(platform) 2 | -------------------------------------------------------------------------------- /tests/manual/platform/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers" 3 | "${CMAKE_CURRENT_BINARY_DIR}/../../../headers/GreenIsland" 4 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 5 | ) 6 | 7 | add_executable(tst_libinput tst_libinput.cpp) 8 | target_link_libraries(tst_libinput GreenIsland::Platform) 9 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(screencaster) 2 | add_subdirectory(waylandscanner) 3 | -------------------------------------------------------------------------------- /tools/screencaster/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/../../src" 4 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} 5 | ) 6 | 7 | set(SOURCES 8 | main.cpp 9 | application.cpp 10 | recorder.cpp 11 | ) 12 | 13 | add_executable(greenisland-screencaster ${SOURCES}) 14 | target_link_libraries(greenisland-screencaster GreenIsland::Client) 15 | 16 | install(TARGETS greenisland-screencaster DESTINATION ${BIN_INSTALL_DIR}) 17 | -------------------------------------------------------------------------------- /tools/screencaster/recorder.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #include 29 | #include 30 | 31 | #include "recorder.h" 32 | 33 | #define VIDEO_MAGIC 0x47434150 34 | 35 | Recorder::Recorder(const QString &fileName) 36 | { 37 | // Create the file 38 | m_file = new QFile(fileName); 39 | 40 | // Prepare the stream 41 | m_stream.setByteOrder(QDataStream::LittleEndian); 42 | m_stream.setVersion(QDataStream::Qt_5_0); 43 | m_stream << quint32(VIDEO_MAGIC); 44 | } 45 | 46 | Recorder::~Recorder() 47 | { 48 | if (m_file->isOpen()) 49 | m_file->close(); 50 | delete m_file; 51 | } 52 | 53 | bool Recorder::open() 54 | { 55 | bool result = m_file->open(QFile::WriteOnly | QFile::Truncate); 56 | if (result) 57 | m_stream.setDevice(m_file); 58 | return result; 59 | } 60 | 61 | void Recorder::write(quint32 time, const QSize &size, 62 | qint32 stride, const QImage &image) 63 | { 64 | m_stream << time << size << stride << image.bits(); 65 | } 66 | -------------------------------------------------------------------------------- /tools/screencaster/recorder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * This file is part of Hawaii. 3 | * 4 | * Copyright (C) 2015-2016 Pier Luigi Fiorini 5 | * 6 | * Author(s): 7 | * Pier Luigi Fiorini 8 | * 9 | * $BEGIN_LICENSE:LGPL$ 10 | * 11 | * This file may be used under the terms of the GNU Lesser General Public 12 | * License version 2.1 or later as published by the Free Software Foundation 13 | * and appearing in the file LICENSE.LGPLv21 included in the packaging of 14 | * this file. Please review the following information to ensure the 15 | * GNU Lesser General Public License version 2.1 requirements will be 16 | * met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 17 | * 18 | * Alternatively, this file may be used under the terms of the GNU General 19 | * Public License version 2.0 or later as published by the Free Software 20 | * Foundation and appearing in the file LICENSE.GPLv2 included in the 21 | * packaging of this file. Please review the following information to ensure 22 | * the GNU General Public License version 2.0 requirements will be 23 | * met: http://www.gnu.org/licenses/gpl-2.0.html. 24 | * 25 | * $END_LICENSE$ 26 | ***************************************************************************/ 27 | 28 | #ifndef RECORDER_H 29 | #define RECORDER_H 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | class Recorder 36 | { 37 | public: 38 | Recorder(const QString &fileName); 39 | ~Recorder(); 40 | 41 | bool open(); 42 | 43 | void write(quint32 time, const QSize &size, 44 | qint32 stride, const QImage &image); 45 | 46 | private: 47 | QDataStream m_stream; 48 | QFile *m_file; 49 | }; 50 | 51 | #endif // RECORDER_H 52 | -------------------------------------------------------------------------------- /tools/waylandscanner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | "${CMAKE_CURRENT_BINARY_DIR}/../../headers" 3 | ) 4 | 5 | add_executable(greenisland-wayland-scanner waylandscanner.cpp) 6 | target_link_libraries(greenisland-wayland-scanner Qt5::Core) 7 | add_executable(GreenIsland::greenisland-wayland-scanner ALIAS greenisland-wayland-scanner) 8 | 9 | install(TARGETS greenisland-wayland-scanner 10 | DESTINATION ${BIN_INSTALL_DIR} 11 | COMPONENT Devel) 12 | --------------------------------------------------------------------------------