Re: Separate some back-end from Spectacle into a library

David Edmundson <[email protected]> Sat, 18 Jul 2026 18:19:13 +0100
Newsgroups gmane.comp.kde.devel.general
Message-ID <CAGeFrHD9oDgCEkPdVAezL7BPZGoZ0K2zP9CGMOWx=h9OoB9KKg@mail.gmail.com>
--0000000000000957bb0656e5e0ff
Content-Type: text/plain; charset="UTF-8"

There's nothing inherently wrong with just copy/pasting when it's a quite
small amount of code in 1-5 apps.

If things get beyond that, then sure, a library makes sense. Or if it ever
becomes a massive amount of code.

There is a coding guidelines about repeated code, but every coding
guidelines has an equal and opposite guideline. It's all about tradeoffs.

Right now I need selling on what the problem we're fixing is.

Also, out of curiosity, what's the app? Ideally we should be pushing the
portal API where possible, though I understand there are limitations.

David

On Mon, 15 Jun 2026, 16:49 Igor Mironchik, <[email protected]> wrote:

> Hello.
>
> I'd like to make a request to separate some back-end from Spectacle into
> a library. At least ImagePlatformKWin.h functionality may be reused by
> other developers on KDE platform for some third-party screen capturing.
> In can of move KDE to Wayland only this can be useful, at least for me :)
>
> This should not be a separate repository but in CMake should be splitted
> back-end in some library. Hm, and an option for building back-end only
> could be very great. :)
>
> What do you think?
>
> Thank you.
>
>

--0000000000000957bb0656e5e0ff
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"auto">There&#39;s nothing inherently wrong wi=
th just copy/pasting when it&#39;s a quite small amount of code in 1-5 apps=
.=C2=A0</div><div dir=3D"auto"><div dir=3D"auto"><br></div><div dir=3D"auto=
">If things get beyond that, then sure, a library makes sense. Or if it eve=
r becomes a massive amount of code.</div><div dir=3D"auto"><br></div><div d=
ir=3D"auto">There is a coding guidelines about repeated code, but every cod=
ing guidelines has an equal and opposite guideline. It&#39;s all about trad=
eoffs.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">Right now I=
 need selling on what the problem we&#39;re fixing is.=C2=A0</div><div dir=
=3D"auto"><br></div><div dir=3D"auto">Also, out of curiosity, what&#39;s th=
e app? Ideally we should be pushing the portal API where possible, though I=
 understand there are limitations.</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">David=C2=A0</div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Mon, 15 Jun 2026, 16:49 Igor Mironchik, &l=
t;<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"nore=
ferrer">[email protected]</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">Hello.<br>
<br>
I&#39;d like to make a request to separate some back-end from Spectacle int=
o <br>
a library. At least ImagePlatformKWin.h functionality may be reused by <br>
other developers on KDE platform for some third-party screen capturing. <br=
>
In can of move KDE to Wayland only this can be useful, at least for me :)<b=
r>
<br>
This should not be a separate repository but in CMake should be splitted <b=
r>
back-end in some library. Hm, and an option for building back-end only <br>
could be very great. :)<br>
<br>
What do you think?<br>
<br>
Thank you.<br>
<br>
</blockquote></div></div>

--0000000000000957bb0656e5e0ff--