Mir

Merge lp:~raof/mir/mirclient-symbols into lp:mir

Proposed by Chris Halse Rogers
Status: Rejected
Rejected by: Chris Halse Rogers
Proposed branch: lp:~raof/mir/mirclient-symbols
Merge into: lp:mir
Diff against target: 1094 lines (+302/-89)
21 files modified
debian/libmirclient8.symbols (+93/-0)
include/client/mir_toolkit/mir_client_library_debug.h (+19/-4)
include/client/mir_toolkit/mir_client_library_drm.h (+6/-6)
include/client/mir_toolkit/mir_connection.h (+14/-14)
include/client/mir_toolkit/mir_cursor_configuration.h (+2/-2)
include/client/mir_toolkit/mir_prompt_session.h (+5/-5)
include/client/mir_toolkit/mir_screencast.h (+3/-3)
include/client/mir_toolkit/mir_surface.h (+27/-27)
include/client/mir_toolkit/mir_wait.h (+2/-2)
include/shared/mir_toolkit/common.h (+5/-0)
include/shared/mir_toolkit/cursors.h (+17/-15)
src/client/CMakeLists.txt (+16/-0)
src/client/aging_buffer.h (+2/-1)
src/client/android/CMakeLists.txt (+34/-2)
src/client/client_platform_factory.h (+2/-1)
src/client/mesa/CMakeLists.txt (+32/-2)
src/client/symbols.map (+14/-0)
src/shared/logging/CMakeLists.txt (+5/-1)
tests/acceptance-tests/CMakeLists.txt (+1/-1)
tests/integration-tests/CMakeLists.txt (+1/-1)
tests/unit-tests/CMakeLists.txt (+2/-2)
To merge this branch: bzr merge lp:~raof/mir/mirclient-symbols
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Information
Cemil Azizoglu (community) Approve
Alexandros Frantzis (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Robert Carr (community) Approve
Review via email: mp+226949@code.launchpad.net

Commit message

Add a symbols file for libmirclient.

This documents (a) what our symbols are, and (b) when they first appeared.

Also hide a whole bunch of symbols that libmirclient doesn't actually need to export,
and version our existing symbols. This means we'll be able to change the semantics,
prototypes, or remove whole symbols from client library and remove symbols without needing to break ABI.

Hiding the symbols also reduces our exported symbol list by two orders of magnitude,
provides a performance boost for client startup that might even be mesurable (I haven't measured it ☺).

Description of the change

Annotate our client API symbols with a deb-symbols file; this documents (a) what our symbols are, and (b) when they first appeared.

Also hide a whole bunch of symbols what libmirclient doesn't actually need to export. Ideally we could reduce this set down to the API we define in mir_toolkit/*.h, but for various reasons, sensible and otherwise, this branch only halves our exported symbol count, rather than reducing it by two orders of magnitude.

To post a comment you must log in.
lp:~raof/mir/mirclient-symbols updated
862. By Chris Halse Rogers

Merge trunk, updating for prompt session API change

863. By Chris Halse Rogers

Whoops. Remove conflict detritus

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~raof/mir/mirclient-symbols updated
864. By Chris Halse Rogers

Whoops. Also remove the prompt session symbol form the symbols file!

865. By Chris Halse Rogers

Oops. Also do the static mirclientplatform for Android

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~raof/mir/mirclient-symbols updated
866. By Chris Halse Rogers

Version the libmirclient symbols

While we're at it, don't export all the stupid C++ detritus.
Keep the symbol visibility flags, as that allows the compiler
to generate better code.

867. By Chris Halse Rogers

Merge trunk, annotating the two new mirclient symbols

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) wrote :

Seems ok to me! Jenkins failure actually looks unrelated (libeatmydata)...I see some warnings though

dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: some symbols or patterns disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libmirclient8/DEBIAN/symbols doesn't match completely debian/libmirclient8.symbols

review: Approve
lp:~raof/mir/mirclient-symbols updated
868. By Chris Halse Rogers

Handle some oddities of the CI builder's symbols.

I don't know how GCC can get away with not exporting a symbol for ~AgingBuffer,
but apparently it does.

Likewise, the presence or absense of __gcov_var isn't interesting to us.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~raof/mir/mirclient-symbols updated
869. By Chris Halse Rogers

Merge trunk, updating symbols for new cursors

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

- So as we break client ABI, we rename the file to the new number, e.g. libmirclient9.symbols, and add the newly introduced entry point?

- What happens if we drop an entry point? Do we simply delete the entry or is there a way to make it "obsoleted in" (in symmetry with "introduced in")?

- And what is the 0.6 in MIR_CLIENT_0.6? The next series? How does that change over time?

review: Needs Information
Revision history for this message
Chris Halse Rogers (raof) wrote :

1) Adding new symbols doesn't break ABI; if we just add new symbols (or add new fields to the end of an opaque struct, etc) then we don't need to change the number.

If we add an entry point, we add it to the .symbols file, with the version it was introduced in. The packaging tools can then add appropriately versioned dependencies.

2) If we drop an entry point then we do indeed need to break ABI (but see point (3)), need to change the SONAME, and remove the symbol form the .symbols file. There's no ability to mark the symbol as “obsoleted in”, because that information isn't useful (to the packaging system) - the symbol doesn't appear in any version of the library called “libmirclient.so.9”.

(3) The 0.6 in MIR_CLIENT_0.6 is because I thought 0.6 was likely to be the version this would release in; it's just an arbitrary version string that doesn't even need to satisfy an ordering constraint (nothing ever tries to compare for anything except equality). It's from the symbols.map file where I version the symbols (see https://sourceware.org/binutils/docs/ld/VERSION.html )

Now, having versioned symbols means we've got a lot more flexibility in the changes we can make without breaking the ABI. We can change the meaning of symbols without breaking ABI by providing both the old symbol and the new symbol under the same name with different versions. It also means that if we somehow manage to get two versions of libmirclient loaded into the same process the linker can disambiguate correctly.

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

1) So do we need to rename the file when we add an entry point ? libmirclient8.symbols -> libmirclient9.symbols

3) I don't think we should have branch references (0.6) in the name, as the name no longer makes sense when merged in other branches.

review: Needs Fixing
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

156 +MIR_API MirWaitHandle *mir_connection_drm_auth_magic(MirConnection *connection,
157 + unsigned int magic,

169 +MIR_API int mir_connection_drm_set_gbm_device(MirConnection* connection,
170 + struct gbm_device* dev);

429 +MIR_API void mir_surface_set_event_handler(MirSurface *surface,
430 + MirEventDelegate const *event_handler);

These use tabs instead of spaces.

review: Needs Fixing
Revision history for this message
Chris Halse Rogers (raof) wrote :

> 1) So do we need to rename the file when we add an entry point ?
> libmirclient8.symbols -> libmirclient9.symbols

No, only when we break ABI. Adding an entry point doesn't break ABI.

> 3) I don't think we should have branch references (0.6) in the name, as the
> name no longer makes sense when merged in other branches.

Fair enough. I can call it MIR_CLIENT_1 if you'd prefer.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> > 1) So do we need to rename the file when we add an entry point ?
> > libmirclient8.symbols -> libmirclient9.symbols
>
> No, only when we break ABI. Adding an entry point doesn't break ABI.
>
>
> > 3) I don't think we should have branch references (0.6) in the name, as the
> > name no longer makes sense when merged in other branches.
>
> Fair enough. I can call it MIR_CLIENT_1 if you'd prefer.

MIR_CLIENT_<CLIENT_ABI_VERSION> ?

Revision history for this message
Chris Halse Rogers (raof) wrote :

Would also work :)

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

LGTM (once updated for the requested changes).

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I'm probably missing something but...

What is the purpose of this macro?

666 +#define MIR_API __attribute__((visibility("default")))

Surely, without it the behavior is exactly the same? (I.e. default visibility)

review: Needs Information
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> I'm probably missing something but...
>
> What is the purpose of this macro?
>
> 666 +#define MIR_API __attribute__((visibility("default")))
>
> Surely, without it the behavior is exactly the same? (I.e. default visibility)

This MP also changes the default visibility to "hidden":

791 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

9 +# The libmirclientplatform plugin requires mir::client::AgingBuffer
10 +# We could probably get around needing to export these by dlopen()
11 +# trickery, which would be nice.
12 + (c++)"mir::client::AgingBuffer::increment_age()@MIR_CLIENT_0.6" 0.5.0
13 + (c++)"mir::client::AgingBuffer::mark_as_submitted()@MIR_CLIENT_0.6" 0.5.0
14 + (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
15 + (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
16 +# For some reason gcc sometimes doesn't feel like emitting a symbol for
17 +# the destructor? How does that possibly work?
18 + (optional|c++)"mir::client::AgingBuffer::~AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
19 + (c++)"mir::client::AgingBuffer::age() const@MIR_CLIENT_0.6" 0.5.0
20 + (c++)"typeinfo for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
21 + (c++)"typeinfo name for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
22 + (c++)"vtable for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0

This is a pretty trivial class (as is mir::Fd which needs the same treatment)

These seem to be the only reason for linking mirclientplatformandroid to libmirclient and therefore exporting these symbols. Maybe it would be better to put these classes either directly into these libraries (or maybe mir::Fd into libmircommon)?

review: Needs Information
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

800 +add_library(
801 + mirclient-static

Is creating a .a file actually the best option as we don't need to distribute it? Or would a OBJECT library be a better approach? (Alan's shiny new tool since Daniel showed it to him yesterday.)

Revision history for this message
Chris Halse Rogers (raof) wrote :

On Fri, Jul 25, 2014 at 8:48 PM, Alan Griffiths <email address hidden>
wrote:
> 800 +add_library(
> 801 + mirclient-static
>
> Is creating a .a file actually the best option as we don't need to
> distribute it? Or would a OBJECT library be a better approach?
> (Alan's shiny new tool since Daniel showed it to him yesterday.)

Oooh, intriguing. I shall investimagate.

Revision history for this message
Chris Halse Rogers (raof) wrote :

On Fri, Jul 25, 2014 at 8:34 PM, Alan Griffiths <email address hidden>
wrote:
> Review: Needs Information
>
> 9 +# The libmirclientplatform plugin requires mir::client::AgingBuffer
> 10 +# We could probably get around needing to export these by dlopen()
> 11 +# trickery, which would be nice.
> 12 + (c++)"mir::client::AgingBuffer::increment_age()@MIR_CLIENT_0.6"
> 0.5.0
> 13 +
> (c++)"mir::client::AgingBuffer::mark_as_submitted()@MIR_CLIENT_0.6"
> 0.5.0
> 14 + (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6"
> 0.5.0
> 15 + (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6"
> 0.5.0
> 16 +# For some reason gcc sometimes doesn't feel like emitting a
> symbol for
> 17 +# the destructor? How does that possibly work?
> 18 +
> (optional|c++)"mir::client::AgingBuffer::~AgingBuffer()@MIR_CLIENT_0.6"
> 0.5.0
> 19 + (c++)"mir::client::AgingBuffer::age() const@MIR_CLIENT_0.6" 0.5.0
> 20 + (c++)"typeinfo for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
> 21 + (c++)"typeinfo name for mir::client::AgingBuffer@MIR_CLIENT_0.6"
> 0.5.0
> 22 + (c++)"vtable for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
>
> This is a pretty trivial class (as is mir::Fd which needs the same
> treatment)
>
> These seem to be the only reason for linking mirclientplatformandroid
> to libmirclient and therefore exporting these symbols. Maybe it would
> be better to put these classes either directly into these libraries
> (or maybe mir::Fd into libmircommon)?

Yeah. mcl:::AgingBuffer isn't useful outside these libraries, so that
can just get folded in. mir::Fd probably belongs in libmircommon.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > I'm probably missing something but...
> >
> > What is the purpose of this macro?
> >
> > 666 +#define MIR_API __attribute__((visibility("default")))
> >
> > Surely, without it the behavior is exactly the same? (I.e. default
> visibility)
>
> This MP also changes the default visibility to "hidden":
>
> 791 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")

What I mean is can't we do what we want without needing this macro? Vis:

https://code.launchpad.net/~alan-griffiths/mir/fix-libmirclient/+merge/228336

Revision history for this message
Chris Halse Rogers (raof) wrote :

Ah, right.

Yes, the visibility of the symbols can be controlled just using the linker script, but it's still worth aid the visibility attribute and associated macro: gcc can produce better code when it knows that symbols can't be used outside.

-----Original Message-----
From: "Alan Griffiths" <email address hidden>
Sent: ‎26/‎07/‎2014 2:22
To: "Alexandros Frantzis" <email address hidden>
Subject: Re: [Merge] lp:~raof/mir/mirclient-symbols into lp:mir/devel

> > I'm probably missing something but...
> >
> > What is the purpose of this macro?
> >
> > 666 +#define MIR_API __attribute__((visibility("default")))
> >
> > Surely, without it the behavior is exactly the same? (I.e. default
> visibility)
>
> This MP also changes the default visibility to "hidden":
>
> 791 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")

What I mean is can't we do what we want without needing this macro? Vis:

https://code.launchpad.net/~alan-griffiths/mir/fix-libmirclient/+merge/228336
--
https://code.launchpad.net/~raof/mir/mirclient-symbols/+merge/226949
You are the owner of lp:~raof/mir/mirclient-symbols.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Ah, right.
>
> Yes, the visibility of the symbols can be controlled just using the linker
> script, but it's still worth aid the visibility attribute and associated
> macro: gcc can produce better code when it knows that symbols can't be used
> outside.

Sorry, I still don't get it.

The symbols are still available externally to the translation unit so the compile phase can't really treat them any differently. The link phase has access to both the linker script and any attributes propagated by the compiler.

That is, any optimization "visibility=hidden" enables can be applied however the visibility is managed.

Revision history for this message
Chris Halse Rogers (raof) wrote :

It's possible that I'm misreading it, but https://gcc.gnu.org/wiki/Visibility says “Furthermore, using linker version scripts doesn't permit GCC to better optimise the code.”

I can come up with vaguely plausible-sounding reasons why this may be the case, but I've insufficient experience with gcc internals to say anything other than “the documentation says so” :)

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> It's possible that I'm misreading it, but https://gcc.gnu.org/wiki/Visibility
> says “Furthermore, using linker version scripts doesn't permit GCC to better
> optimise the code.”

As I read it it claims the gnu linker doesn't (at least currently) eliminate indirection through the global offset table for calls within the current so.

AFAICS that's /possible/ at link time.

> I can come up with vaguely plausible-sounding reasons why this may be the
> case, but I've insufficient experience with gcc internals to say anything
> other than “the documentation says so” :)

I too don't know enough about GCC internals to argue that this optimization is actually implemented. OTOH There are link time optimization options (e.g. -flto and -fuse-linker-plugin) that sound like they ought to handle it.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Alan's lp:~alan-griffiths/mir/fix-libmirclient should do this fine; once it lands I'll add the symbols file on top.

Unmerged revisions

869. By Chris Halse Rogers

Merge trunk, updating symbols for new cursors

868. By Chris Halse Rogers

Handle some oddities of the CI builder's symbols.

I don't know how GCC can get away with not exporting a symbol for ~AgingBuffer,
but apparently it does.

Likewise, the presence or absense of __gcov_var isn't interesting to us.

867. By Chris Halse Rogers

Merge trunk, annotating the two new mirclient symbols

866. By Chris Halse Rogers

Version the libmirclient symbols

While we're at it, don't export all the stupid C++ detritus.
Keep the symbol visibility flags, as that allows the compiler
to generate better code.

865. By Chris Halse Rogers

Oops. Also do the static mirclientplatform for Android

864. By Chris Halse Rogers

Whoops. Also remove the prompt session symbol form the symbols file!

863. By Chris Halse Rogers

Whoops. Remove conflict detritus

862. By Chris Halse Rogers

Merge trunk, updating for prompt session API change

861. By Chris Halse Rogers

Use --exclude-libs linker flag on libmirclient.

This causes the linker to hide all the symbols from the static
archives we include, rather than having to do two separate builds
one with -fvisibility=hidden, one without

860. By Chris Halse Rogers

Add symbols file for libmirclient

This adds some extra checking that we don't break client ABI, and documents
when certain symbols arrived

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/libmirclient8.symbols'
2--- debian/libmirclient8.symbols 1970-01-01 00:00:00 +0000
3+++ debian/libmirclient8.symbols 2014-07-22 03:06:31 +0000
4@@ -0,0 +1,93 @@
5+libmirclient.so.8 libmirclient8 #MINVER#
6+ MIR_CLIENT_0.6@MIR_CLIENT_0.6 0.5.0
7+# Our CI builds get built with gcov, which adds this superfluity.
8+ (optional)"__gcov_var@Base" 0.5.0
9+# The libmirclientplatform plugin requires mir::client::AgingBuffer
10+# We could probably get around needing to export these by dlopen()
11+# trickery, which would be nice.
12+ (c++)"mir::client::AgingBuffer::increment_age()@MIR_CLIENT_0.6" 0.5.0
13+ (c++)"mir::client::AgingBuffer::mark_as_submitted()@MIR_CLIENT_0.6" 0.5.0
14+ (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
15+ (c++)"mir::client::AgingBuffer::AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
16+# For some reason gcc sometimes doesn't feel like emitting a symbol for
17+# the destructor? How does that possibly work?
18+ (optional|c++)"mir::client::AgingBuffer::~AgingBuffer()@MIR_CLIENT_0.6" 0.5.0
19+ (c++)"mir::client::AgingBuffer::age() const@MIR_CLIENT_0.6" 0.5.0
20+ (c++)"typeinfo for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
21+ (c++)"typeinfo name for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
22+ (c++)"vtable for mir::client::AgingBuffer@MIR_CLIENT_0.6" 0.5.0
23+# And now our *actual* ABI
24+ mir_connect@MIR_CLIENT_0.6 0.5.0
25+ mir_connect_sync@MIR_CLIENT_0.6 0.5.0
26+ mir_connection_apply_display_config@MIR_CLIENT_0.6 0.5.0
27+ mir_connection_create_display_config@MIR_CLIENT_0.6 0.5.0
28+ mir_connection_create_prompt_session_sync@MIR_CLIENT_0.6 0.5.0
29+ mir_connection_create_screencast_sync@MIR_CLIENT_0.6 0.5.0
30+ mir_connection_create_surface@MIR_CLIENT_0.6 0.5.0
31+ mir_connection_create_surface_sync@MIR_CLIENT_0.6 0.5.0
32+ mir_connection_drm_auth_magic@MIR_CLIENT_0.6 0.5.0
33+ mir_connection_drm_set_gbm_device@MIR_CLIENT_0.6 0.5.0
34+ mir_connection_get_available_surface_formats@MIR_CLIENT_0.6 0.5.0
35+ mir_connection_get_display_info@MIR_CLIENT_0.6 0.5.0
36+ mir_connection_get_egl_native_display@MIR_CLIENT_0.6 0.5.0
37+ mir_connection_get_error_message@MIR_CLIENT_0.6 0.5.0
38+ mir_connection_get_platform@MIR_CLIENT_0.6 0.5.0
39+ mir_connection_is_valid@MIR_CLIENT_0.6 0.5.0
40+ mir_connection_release@MIR_CLIENT_0.6 0.5.0
41+ mir_connection_set_display_config_change_callback@MIR_CLIENT_0.6 0.5.0
42+ mir_connection_set_lifecycle_event_callback@MIR_CLIENT_0.6 0.5.0
43+ mir_cursor_configuration_destroy@MIR_CLIENT_0.6 0.5.0
44+ mir_cursor_configuration_from_name@MIR_CLIENT_0.6 0.5.0
45+ mir_display_config_destroy@MIR_CLIENT_0.6 0.5.0
46+ mir_prompt_session_error_message@MIR_CLIENT_0.6 0.5.0
47+ mir_prompt_session_is_valid@MIR_CLIENT_0.6 0.5.0
48+ mir_prompt_session_new_fds_for_prompt_providers@MIR_CLIENT_0.6 0.5.0
49+ mir_prompt_session_release_sync@MIR_CLIENT_0.6 0.5.0
50+ mir_screencast_egl_native_window@MIR_CLIENT_0.6 0.5.0
51+ mir_screencast_release_sync@MIR_CLIENT_0.6 0.5.0
52+ mir_surface_configure_cursor@MIR_CLIENT_0.6 0.5.0
53+ mir_surface_get_current_buffer@MIR_CLIENT_0.6 0.5.0
54+ mir_surface_get_dpi@MIR_CLIENT_0.6 0.5.0
55+ mir_surface_get_egl_native_window@MIR_CLIENT_0.6 0.5.0
56+ mir_surface_get_error_message@MIR_CLIENT_0.6 0.5.0
57+ mir_surface_get_focus@MIR_CLIENT_0.6 0.5.0
58+ mir_surface_get_graphics_region@MIR_CLIENT_0.6 0.5.0
59+ mir_surface_get_id@MIR_CLIENT_0.6 0.5.0
60+ mir_surface_get_orientation@MIR_CLIENT_0.6 0.5.0
61+ mir_surface_get_parameters@MIR_CLIENT_0.6 0.5.0
62+ mir_surface_get_platform_type@MIR_CLIENT_0.6 0.5.0
63+ mir_surface_get_state@MIR_CLIENT_0.6 0.5.0
64+ mir_surface_get_swapinterval@MIR_CLIENT_0.6 0.5.0
65+ mir_surface_get_type@MIR_CLIENT_0.6 0.5.0
66+ mir_surface_get_visibility@MIR_CLIENT_0.6 0.5.0
67+ mir_surface_is_valid@MIR_CLIENT_0.6 0.5.0
68+ mir_surface_release@MIR_CLIENT_0.6 0.5.0
69+ mir_surface_release_sync@MIR_CLIENT_0.6 0.5.0
70+ mir_surface_set_event_handler@MIR_CLIENT_0.6 0.5.0
71+ mir_surface_set_state@MIR_CLIENT_0.6 0.5.0
72+ mir_surface_set_swapinterval@MIR_CLIENT_0.6 0.5.0
73+ mir_surface_set_type@MIR_CLIENT_0.6 0.5.0
74+ mir_surface_swap_buffers@MIR_CLIENT_0.6 0.5.0
75+ mir_surface_swap_buffers_sync@MIR_CLIENT_0.6 0.5.0
76+ mir_wait_for@MIR_CLIENT_0.6 0.5.0
77+ mir_wait_for_one@MIR_CLIENT_0.6 0.5.0
78+# Let's put all the cursors together
79+ mir_default_cursor_name@MIR_CLIENT_0.6 0.5.0
80+ mir_disabled_cursor_name@MIR_CLIENT_0.6 0.5.0
81+ mir_arrow_cursor_name@MIR_CLIENT_0.6 0.5.0
82+ mir_busy_cursor_name@MIR_CLIENT_0.6 0.5.0
83+ mir_caret_cursor_name@MIR_CLIENT_0.6 0.5.0
84+ mir_pointing_hand_cursor_name@MIR_CLIENT_0.6 0.5.0
85+ mir_open_hand_cursor_name@MIR_CLIENT_0.6 0.5.0
86+ mir_closed_hand_cursor_name@MIR_CLIENT_0.6 0.5.0
87+ mir_horizontal_resize_cursor_name@MIR_CLIENT_0.6 0.5.0
88+ mir_vertical_resize_cursor_name@MIR_CLIENT_0.6 0.5.0
89+ mir_diagonal_resize_bottom_to_top_cursor_name@MIR_CLIENT_0.6 0.5.0
90+ mir_diagonal_resize_top_to_bottom_cursor_name@MIR_CLIENT_0.6 0.5.0
91+ mir_omnidirectional_resize_cursor_name@MIR_CLIENT_0.6 0.5.0
92+ mir_vsplit_resize_cursor_name@MIR_CLIENT_0.6 0.5.0
93+ mir_hsplit_resize_cursor_name@MIR_CLIENT_0.6 0.5.0
94+# Anything that uses the debug interfaces is asking for trouble,
95+# as we reserve the right to break these at will.
96+ mir_debug_surface_current_buffer_id@MIR_CLIENT_0.6 0.5.0
97+ mir_debug_surface_id@MIR_CLIENT_0.6 0.5.0
98
99=== modified file 'include/client/mir_toolkit/mir_client_library_debug.h'
100--- include/client/mir_toolkit/mir_client_library_debug.h 2014-03-06 06:05:17 +0000
101+++ include/client/mir_toolkit/mir_client_library_debug.h 2014-07-22 03:06:31 +0000
102@@ -20,15 +20,25 @@
103
104 #include <mir_toolkit/mir_client_library.h>
105
106-/* This header defines debug interfaces that aren't expected to be generally useful
107- * and do not have the same API-stability guarantees that the main API has */
108+#ifdef __cplusplus
109+/**
110+ * \addtogroup mir_toolkit
111+ * @{
112+ */
113+/**
114+ * This header defines debug interfaces that aren't expected to be generally useful
115+ * and do not have the same API-stability guarantees that the main API has
116+ */
117+
118+extern "C" {
119+#endif
120
121 /**
122 * Return the ID of a surface (only useful for debug output).
123 * \param [in] surface The surface
124 * \return An internal ID that identifies the surface
125 */
126-int mir_debug_surface_id(MirSurface *surface);
127+MIR_API int mir_debug_surface_id(MirSurface *surface);
128
129 /**
130 * Get the ID of the surface's current buffer (only useful for debug purposes)
131@@ -38,6 +48,11 @@
132 * This is the buffer that is currently being drawn to,
133 * and would be returned by mir_surface_get_current_buffer.
134 */
135-uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface);
136+MIR_API uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface);
137+
138+#ifdef __cplusplus
139+}
140+#endif
141+/**@}*/
142
143 #endif /* MIR_CLIENT_LIBRARY_DEBUG_H */
144
145=== modified file 'include/client/mir_toolkit/mir_client_library_drm.h'
146--- include/client/mir_toolkit/mir_client_library_drm.h 2014-03-06 06:05:17 +0000
147+++ include/client/mir_toolkit/mir_client_library_drm.h 2014-07-22 03:06:31 +0000
148@@ -32,10 +32,10 @@
149 typedef void (*mir_drm_auth_magic_callback)(int status, void *context);
150
151 /* Authenticates a DRM magic cookie */
152-MirWaitHandle *mir_connection_drm_auth_magic(MirConnection *connection,
153- unsigned int magic,
154- mir_drm_auth_magic_callback callback,
155- void *context);
156+MIR_API MirWaitHandle *mir_connection_drm_auth_magic(MirConnection *connection,
157+ unsigned int magic,
158+ mir_drm_auth_magic_callback callback,
159+ void *context);
160
161 /**
162 * Set the gbm_device to be used by the EGL implementation.
163@@ -46,8 +46,8 @@
164 * \return A non-zero value if the operation was successful,
165 * 0 otherwise
166 */
167-int mir_connection_drm_set_gbm_device(MirConnection* connection,
168- struct gbm_device* dev);
169+MIR_API int mir_connection_drm_set_gbm_device(MirConnection* connection,
170+ struct gbm_device* dev);
171
172 #ifdef __cplusplus
173 }
174
175=== modified file 'include/client/mir_toolkit/mir_connection.h'
176--- include/client/mir_toolkit/mir_connection.h 2014-06-09 13:48:18 +0000
177+++ include/client/mir_toolkit/mir_connection.h 2014-07-22 03:06:31 +0000
178@@ -45,7 +45,7 @@
179 * \param [in,out] context User data passed to the callback function
180 * \return A handle that can be passed to mir_wait_for
181 */
182-MirWaitHandle *mir_connect(
183+MIR_API MirWaitHandle *mir_connect(
184 char const *server,
185 char const *app_name,
186 mir_connected_callback callback,
187@@ -58,7 +58,7 @@
188 * \param [in] app_name A name referring to the application
189 * \return The resulting MirConnection
190 */
191-MirConnection *mir_connect_sync(char const *server, char const *app_name);
192+MIR_API MirConnection *mir_connect_sync(char const *server, char const *app_name);
193
194 /**
195 * Test for a valid connection
196@@ -66,7 +66,7 @@
197 * \return True if the supplied connection is valid, or
198 * false otherwise.
199 */
200-MirBool mir_connection_is_valid(MirConnection *connection);
201+MIR_API MirBool mir_connection_is_valid(MirConnection *connection);
202
203 /**
204 * Retrieve a text description of the last error. The returned string is owned
205@@ -76,13 +76,13 @@
206 * invalid connection, or the empty string "" if the
207 * connection is valid.
208 */
209-char const *mir_connection_get_error_message(MirConnection *connection);
210+MIR_API char const *mir_connection_get_error_message(MirConnection *connection);
211
212 /**
213 * Release a connection to the Mir server
214 * \param [in] connection The connection
215 */
216-void mir_connection_release(MirConnection *connection);
217+MIR_API void mir_connection_release(MirConnection *connection);
218
219 /**
220 * Query platform-specific data and/or file descriptors that are required to
221@@ -90,7 +90,7 @@
222 * \param [in] connection The connection
223 * \param [out] platform_package Structure to be populated
224 */
225-void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);
226+MIR_API void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);
227
228 /**
229 * Register a callback to be called when a Lifecycle state change occurs.
230@@ -98,14 +98,14 @@
231 * \param [in] callback The function to be called when the state change occurs
232 * \param [in,out] context User data passed to the callback function
233 */
234-void mir_connection_set_lifecycle_event_callback(MirConnection* connection,
235+MIR_API void mir_connection_set_lifecycle_event_callback(MirConnection* connection,
236 mir_lifecycle_event_callback callback, void* context);
237
238 /**
239 * \deprecated Use mir_connection_create_display_config
240 */
241 __attribute__((__deprecated__("Use mir_connection_create_display_config()")))
242-void mir_connection_get_display_info(MirConnection *connection, MirDisplayInfo *display_info);
243+MIR_API void mir_connection_get_display_info(MirConnection *connection, MirDisplayInfo *display_info);
244
245 /**
246 * Query the display
247@@ -114,7 +114,7 @@
248 * \param [in] connection The connection
249 * \return structure that describes the display configuration
250 */
251-MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection);
252+MIR_API MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection);
253
254 /**
255 * Register a callback to be called when the hardware display configuration changes
256@@ -126,7 +126,7 @@
257 * \param [in] callback The function to be called when a display change occurs
258 * \param [in,out] context User data passed to the callback function
259 */
260-void mir_connection_set_display_config_change_callback(
261+MIR_API void mir_connection_set_display_config_change_callback(
262 MirConnection* connection,
263 mir_display_config_callback callback, void* context);
264
265@@ -134,7 +134,7 @@
266 * Destroy the DisplayConfiguration resource acquired from mir_connection_create_display_config
267 * \param [in] display_configuration The display_configuration information resource to be destroyed
268 */
269-void mir_display_config_destroy(MirDisplayConfiguration* display_configuration);
270+MIR_API void mir_display_config_destroy(MirDisplayConfiguration* display_configuration);
271
272 /**
273 * Apply the display configuration
274@@ -149,14 +149,14 @@
275 * \param [in] display_configuration The display_configuration to apply
276 * \return A handle that can be passed to mir_wait_for
277 */
278-MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration);
279+MIR_API MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration);
280
281 /**
282 * Get a display type that can be used for OpenGL ES 2.0 acceleration.
283 * \param [in] connection The connection
284 * \return An EGLNativeDisplayType that the client can use
285 */
286-MirEGLNativeDisplayType mir_connection_get_egl_native_display(MirConnection *connection);
287+MIR_API MirEGLNativeDisplayType mir_connection_get_egl_native_display(MirConnection *connection);
288
289 /**
290 * Get the list of possible formats that a surface can be created with.
291@@ -165,7 +165,7 @@
292 * \param [in] formats_size size of formats list
293 * \param [out] num_valid_formats number of valid formats returned in formats
294 */
295-void mir_connection_get_available_surface_formats(
296+MIR_API void mir_connection_get_available_surface_formats(
297 MirConnection* connection, MirPixelFormat* formats,
298 unsigned const int format_size, unsigned int *num_valid_formats);
299
300
301=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
302--- include/client/mir_toolkit/mir_cursor_configuration.h 2014-07-01 16:53:35 +0000
303+++ include/client/mir_toolkit/mir_cursor_configuration.h 2014-07-22 03:06:31 +0000
304@@ -38,7 +38,7 @@
305 * Release resources assosciated with cursor parameters
306 * \param [in] parameters The operand
307 */
308-void mir_cursor_configuration_destroy(MirCursorConfiguration *parameters);
309+MIR_API void mir_cursor_configuration_destroy(MirCursorConfiguration *parameters);
310
311 /**
312 * Returns a new MirCursorConfiguration representing a named cursor
313@@ -50,7 +50,7 @@
314 * \return A cursor parameters object which must be passed
315 * to_mir_cursor_configuration_destroy
316 */
317-MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name);
318+MIR_API MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name);
319
320 #ifdef __cplusplus
321 }
322
323=== modified file 'include/client/mir_toolkit/mir_prompt_session.h'
324--- include/client/mir_toolkit/mir_prompt_session.h 2014-07-16 03:38:05 +0000
325+++ include/client/mir_toolkit/mir_prompt_session.h 2014-07-22 03:06:31 +0000
326@@ -37,7 +37,7 @@
327 * \param [in,out] context User data passed to the callback functions
328 * \return A handle that can be passed to mir_wait_for
329 */
330-MirPromptSession *mir_connection_create_prompt_session_sync(
331+MIR_API MirPromptSession *mir_connection_create_prompt_session_sync(
332 MirConnection* connection,
333 pid_t application_pid,
334 mir_prompt_session_state_change_callback state_change_callback,
335@@ -57,7 +57,7 @@
336 * \param [in,out] context User data passed to the callback function
337 * \return A handle that can be passed to mir_wait_for
338 */
339-MirWaitHandle* mir_prompt_session_new_fds_for_prompt_providers(
340+MIR_API MirWaitHandle* mir_prompt_session_new_fds_for_prompt_providers(
341 MirPromptSession *prompt_session,
342 unsigned int no_of_fds,
343 mir_client_fd_callback callback,
344@@ -67,14 +67,14 @@
345 * Stop and release the specified prompt session
346 * \param [in] prompt_session The prompt session
347 */
348-void mir_prompt_session_release_sync(MirPromptSession *prompt_session);
349+MIR_API void mir_prompt_session_release_sync(MirPromptSession *prompt_session);
350
351 /**
352 * Test for a valid prompt session
353 * \param [in] prompt_session The prompt session
354 * \return True if prompt_session is valid, false otherwise
355 */
356-MirBool mir_prompt_session_is_valid(MirPromptSession *prompt_session);
357+MIR_API MirBool mir_prompt_session_is_valid(MirPromptSession *prompt_session);
358
359 /**
360 * Retrieve a text description of the last error. The returned string is owned
361@@ -84,7 +84,7 @@
362 * invalid connection, or the empty string "" if the
363 * connection is valid.
364 */
365-char const *mir_prompt_session_error_message(MirPromptSession *prompt_session);
366+MIR_API char const *mir_prompt_session_error_message(MirPromptSession *prompt_session);
367
368 #ifdef __cplusplus
369 }
370
371=== modified file 'include/client/mir_toolkit/mir_screencast.h'
372--- include/client/mir_toolkit/mir_screencast.h 2014-01-29 09:29:55 +0000
373+++ include/client/mir_toolkit/mir_screencast.h 2014-07-22 03:06:31 +0000
374@@ -37,7 +37,7 @@
375 * \param [in] parameters The screencast parameters
376 * \return The resulting screencast
377 */
378-MirScreencast *mir_connection_create_screencast_sync(
379+MIR_API MirScreencast *mir_connection_create_screencast_sync(
380 MirConnection *connection,
381 MirScreencastParameters *parameters);
382
383@@ -45,7 +45,7 @@
384 * Release the specified screencast.
385 * \param [in] screencast The screencast to be released
386 */
387-void mir_screencast_release_sync(
388+MIR_API void mir_screencast_release_sync(
389 MirScreencast *screencast);
390
391 /**
392@@ -53,7 +53,7 @@
393 * \param [in] screencast The screencast
394 * \return An EGLNativeWindowType that the client can use
395 */
396-MirEGLNativeWindowType mir_screencast_egl_native_window(
397+MIR_API MirEGLNativeWindowType mir_screencast_egl_native_window(
398 MirScreencast *screencast);
399
400 #ifdef __cplusplus
401
402=== modified file 'include/client/mir_toolkit/mir_surface.h'
403--- include/client/mir_toolkit/mir_surface.h 2014-07-09 21:14:44 +0000
404+++ include/client/mir_toolkit/mir_surface.h 2014-07-22 03:06:31 +0000
405@@ -46,7 +46,7 @@
406 * \return A handle that can be passed to
407 * mir_wait_for
408 */
409-MirWaitHandle *mir_connection_create_surface(
410+MIR_API MirWaitHandle *mir_connection_create_surface(
411 MirConnection *connection,
412 MirSurfaceParameters const *surface_parameters,
413 mir_surface_callback callback,
414@@ -59,7 +59,7 @@
415 * \param [in] params Parameters describing the desired surface
416 * \return The resulting surface
417 */
418-MirSurface *mir_connection_create_surface_sync(
419+MIR_API MirSurface *mir_connection_create_surface_sync(
420 MirConnection *connection,
421 MirSurfaceParameters const *params);
422
423@@ -73,15 +73,15 @@
424 * \param [in] surface The surface
425 * \param [in] event_handler The event handler to call
426 */
427-void mir_surface_set_event_handler(MirSurface *surface,
428- MirEventDelegate const *event_handler);
429+MIR_API void mir_surface_set_event_handler(MirSurface *surface,
430+ MirEventDelegate const *event_handler);
431
432 /**
433 * Get a window type that can be used for OpenGL ES 2.0 acceleration.
434 * \param [in] surface The surface
435 * \return An EGLNativeWindowType that the client can use
436 */
437-MirEGLNativeWindowType mir_surface_get_egl_native_window(MirSurface *surface);
438+MIR_API MirEGLNativeWindowType mir_surface_get_egl_native_window(MirSurface *surface);
439
440 /**
441 * Test for a valid surface
442@@ -89,7 +89,7 @@
443 * \return True if the supplied surface is valid, or
444 * false otherwise.
445 */
446-MirBool mir_surface_is_valid(MirSurface *surface);
447+MIR_API MirBool mir_surface_is_valid(MirSurface *surface);
448
449 /**
450 * Retrieve a text description of the error. The returned string is owned by
451@@ -100,7 +100,7 @@
452 * invalid surface, or the empty string "" if the
453 * connection is valid.
454 */
455-char const *mir_surface_get_error_message(MirSurface *surface);
456+MIR_API char const *mir_surface_get_error_message(MirSurface *surface);
457
458 /**
459 * Get a surface's parameters.
460@@ -108,7 +108,7 @@
461 * \param [in] surface The surface
462 * \param [out] parameters Structure to be populated
463 */
464-void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
465+MIR_API void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
466
467 /**
468 * Get the underlying platform type so the buffer obtained in "raw" representation
469@@ -117,7 +117,7 @@
470 * \param [in] surface The surface
471 * \return One of mir_platform_type_android or mir_platform_type_gbm
472 */
473-MirPlatformType mir_surface_get_platform_type(MirSurface *surface);
474+MIR_API MirPlatformType mir_surface_get_platform_type(MirSurface *surface);
475
476 /**
477 * Get a surface's buffer in "raw" representation.
478@@ -125,7 +125,7 @@
479 * \param [in] surface The surface
480 * \param [out] buffer_package Structure to be populated
481 */
482-void mir_surface_get_current_buffer(MirSurface *surface, MirNativeBuffer **buffer_package);
483+MIR_API void mir_surface_get_current_buffer(MirSurface *surface, MirNativeBuffer **buffer_package);
484
485 /**
486 * Get a surface's graphics_region, i.e., map the graphics buffer to main
487@@ -134,7 +134,7 @@
488 * \param [in] surface The surface
489 * \param [out] graphics_region Structure to be populated
490 */
491-void mir_surface_get_graphics_region(
492+MIR_API void mir_surface_get_graphics_region(
493 MirSurface *surface,
494 MirGraphicsRegion *graphics_region);
495
496@@ -151,7 +151,7 @@
497 * \param [in,out] context User data passed to the callback function
498 * \return A handle that can be passed to mir_wait_for
499 */
500-MirWaitHandle *mir_surface_swap_buffers(
501+MIR_API MirWaitHandle *mir_surface_swap_buffers(
502 MirSurface *surface,
503 mir_surface_callback callback,
504 void *context);
505@@ -161,7 +161,7 @@
506 * for the operation to complete.
507 * \param [in] surface The surface whose buffer to advance
508 */
509-void mir_surface_swap_buffers_sync(MirSurface *surface);
510+MIR_API void mir_surface_swap_buffers_sync(MirSurface *surface);
511
512 /**
513 * Release the supplied surface and any associated buffer. The returned wait
514@@ -175,7 +175,7 @@
515 * \param [in,out] context User data passed to the callback function
516 * \return A handle that can be passed to mir_wait_for
517 */
518-MirWaitHandle *mir_surface_release(
519+MIR_API MirWaitHandle *mir_surface_release(
520 MirSurface *surface,
521 mir_surface_callback callback,
522 void *context);
523@@ -185,13 +185,13 @@
524 * for the operation to complete.
525 * \param [in] surface The surface to be released
526 */
527-void mir_surface_release_sync(MirSurface *surface);
528+MIR_API void mir_surface_release_sync(MirSurface *surface);
529
530 /**
531 * \deprecated Use mir_debug_surface_id()
532 */
533 __attribute__((__deprecated__("Use mir_debug_surface_id()")))
534-int mir_surface_get_id(MirSurface *surface);
535+MIR_API int mir_surface_get_id(MirSurface *surface);
536
537 /**
538 * Set the type (purpose) of a surface. This is not guaranteed to always work
539@@ -201,14 +201,14 @@
540 * \param [in] type The new type of the surface
541 * \return A wait handle that can be passed to mir_wait_for
542 */
543-MirWaitHandle* mir_surface_set_type(MirSurface *surface, MirSurfaceType type);
544+MIR_API MirWaitHandle* mir_surface_set_type(MirSurface *surface, MirSurfaceType type);
545
546 /**
547 * Get the type (purpose) of a surface.
548 * \param [in] surface The surface to query
549 * \return The type of the surface
550 */
551-MirSurfaceType mir_surface_get_type(MirSurface *surface);
552+MIR_API MirSurfaceType mir_surface_get_type(MirSurface *surface);
553
554 /**
555 * Change the state of a surface.
556@@ -216,7 +216,7 @@
557 * \param [in] state The new state of the surface
558 * \return A wait handle that can be passed to mir_wait_for
559 */
560-MirWaitHandle* mir_surface_set_state(MirSurface *surface,
561+MIR_API MirWaitHandle* mir_surface_set_state(MirSurface *surface,
562 MirSurfaceState state);
563
564 /**
565@@ -224,7 +224,7 @@
566 * \param [in] surface The surface to query
567 * \return The state of the surface
568 */
569-MirSurfaceState mir_surface_get_state(MirSurface *surface);
570+MIR_API MirSurfaceState mir_surface_get_state(MirSurface *surface);
571
572 /**
573 * Set the swapinterval for mir_surface_swap_buffers. EGL users should use
574@@ -236,7 +236,7 @@
575 * \return A wait handle that can be passed to mir_wait_for,
576 * or NULL if the interval could not be supported
577 */
578-MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);
579+MIR_API MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);
580
581 /**
582 * Query the swapinterval that the surface is operating with.
583@@ -245,28 +245,28 @@
584 * \return The swapinterval value that the client is operating with.
585 * Returns -1 if surface is invalid.
586 */
587-int mir_surface_get_swapinterval(MirSurface* surface);
588+MIR_API int mir_surface_get_swapinterval(MirSurface* surface);
589
590 /**
591 * Query the DPI value of the surface (dots per inch). This will vary depending
592 * on the physical display configuration and where the surface is within it.
593 * \return The DPI of the surface, or zero if unknown.
594 */
595-int mir_surface_get_dpi(MirSurface* surface);
596+MIR_API int mir_surface_get_dpi(MirSurface* surface);
597
598 /**
599 * Query the focus state for a surface.
600 * \param [in] surface The surface to operate on
601 * \return The focus state of said surface
602 */
603-MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface);
604+MIR_API MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface);
605
606 /**
607 * Query the visibility state for a surface.
608 * \param [in] surface The surface to operate on
609 * \return The visibility state of said surface
610 */
611-MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface);
612+MIR_API MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface);
613
614 /**
615 * Choose the cursor state for a surface: whether a cursor is shown,
616@@ -278,14 +278,14 @@
617 * or NULL if parameters is invalid.
618 *
619 */
620-MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
621+MIR_API MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
622
623 /**
624 * Get the orientation of a surface.
625 * \param [in] surface The surface to query
626 * \return The orientation of the surface
627 */
628-MirOrientation mir_surface_get_orientation(MirSurface *surface);
629+MIR_API MirOrientation mir_surface_get_orientation(MirSurface *surface);
630
631 #ifdef __cplusplus
632 }
633
634=== modified file 'include/client/mir_toolkit/mir_wait.h'
635--- include/client/mir_toolkit/mir_wait.h 2014-03-31 14:36:08 +0000
636+++ include/client/mir_toolkit/mir_wait.h 2014-07-22 03:06:31 +0000
637@@ -35,7 +35,7 @@
638 * have completed.
639 * \param [in] wait_handle Handle returned by an asynchronous request
640 */
641-void mir_wait_for(MirWaitHandle *wait_handle);
642+MIR_API void mir_wait_for(MirWaitHandle *wait_handle);
643
644 /**
645 * Wait on the supplied handle until one instance of the associated request
646@@ -44,7 +44,7 @@
647 * with the wait handle; only one.
648 * \param [in] wait_handle Handle returned by an asynchronous request
649 */
650-void mir_wait_for_one(MirWaitHandle *wait_handle);
651+MIR_API void mir_wait_for_one(MirWaitHandle *wait_handle);
652
653
654 #ifdef __cplusplus
655
656=== modified file 'include/shared/mir_toolkit/common.h'
657--- include/shared/mir_toolkit/common.h 2014-07-21 15:42:04 +0000
658+++ include/shared/mir_toolkit/common.h 2014-07-22 03:06:31 +0000
659@@ -21,6 +21,11 @@
660 #ifndef MIR_COMMON_H_
661 #define MIR_COMMON_H_
662
663+/**
664+ * Used to mark an exported symbol
665+ */
666+#define MIR_API __attribute__((visibility("default")))
667+
668 #include <mir_toolkit/cursors.h>
669
670 /**
671
672=== modified file 'include/shared/mir_toolkit/cursors.h'
673--- include/shared/mir_toolkit/cursors.h 2014-07-01 16:53:35 +0000
674+++ include/shared/mir_toolkit/cursors.h 2014-07-22 03:06:31 +0000
675@@ -21,6 +21,8 @@
676 #ifndef MIR_CURSORS_H_
677 #define MIR_CURSORS_H_
678
679+#include "common.h"
680+
681 /**
682 * \addtogroup mir_toolkit
683 * @{
684@@ -32,83 +34,83 @@
685 * A special cursor name for use with mir_cursor_configuration_from_name
686 * representing the system default cursor.
687 */
688-extern char const *const mir_default_cursor_name;
689+MIR_API extern char const *const mir_default_cursor_name;
690 /**
691 * A special cursor name for use with mir_cursor_configuration_from_name
692 * representing a disabled cursor image.
693 */
694-extern char const *const mir_disabled_cursor_name;
695+MIR_API extern char const *const mir_disabled_cursor_name;
696
697 /**
698 * The standard arrow cursor (typically the system default)
699 */
700-extern char const* const mir_arrow_cursor_name;
701+MIR_API extern char const* const mir_arrow_cursor_name;
702
703 /**
704 * The "wait" cursor, typically an hourglass or watch used during operations
705 * which prevent the user from interacting.
706 */
707-extern char const* const mir_busy_cursor_name;
708+MIR_API extern char const* const mir_busy_cursor_name;
709
710 /**
711 * The caret or ibeam cursor, indicating acceptance of text input
712 */
713-extern char const* const mir_caret_cursor_name;
714+MIR_API extern char const* const mir_caret_cursor_name;
715
716 /**
717 * The pointing hand cursor, typically used for clickable elements such
718 * as hyperlinks.
719 */
720-extern char const* const mir_pointing_hand_cursor_name;
721+MIR_API extern char const* const mir_pointing_hand_cursor_name;
722
723 /**
724 * The open handed cursor, typically used to indicate that the area beneath
725 * the cursor may be clicked and dragged around.
726 */
727-extern char const* const mir_open_hand_cursor_name;
728+MIR_API extern char const* const mir_open_hand_cursor_name;
729
730 /**
731 * The close handed cursor, typically used to indicate that a drag operation is in process
732 * which involves scrolling.
733 */
734-extern char const* const mir_closed_hand_cursor_name;
735+MIR_API extern char const* const mir_closed_hand_cursor_name;
736
737 /**
738 * The cursor used to indicate a horizontal resize operation.
739 */
740-extern char const* const mir_horizontal_resize_cursor_name;
741+MIR_API extern char const* const mir_horizontal_resize_cursor_name;
742
743 /**
744 * The cursor used to indicate a vertical resize operation.
745 */
746-extern char const* const mir_vertical_resize_cursor_name;
747+MIR_API extern char const* const mir_vertical_resize_cursor_name;
748
749 /**
750 * The cursor used to indicate diagonal resize from top-right and bottom-left corners.
751 */
752-extern char const* const mir_diagonal_resize_bottom_to_top_cursor_name;
753+MIR_API extern char const* const mir_diagonal_resize_bottom_to_top_cursor_name;
754
755 /**
756 * The cursor used to indicate diagonal resize from bottom-left and top-right corners.
757 */
758-extern char const* const mir_diagonal_resize_top_to_bottom_cursor_name;
759+MIR_API extern char const* const mir_diagonal_resize_top_to_bottom_cursor_name;
760
761 /**
762 * The cursor used to indicate resize with no directional constraint.
763 */
764-extern char const* const mir_omnidirectional_resize_cursor_name;
765+MIR_API extern char const* const mir_omnidirectional_resize_cursor_name;
766
767 /**
768 * The cursor used for vertical splitters, indicating that a handle may be
769 * dragged to adjust vertical space.
770 */
771-extern char const* const mir_vsplit_resize_cursor_name;
772+MIR_API extern char const* const mir_vsplit_resize_cursor_name;
773
774 /**
775 * The cursor used for horizontal splitters, indicating that a handle may be
776 * dragged to adjust horizontal space.
777 */
778-extern char const* const mir_hsplit_resize_cursor_name;
779+MIR_API extern char const* const mir_hsplit_resize_cursor_name;
780
781 /**@}*/
782
783
784=== modified file 'src/client/CMakeLists.txt'
785--- src/client/CMakeLists.txt 2014-07-16 03:38:05 +0000
786+++ src/client/CMakeLists.txt 2014-07-22 03:06:31 +0000
787@@ -3,6 +3,8 @@
788 set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
789 set(INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/mirclient")
790
791+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
792+
793 configure_file(
794 ${CMAKE_CURRENT_SOURCE_DIR}/mirclient.pc.in
795 ${CMAKE_CURRENT_BINARY_DIR}/mirclient.pc
796@@ -59,13 +61,21 @@
797 ${CLIENT_SOURCES}
798 )
799
800+add_library(
801+ mirclient-static
802+
803+ ${CLIENT_SOURCES}
804+)
805+
806 set(MIRCLIENT_ABI 8)
807+set(symbol_map ${CMAKE_SOURCE_DIR}/src/client/symbols.map)
808
809 set_target_properties(
810 mirclient
811
812 PROPERTIES
813 SOVERSION ${MIRCLIENT_ABI}
814+ LINK_FLAGS "-Wl,--exclude-libs=ALL -Wl,--version-script,${symbol_map}"
815 )
816
817 set(
818@@ -95,6 +105,12 @@
819 ${MIR_CLIENT_LIBRARIES}
820 )
821
822+target_link_libraries(
823+ mirclient-static
824+
825+ ${MIR_CLIENT_LIBRARIES}
826+)
827+
828 install(
829 TARGETS mirclient
830 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
831
832=== modified file 'src/client/aging_buffer.h'
833--- src/client/aging_buffer.h 2014-03-06 06:05:17 +0000
834+++ src/client/aging_buffer.h 2014-07-22 03:06:31 +0000
835@@ -19,6 +19,7 @@
836 #ifndef MIR_CLIENT_AGING_BUFFER_H_
837 #define MIR_CLIENT_AGING_BUFFER_H_
838
839+#include "mir_toolkit/common.h"
840 #include "client_buffer.h"
841
842 namespace mir
843@@ -26,7 +27,7 @@
844 namespace client
845 {
846
847-class AgingBuffer : public ClientBuffer
848+class MIR_API AgingBuffer : public ClientBuffer
849 {
850 public:
851 AgingBuffer();
852
853=== modified file 'src/client/android/CMakeLists.txt'
854--- src/client/android/CMakeLists.txt 2014-06-27 17:28:47 +0000
855+++ src/client/android/CMakeLists.txt 2014-07-22 03:06:31 +0000
856@@ -1,8 +1,7 @@
857 include_directories(SYSTEM ${LIBHARDWARE_INCLUDE_DIRS})
858 add_definitions(-DANDROID)
859
860-add_library(
861- mirclientplatformandroid SHARED
862+set(ANDROID_PLATFORM_SRC
863
864 buffer.cpp
865 android_client_buffer_factory.cpp
866@@ -11,8 +10,15 @@
867 client_platform_factory.cpp
868 client_surface_interpreter.cpp
869 android_native_display_container.cpp
870+)
871+
872+add_library(
873+ mirclientplatformandroid SHARED
874+
875+ ${ANDROID_PLATFORM_SRC}
876 )
877
878+
879 set_target_properties(
880 mirclientplatformandroid PROPERTIES
881 OUTPUT_NAME mirclientplatform
882@@ -26,6 +32,26 @@
883 ${LIBHARDWARE_LIBRARIES}
884 )
885
886+add_library(
887+ mirclientplatformandroid-static STATIC
888+
889+ ${ANDROID_PLATFORM_SRC}
890+)
891+
892+set_target_properties(
893+ mirclientplatformandroid-static PROPERTIES
894+ OUTPUT_NAME mirclientplatform-static
895+ ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/android
896+)
897+
898+target_link_libraries(
899+ mirclientplatformandroid-static
900+ mirclient
901+
902+ ${LIBHARDWARE_LIBRARIES}
903+)
904+
905+
906 install(TARGETS mirclientplatformandroid LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/clientplatform/android)
907
908 if (MIR_TEST_PLATFORM STREQUAL "android")
909@@ -35,6 +61,12 @@
910 COMMAND ${CMAKE_COMMAND} -E create_symlink android/$<TARGET_FILE_NAME:mirclientplatformandroid> libmirclientplatform.so
911 WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
912 )
913+ add_custom_target(static-client-platform-symlink ALL
914+ DEPENDS mirclientplatformandroid-static
915+ COMMAND ${CMAKE_COMMAND} -E remove libmirclientplatform-static.a
916+ COMMAND ${CMAKE_COMMAND} -E create_symlink android/$<TARGET_FILE_NAME:mirclientplatformandroid-static> libmirclientplatform-static.a
917+ WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
918+ )
919
920 install(CODE
921 "execute_process(
922
923=== modified file 'src/client/client_platform_factory.h'
924--- src/client/client_platform_factory.h 2014-03-06 06:05:17 +0000
925+++ src/client/client_platform_factory.h 2014-07-22 03:06:31 +0000
926@@ -18,6 +18,7 @@
927 #ifndef MIR_CLIENT_CLIENT_PLATFORM_FACTORY_H_
928 #define MIR_CLIENT_CLIENT_PLATFORM_FACTORY_H_
929
930+#include <mir_toolkit/common.h>
931 #include <memory>
932
933 namespace mir
934@@ -42,7 +43,7 @@
935 };
936
937 extern "C" typedef std::shared_ptr<ClientPlatformFactory>(*CreateClientPlatformFactory)();
938-extern "C" std::shared_ptr<ClientPlatformFactory> create_client_platform_factory();
939+extern "C" MIR_API std::shared_ptr<ClientPlatformFactory> create_client_platform_factory();
940
941 }
942 }
943
944=== modified file 'src/client/mesa/CMakeLists.txt'
945--- src/client/mesa/CMakeLists.txt 2014-03-06 06:05:17 +0000
946+++ src/client/mesa/CMakeLists.txt 2014-07-22 03:06:31 +0000
947@@ -3,8 +3,7 @@
948 ${EGL_INCLUDE_DIRS}
949 )
950
951-add_library(
952- mirclientplatformmesa SHARED
953+set(MESA_PLATFORM_SRC
954
955 client_platform_factory.cpp
956 client_platform.cpp
957@@ -12,6 +11,18 @@
958 client_buffer.cpp
959 mesa_native_display_container.cpp
960 native_surface.cpp
961+)
962+
963+add_library(
964+ mirclientplatformmesa SHARED
965+
966+ ${MESA_PLATFORM_SRC}
967+)
968+
969+add_library(
970+ mirclientplatformmesa-static STATIC
971+
972+ ${MESA_PLATFORM_SRC}
973 )
974
975 set_target_properties(
976@@ -20,6 +31,12 @@
977 LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/mesa
978 )
979
980+set_target_properties(
981+ mirclientplatformmesa-static PROPERTIES
982+ OUTPUT_NAME mirclientplatform-static
983+ ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/mesa
984+)
985+
986 target_link_libraries(
987 mirclientplatformmesa
988 mirclient
989@@ -27,6 +44,13 @@
990 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
991 )
992
993+target_link_libraries(
994+ mirclientplatformmesa-static
995+ mirclient
996+
997+ ${DRM_LDFLAGS} ${DRM_LIBRARIES}
998+)
999+
1000 install(TARGETS mirclientplatformmesa LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mir/clientplatform/mesa)
1001
1002 if (MIR_TEST_PLATFORM STREQUAL "mesa")
1003@@ -36,6 +60,12 @@
1004 COMMAND ${CMAKE_COMMAND} -E create_symlink mesa/$<TARGET_FILE_NAME:mirclientplatformmesa> libmirclientplatform.so
1005 WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
1006 )
1007+ add_custom_target(static-client-platform-symlink ALL
1008+ DEPENDS mirclientplatformmesa-static
1009+ COMMAND ${CMAKE_COMMAND} -E remove libmirclientplatform-static.a
1010+ COMMAND ${CMAKE_COMMAND} -E create_symlink mesa/$<TARGET_FILE_NAME:mirclientplatformmesa-static> libmirclientplatform-static.a
1011+ WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
1012+ )
1013
1014 install(CODE
1015 "execute_process(
1016
1017=== added file 'src/client/symbols.map'
1018--- src/client/symbols.map 1970-01-01 00:00:00 +0000
1019+++ src/client/symbols.map 2014-07-22 03:06:31 +0000
1020@@ -0,0 +1,14 @@
1021+MIR_CLIENT_0.6 {
1022+ global:
1023+ mir_*;
1024+ extern "C++" {
1025+ mir::client::AgingBuffer*;
1026+ typeinfo?for?mir::client::AgingBuffer*;
1027+ typeinfo?name?for?mir::client::AgingBuffer*;
1028+ VTT?for?mir::client::AgingBuffer*;
1029+ virtual?thunk?to?mir::client::AgingBuffer*;
1030+ vtable?for?mir::client::AgingBuffer*;
1031+ };
1032+ local:
1033+ *;
1034+};
1035
1036=== modified file 'src/shared/logging/CMakeLists.txt'
1037--- src/shared/logging/CMakeLists.txt 2014-03-06 06:05:17 +0000
1038+++ src/shared/logging/CMakeLists.txt 2014-07-22 03:06:31 +0000
1039@@ -14,7 +14,11 @@
1040 #
1041 # Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1042
1043-add_library(mirsharedlogging STATIC
1044+set(MIR_SHARED_LOGGING_SOURCES
1045 dumb_console_logger.cpp
1046 input_timestamp.cpp
1047+)
1048+
1049+add_library(mirsharedlogging STATIC
1050+ ${MIR_SHARED_LOGGING_SOURCES}
1051 )
1052
1053=== modified file 'tests/acceptance-tests/CMakeLists.txt'
1054--- tests/acceptance-tests/CMakeLists.txt 2014-07-17 05:11:57 +0000
1055+++ tests/acceptance-tests/CMakeLists.txt 2014-07-22 03:06:31 +0000
1056@@ -63,7 +63,7 @@
1057 mir_acceptance_tests
1058
1059 mirserver
1060- mirclient
1061+ mirclient-static
1062 mirplatform
1063
1064 mir-test
1065
1066=== modified file 'tests/integration-tests/CMakeLists.txt'
1067--- tests/integration-tests/CMakeLists.txt 2014-04-17 01:34:35 +0000
1068+++ tests/integration-tests/CMakeLists.txt 2014-07-22 03:06:31 +0000
1069@@ -55,7 +55,7 @@
1070
1071 mirserver
1072 mirplatformgraphics
1073- mirclient
1074+ mirclient-static
1075 mirdraw
1076 mirtestdraw
1077
1078
1079=== modified file 'tests/unit-tests/CMakeLists.txt'
1080--- tests/unit-tests/CMakeLists.txt 2014-07-11 21:53:44 +0000
1081+++ tests/unit-tests/CMakeLists.txt 2014-07-22 03:06:31 +0000
1082@@ -43,10 +43,10 @@
1083 target_link_libraries(
1084 mir_unit_tests
1085
1086- mirclient
1087+ mirclient-static
1088 mirserver
1089 mirplatformgraphics
1090- mirclientplatform
1091+ mirclientplatform-static
1092 mirdraw
1093 mirtestdraw
1094 mirlogging

Subscribers

People subscribed via source and target branches