-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
421: wayland_spinner r=gerboland a=AlanGriffiths Re-instate the "spinner" when starting miral-shell (re-implementing it in Wayland) This builds on two PRs that haven't landed yet: o Conceal the full type of the "Splash" from the window management policy (#417) o Launcher for internal Wayland clients (#416) Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
- Loading branch information
Showing
15 changed files
with
1,153 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# -*- Mode: CMake; indent-tabs-mode: nil; tab-width: 2 -*- | ||
# | ||
# Copyright © 2014 Canonical Ltd. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License version 3 as | ||
# published by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client) | ||
pkg_check_modules(GLIB REQUIRED glib-2.0) | ||
find_package(GLESv2 REQUIRED) | ||
find_package(PIL REQUIRED) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overlength-strings") | ||
|
||
|
||
function(png2header png header varname) | ||
add_custom_command( | ||
OUTPUT ${header} | ||
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/png2header.py ${png} ${varname} > ${header} | ||
DEPENDS ${png} ${CMAKE_CURRENT_SOURCE_DIR}/png2header.py | ||
) | ||
endfunction() | ||
|
||
png2header( | ||
${CMAKE_CURRENT_SOURCE_DIR}/spinner-glow.png | ||
${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h | ||
spinner_glow | ||
) | ||
|
||
png2header( | ||
${CMAKE_CURRENT_SOURCE_DIR}/spinner-logo.png | ||
${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h | ||
spinner_logo | ||
) | ||
|
||
include_directories( | ||
${PROJECT_SOURCE_DIR}/include/client | ||
${GLIB_INCLUDE_DIRS} | ||
${GLESv2_INCLUDE_DIRS} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
add_library(miral-spinner STATIC | ||
eglapp.cpp | ||
eglapp.h | ||
eglspinner.cpp | ||
miregl.h | ||
miregl.cpp | ||
splash.h | ||
${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h | ||
${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h | ||
) | ||
|
||
pkg_check_modules(WAYLAND_EGL REQUIRED wayland-egl) | ||
|
||
target_link_libraries(miral-spinner | ||
example-shell-lib | ||
mirclientcpp | ||
EGL | ||
${WAYLAND_EGL_LDFLAGS} ${WAYLAND_EGL_LIBRARIES} | ||
${GLIB_LDFLAGS} | ||
${GLESv2_LIBRARIES} | ||
${MIRCLIENT_LDFLAGS} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright © 2013-2018 Canonical Ltd. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* under the terms of the GNU General Public License version 2 or 3 as as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "eglapp.h" | ||
|
||
#include "miregl.h" | ||
|
||
std::vector<std::shared_ptr<MirEglSurface>> mir_eglapp_init(struct wl_display* display) | ||
{ | ||
auto const mir_egl_app = make_mir_eglapp(display); | ||
|
||
return mir_surface_init(mir_egl_app); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright © 2013 Canonical Ltd. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* under the terms of the GNU General Public License version 2 or 3 as as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Author: Daniel van Vugt <daniel.van.vugt@canonical.com> | ||
*/ | ||
|
||
#ifndef __EGLAPP_H__ | ||
#define __EGLAPP_H__ | ||
|
||
#include <memory> | ||
#include <vector> | ||
|
||
class MirEglSurface; | ||
|
||
extern float mir_eglapp_background_opacity; | ||
|
||
std::vector<std::shared_ptr<MirEglSurface>> mir_eglapp_init(struct wl_display* display); | ||
|
||
#endif |
Oops, something went wrong.