ewerybody / a2

Autohotkey module managing and developing framework.
GNU General Public License v3.0
63 stars 10 forks source link

Make `clipboard` lib use `WinClip` #252

Open ewerybody opened 2 years ago

ewerybody commented 2 years ago

... Continuing discussion from issue a2.modules#61. I'm sorry to go around from one thing to another. But I think this is important enough to have an issue on its own. :) this has some wide implications on almost any module.

short wrap-up:

clipboard is the a2-built-in library (partially ac'ticAid ported) to do things with the OS clipboard. It follows the libname_funcname pattern so one can make use of it by simply calling and let Autohotkey fetch it from the library. WinClip is a dedicated windows clipboard library (duh) originally by Deo, then improved by the community over the years. @Cyberklabauter contributed a latest version that's already checked in here. it comes in 2 files and provides a class with static and instance methods. So far I don't see how we could make it work with libname_funcname pattern.

@Cyberklabauter raised the concern that clipboard lib and WinClip would .. exclude each other? So the idea is still to have WinClip in the library! so that one can:

#Include <WinClip>
#Include <WinClipAPI>.

WinClip.something...

if needed but also to keep the clipbard_something() calls where they already are that enable us to have inline access to these without extra importing anything explicitly. So we can totally have BOTH!! :)

But we should make the clipboard lib as good as possible! It can totally make use of a global WinClip object as well!

Cyberklabauter commented 2 years ago

This sounds like a good solution, In terms of possibilities as well as compatibility to the a2 code. Of course, I do not have a overview of the whole subject so I can't really judge it.

PS: The word file is a copy of the website you mentioned. Sometime these private sites are gone. That is why I took a copy.