Skip to content

Commit

Permalink
[lipstick] Restore API for window properties and add new for closing …
Browse files Browse the repository at this point in the history
…windows. Contributes to JB#42170
  • Loading branch information
adenexter committed Sep 6, 2018
1 parent 7dcdbbc commit 4edfbc5
Show file tree
Hide file tree
Showing 35 changed files with 2,488 additions and 636 deletions.
44 changes: 21 additions & 23 deletions doc/doc.pro
@@ -1,33 +1,31 @@
# Stupid qmake wants to link everything.
QMAKE_LINK = @: IGNORE THIS LINE
TEMPLATE = aux

QMAKE_EXTRA_TARGETS += doc notification_doc
QMAKE_EXTRA_COMPILER += doc notification_doc
lipstick_doc.config += no_check_exist no_link explicit_dependencies
lipstick_doc.commands = doxygen $$PWD/doxygen.cfg
lipstick_doc.input = $$PWD/doxygen.cfg
lipstick_doc.output = $$OUT_PWD/html/index.html

doc.target = html/index.html
doc.config += no_check_exist no_link explicit_dependencies
doc.commands = doxygen doxygen.cfg
doc.input = $${doc.depends}
doc.output = $${doc.target}

notification_doc.target = notifications/html/index.html
notification_doc.config += no_check_exist no_link explicit_dependencies
notification_doc.commands = doxygen notifications/doxygen.cfg
notification_doc.input = $${notification_doc.depends}
notification_doc.output = $${notification_doc.target}

## Make are doc target build by default If 'make' is executed in doc folder
PRE_TARGETDEPS += $${doc.output} $${notification_doc.output}
notification_doc.commands = doxygen $$PWD/notifications/doxygen.cfg
notification_doc.input = $$PWD/notifications/doxygen.cfg
notification_doc.output = $$OUT_PWD/notifications/html/index.html

# Install rules
htmldocs.files = html/*
htmldocs.path = /usr/share/doc/lipstick
htmldocs.files = \
lipstick \
lipstick-notification
htmldocs.path = /usr/share/doc
htmldocs.CONFIG += no_check_exist

notification_htmldocs.files = notifications/html/*
notification_htmldocs.path = /usr/share/doc/lipstick-notification
notification_htmldocs.CONFIG += no_check_exist
QMAKE_EXTRA_COMPILERS += \
lipstick_doc \
notification_doc

QMAKE_EXTRA_TARGETS += \
lipstick_doc \
notification_doc

INSTALLS += htmldocs notification_htmldocs
INSTALLS += \
htmldocs \

OTHER_FILES = src/*.dox
2 changes: 1 addition & 1 deletion doc/doxygen.cfg
Expand Up @@ -872,7 +872,7 @@ GENERATE_HTML = YES
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.

HTML_OUTPUT = html
HTML_OUTPUT = lipstick

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
Expand Down
2 changes: 1 addition & 1 deletion doc/notifications/doxygen.cfg
Expand Up @@ -872,7 +872,7 @@ GENERATE_HTML = YES
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.

HTML_OUTPUT = notifications/html
HTML_OUTPUT = lipstick-notification

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
Expand Down
3 changes: 3 additions & 0 deletions plugin/lipstickplugin.cpp
Expand Up @@ -30,6 +30,7 @@
#include <compositor/lipstickcompositorwindow.h>
#include <compositor/windowmodel.h>
#include <compositor/windowpixmapitem.h>
#include <compositor/windowpropertymap.h>
#include <lipstickapi.h>
#include <hwcimage.h>

Expand Down Expand Up @@ -70,6 +71,8 @@ void LipstickPlugin::registerTypes(const char *uri)

qmlRegisterType<LipstickCompositorWindow>();
qmlRegisterType<QObjectListModel>();
qmlRegisterType<WindowPropertyMap>();
qmlRegisterType<QWaylandKeymap>();

qmlRegisterRevision<QQuickWindow,1>("org.nemomobile.lipstick", 0, 1);
}
218 changes: 218 additions & 0 deletions protocol/alien-manager.xml
@@ -0,0 +1,218 @@
<protocol name="alien_manager">
<copyright>
Copyright (C) 2014 Jolla Ltd.

Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
the copyright holders not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. The copyright holders make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied
warranty.

THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
</copyright>

<interface name="alien_manager" version="1">
<description summary="manager interface for alien clients">
This global interface is used by alien clients to integrate
with the shell.
</description>

<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy this alien_manager. All its alien_client children
are inactive and should be destroyed by the client.
</description>
</request>

<request name="create_alien_client">
<description summary="create a new alien_client handle">
This request creates a new alien_client. For each
alien_client there should be a real alien application
associated with it.
The package parameter should be the android package of
the external application.
</description>
<arg name="id" type="new_id" interface="alien_client"/>
<arg name="package" type="string"/>
</request>

<request name="pong">
<description summary="respond to a ping event">
A client must respond to a ping event with a pong request or
the client may be deemed unresponsive.
</description>
<arg name="serial" type="uint"/>
</request>

<event name="ping">
<description summary="ping client">
A client must respond to a ping event with a pong request or
the client may be deemed unresponsive.
</description>
<arg name="serial" type="uint"/>
</event>
</interface>

<interface name="alien_client" version="1">
<description summary="alien client metadata interface">
Interface used to associate one or more wl_surfaces with an
external alien application.
</description>

<request name="destroy" type="destructor">
<description summary="destroy this alien_client">
Destroy this alien_client. All its alien_surface children
are unmapped and become inactive and should be destroyed
by the client.
</description>
</request>

<request name="get_alien_surface">
<description summary="create a new alien_surface">
Extend 'surface' with the alien_surface role.

If the surface has a role already a protocol error will
be raised.
</description>
<arg name="id" type="new_id" interface="alien_surface"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>

<event name="oom_score">
<description summary="the oom score for the client">
After receiving this event the client should set the
oom score for the real application to the given value.
</description>
<arg name="score" type="int"/>
</event>
</interface>

<interface name="alien_surface" version="1">
<description summary="main window interface for alien clients">
This interface extends a basic wl_surface with additional metadata
needed to map it on screen.

If its wl_surface is destroyed, an alien_surface becomes inactive
but will not be automatically destroyed.
</description>

<request name="destroy" type="destructor">
<description summary="delete surface">
Deletes the surface and invalidates its object ID.

The wl_surface loses its role, and all the associated properties.
The surface is unmapped.
</description>
</request>

<request name="set_title">
<description summary="set surface title">
Set a short title for the surface.

This string may be used to identify the surface in a task bar,
window list, or other user interface elements provided by the
compositor.

The string must be encoded in UTF-8.
</description>
<arg name="title" type="string"/>
</request>

<enum name="state">
<description summary="types of state on the surface">
The different state values used on the surface. They are paired with
the configure event to ensure that both the client and the compositor
setting the state can be synchronized.

States set in this way are double-buffered. They will get applied on
the next commit.
</description>
<entry name="hidden" value="1" summary="the surface is not visible">
The surface is hidden, it should stop drawing and free memory
if possible.
</entry>
<entry name="cover" value="2" summary="the surface is used as a cover">
The surface is being used as a non-fullscreen cover, and cannot
receive input.
</entry>
</enum>

<event name="configure">
<description summary="suggest a surface change">
The configure event asks the client to resize its surface.

The width and height arguments specify a hint to the window
about how its surface should be resized in surface local
coordinates. The states listed in the event specify additional
information about the surface.

A client should send an ack_configure request with the serial
sent in this configure event before attaching a new buffer.

If the client receives multiple configure events before it
can respond to one, it is free to discard all but the last
event it received.
</description>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
<arg name="states" type="array"/>
<arg name="serial" type="uint"/>
</event>

<request name="ack_configure">
<description summary="ack a configure event">
When a configure event is received, a client should then ack it
using the ack_configure request to ensure that the compositor
knows the client has seen the event.

By this point, the state is confirmed, and the next attach should
contain the buffer drawn for the configure event you are acking.
</description>
<arg name="serial" type="uint"/>
</request>

<request name="request_state">
<description summary="request a surface change">
Ask the compositor to send a configure event with the
requested states. The compositor is free to ignore the
request, or to send a different states value than the
one requested.
The value of the 'serial' argument should be the last serial
the client received in an event.
</description>
<arg name="states" type="array"/>
<arg name="serial" type="uint" summary="serial for focus stealing prevenction"/>
</request>

<request name="set_minimized">
<description summary="ask the server to minimize the surface">
By calling this request the client asks the compositor to minimize
this surface. The actual behavior is compositor specific, the client
should not assume this surface is going to be unmapped.
</description>
</request>

<event name="close">
<description summary="request to close this surface">
This event requests the client to destroy this surface. The client is
free to choose if it wants to quit or to just destroy this surface and
keep running, however if the client ignores the request or takes too
much time to destroy the surface the server may decide to forcefully
kill it.
</description>
</event>
</interface>
</protocol>
19 changes: 4 additions & 15 deletions rpm/lipstick-qt5.spec
Expand Up @@ -40,9 +40,10 @@ BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(usb-moded-qt5) >= 1.6
BuildRequires: pkgconfig(systemsettings)
BuildRequires: pkgconfig(nemodevicelock)
BuildRequires: pkgconfig(ssu-sysinfo)
BuildRequires: qt5-qttools-linguist
BuildRequires: qt5-qtgui-devel >= 5.2.1+git24
BuildRequires: qt5-qtwayland-wayland_egl-devel >= 5.4.0+git26
BuildRequires: qt5-qtwayland-compositor-devel >= 5.9.5
BuildRequires: doxygen
BuildRequires: qt5-qttools-qthelp-devel
Conflicts: meegotouch-systemui < 1.5.7
Expand All @@ -56,6 +57,7 @@ A QML toolkit for homescreen creation
Summary: Development files for lipstick
License: LGPLv2.1
Requires: %{name} = %{version}-%{release}
Requires: qt5-qtwayland-compositor-devel >= 5.9.5

%description devel
Files useful for building homescreens.
Expand All @@ -76,15 +78,6 @@ Requires: %{name} = %{version}-%{release}
%description tools
Tools for the lipstick package (warning: these tools installed by default).

%package simplecompositor
Summary: Lipstick Simple Compositor
License: LGPLv2.1
Requires: %{name} = %{version}-%{release}

%description simplecompositor
Debugging tool to debug the compositor logic without pulling in all of the
homescreen and all the other app logic lipstick has.

%package doc
Summary: Documentation for lipstick
License: LGPLv2.1
Expand Down Expand Up @@ -120,6 +113,7 @@ Translation files for the lipstick package.
%qmake5 VERSION=%{version}

make %{?_smp_mflags}
make -C doc lipstick_doc notification_doc

%install
rm -rf %{buildroot}
Expand Down Expand Up @@ -159,11 +153,6 @@ mkdir -p %{buildroot}/%{icondirectory}
%defattr(-,root,root,-)
%{_bindir}/notificationtool

%files simplecompositor
%defattr(-,root,root,-)
%{_bindir}/simplecompositor
%{_datadir}/lipstick/simplecompositor/*

%files doc
%defattr(-,root,root,-)
%{_datadir}/doc/lipstick/*
Expand Down

0 comments on commit 4edfbc5

Please sign in to comment.