# Platform dependent but UI independent plugins

**URL:** <https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389>\
**Category:** Libpurple\
**Tags:** request-for-comments, development\
**Created:** [June 3, 2026, 7:51pm UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389 "2026-06-03T19:51:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grim](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/grim/32/4_2.png) [@grim](https://discourse.imfreedom.org/u/grim)\
**Post date:** [June 3, 2026, 7:51pm UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/1 "2026-06-03T19:51:21Z")

</div>

I was randomly looking at what would be necessary to create an idle source for win32 (more on that in another post) when I ran across an interesting issue.

Now that we have Pidgin and Gaim we have an odd scenario where we have platform dependent plugins that aren’t actually tied to a libpurple user interface. This isn’t exactly a new thing as we had Pidgin and Finch in the past, but those two were different enough that there wasn’t much over lap.

However, right now we have an `idle-xscreensaver` plugin which currently resides in `pidgin/plugins` as it was considered UI specific because it uses X11. But Gaim an use X11 as well. We also have the credential providers that are platform specific, `KeyChain Access` for macOS, `WinCred` for Windows, and `libsecret` for everything else. But these live in libpurple.

I’m thinking we should move the idle sources into `libpurple/plugins` as they are reusable and control them with build features so that users don’t have to disable them if their dependencies are not found.

This would then also set a precedent going forward that if something using a platform specific API like these, then it’s okay for them to go into libpurple as long as they don’t pull in a specific UI toolkit as a result and would make it easier for other users interfaces to benefit from these without needing yet another additional library/repository of plugins.

Thoughts?

---

<div class="post-metadata">

**Author:** ![grim](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/grim/32/4_2.png) [@grim](https://discourse.imfreedom.org/u/grim)\
**Post date:** [June 3, 2026, 9:24pm UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/2 "2026-06-03T21:24:45Z")

</div>

I just double checked and it `idle-xscreensaver` does pull in `gtk4-x11` for `gdk_x11_display_get_xdisplay` but in theory we should be able to remove the gdk specific parts as they’re just wrappers around the raw X11 code.

---

<div class="post-metadata">

**Author:** ![grim](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/grim/32/4_2.png) [@grim](https://discourse.imfreedom.org/u/grim)\
**Post date:** [June 4, 2026, 3:29am UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/3 "2026-06-04T03:29:20Z")

</div>

I went ahead and removed the GDK dependency in [/r/4631](https://reviews.imfreedom.org/r/4631/).

---

<div class="post-metadata">

**Author:** ![ivanhoe](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/ivanhoe/32/24_2.png) [@ivanhoe](https://discourse.imfreedom.org/u/ivanhoe)\
**Post date:** [June 4, 2026, 7:50pm UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/4 "2026-06-04T19:50:51Z")

</div>

I don’t see a problem with that since people who don’t want to pull in graphical stuff can just disable it.

---

<div class="post-metadata">

**Author:** ![hoehermann](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/hoehermann/32/181_2.png) [@hoehermann](https://discourse.imfreedom.org/u/hoehermann)\
**Post date:** [June 5, 2026, 9:16am UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/5 "2026-06-05T09:16:15Z")

</div>

Looking at Arch Linux, I can see that many packagers prefer minimal-dependency builds (without GUI dependencies for e.g. protocol bridges). It would be nice to have the meson files organized in such a way that a libpurple3 package can be built with as well as without `idle-xscreensaver`. In that context, it would also be nice for a possibility to only build the plug-in separately so it can be put into a pidgin3 package.

---

<div class="post-metadata">

**Author:** ![grim](https://yyz1.discourse-cdn.com/flex007/user_avatar/discourse.imfreedom.org/grim/32/4_2.png) [@grim](https://discourse.imfreedom.org/u/grim)\
**Post date:** [June 5, 2026, 5:54pm UTC](https://discourse.imfreedom.org/t/platform-dependent-but-ui-independent-plugins/389/6 "2026-06-05T17:54:46Z")

</div>

We’re going to be splitting libpurple out at some point. So these concerns will be split up a bit.

[/r/4632](https://reviews.imfreedom.org/r/4632/) has been opened to move this to libpurple and added a configuration option to build it or not.
