[ANN] win32-clipboard 0.1.0

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default [ANN] win32-clipboard 0.1.0

    Hi all,

    I'm happy to announce the first release of the
    win32-clipboard package.

    What is it? - An interface to the Win32 Clipboard
    functions.

    What does it do? - Allows you to get, set and clear
    data on the clipboard on Win32 platforms. There's
    also a function for determining the number of formats.

    Is that it? - Yes, that's it. What were you expecting
    from a clipboard interface?

    In the future I plan to add a bit more functionality
    with regards to enumerating and registering clipboard
    formats.

    Enjoy!

    Dan

    __________________________________
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    [url]http://companion.yahoo.com/[/url]


    Daniel Berger Guest

  2. Similar Questions and Discussions

    1. What is Contribute doing to my clipboard?
      Hello, I am not really a user of Contribute, but I have CS3, so I have it available to me. Unfortunately, I think it's causing me more grief than...
    2. [RFC] IO::Clipboard
      All, It occurred to me that given Ryan King's Clipboard module, an IO::Clipboard module wouldn't be too hard. First cut: it's a subclass of...
    3. Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available.
      Does anyone know of an alternate method to contact Dave Roth (other then rothd@roth.net )? It appears that his entire domain is unavailable...
    4. Deleting A Clipboard
      How do I delete something from my Clipboard because I cannot to be able too? Can siomeone please help me figure this out?
    5. Clipboard
      I cannot find my clipboard
  3. #2

    Default Re: [ANN] win32-clipboard 0.1.0

    Oops - forgot the link:

    [url]http://rubyforge.org/projects/win32utils/[/url]

    Also available on the RAA.

    Regards,

    Dan



    __________________________________
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    [url]http://companion.yahoo.com/[/url]

    Daniel Berger Guest

  4. #3

    Default Re: [ANN] win32-clipboard 0.1.0

    You know what I would use this for? If I ever got around to it? :)

    I use a KVM to switch back and forth between Windows and Linux.
    I've been thinking of a little drb utility that would cut-and-paste
    between them. Should be pretty simple really. (99% of my cut/paste
    is simple text.)

    Someone once pointed me to a utility to do something similar, but
    for some reason it seemed like overkill to me.

    Hal


    Hal Fulton Guest

  5. #4

    Default Re: [ANN] win32-clipboard 0.1.0

    Hal Fulton wrote:
    > You know what I would use this for? If I ever got around to it? :)
    >
    > I use a KVM to switch back and forth between Windows and Linux.
    > I've been thinking of a little drb utility that would cut-and-paste
    > between them. Should be pretty simple really. (99% of my cut/paste
    > is simple text.)
    If you do end up building it, I'll definitely grab a copy. I KVM between Win2000 and Linux all the time at home.

    H.





    Harry Ohlsen Guest

  6. #5

    Default Re: [ANN] win32-clipboard 0.1.0

    Harry Ohlsen wrote:
    > Hal Fulton wrote:
    >
    >> You know what I would use this for? If I ever got around to it? :)
    >>
    >> I use a KVM to switch back and forth between Windows and Linux.
    >> I've been thinking of a little drb utility that would cut-and-paste
    >> between them. Should be pretty simple really. (99% of my cut/paste
    >> is simple text.)
    >
    >
    > If you do end up building it, I'll definitely grab a copy. I KVM
    > between Win2000 and Linux all the time at home.
    Well, why don't we knock it out, then? What's your GUI of choice?

    Hal



    Hal Fulton Guest

  7. #6

    Default Re: [ANN] win32-clipboard 0.1.0

    Hey Hal,
    > Well, why don't we knock it out, then? What's your GUI of choice?
    Do you mean Linux desktop? I tend to use KDE, but Gnome is also fine.

    H.





    Harry Ohlsen Guest

  8. #7

    Default Re: [ANN] win32-clipboard 0.1.0

    > Well, why don't we knock it out, then? What's your GUI of choice?

    ... or did you mean GUI toolkit? I've played a bit with FX/Ruby.




    Harry Ohlsen Guest

  9. #8

    Default Re: [ANN] win32-clipboard 0.1.0

    Harry Ohlsen wrote:
    >> Well, why don't we knock it out, then? What's your GUI of choice?
    >
    >
    > ... or did you mean GUI toolkit? I've played a bit with FX/Ruby.
    Yes, that's what I meant. I'm most familiar with fxruby, but there
    are still many parts that won't fit in my brain. And I can never
    write an app from scratch without going and looking at an old one
    to see how it works.

    Suppose you crank out a little text window with a Send button, and
    I'll work on the drb part?

    I think it's acceptable to make the user hit Send, although it
    would be nicer if it just sensed when the text had changed.

    I'm not sure how to stick something in the clipboard on the Linux
    side, though... for now, might have to re-copy the text when it
    appears.

    Hal




    Hal Fulton Guest

  10. #9

    Default Re: [ANN] win32-clipboard 0.1.0

    --qjNfmADvan18RZcF
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
    > I'm not sure how to stick something in the clipboard on the Linux
    > side, though... for now, might have to re-copy the text when it
    > appears.
    You probably want to check out a program like xclip
    ([url]http://people.debian.org/~kims/xclip[/url]). It allows you to put stuff into
    the clipboard and take stuff out of the clipboard from the command line.
    You can either use this directory, or just read the code to see how it
    is done.

    --=20
    Zachary P. Landau <kapheine@hypa.net>
    GPG: gpg --recv-key 0x24E5AD99 | [url]http://kapheine.hypa.net/kapheine.asc[/url]

    --qjNfmADvan18RZcF
    Content-Type: application/pgp-signature
    Content-Disposition: inline

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQE/vGDCCwWyMCTlrZkRAoFRAJ9UVQrpX2NEtBPMaRr6CWS6li/XiQCdHdDW
    9BCbr+T9m42qHLdNn4Ka82U=
    =R/Uf
    -----END PGP SIGNATURE-----

    --qjNfmADvan18RZcF--


    Zachary P. Landau Guest

  11. #10

    Default Re: [ANN] win32-clipboard 0.1.0

    Zachary P. Landau wrote:
    >>I'm not sure how to stick something in the clipboard on the Linux
    >>side, though... for now, might have to re-copy the text when it
    >>appears.
    >
    >
    > You probably want to check out a program like xclip
    > ([url]http://people.debian.org/~kims/xclip[/url]). It allows you to put stuff into
    > the clipboard and take stuff out of the clipboard from the command line.
    > You can either use this directory, or just read the code to see how it
    > is done.
    >
    KDE specific, but as it was mentioned earlier in this thread:
    you can use DCOP to interact with the clipboard:

    [url]https://www.linux-magazine.com/issue/36/KDE_Scripting_DCOP.pdf[/url]

    There is a perl example in the article, but I think stable ruby bindings are on
    their way.

    Raph

    Raphael Bauduin Guest

  12. #11

    Default Re: [ANN] win32-clipboard 0.1.0

    --tuYRN1zEaS85jg/Y
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Hal Fulton (hal9000@hypermetrics.com) wrote:
    > I'm not sure how to stick something in the clipboard on the Linux
    > side, though... for now, might have to re-copy the text when it
    > appears.
    Just have a clip history of the last N things sent... Much more useful
    than just dumping it straight into the clipboard.

    --=20
    Eric Hodel - [email]drbrain@segment7.net[/email] - [url]http://segment7.net[/url]
    All messages signed with fingerprint:
    FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04


    --tuYRN1zEaS85jg/Y
    Content-Type: application/pgp-signature
    Content-Disposition: inline

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.2 (FreeBSD)

    iD8DBQE/vSBiMypVHHlsnwQRAnduAKC4Dls+jPPdAS8iV5fJ9aX7R2VTgQ CeMgkV
    4vDC5g8TFsgax063ZNvDFD8=
    =cfpt
    -----END PGP SIGNATURE-----

    --tuYRN1zEaS85jg/Y--

    Eric Hodel Guest

  13. #12

    Default Re: [ANN] win32-clipboard 0.1.0

    il Thu, 20 Nov 2003 11:30:28 +0100, Raphael Bauduin
    <raphael.bauduin@be.easynet.net> ha scritto::

    >[url]https://www.linux-magazine.com/issue/36/KDE_Scripting_DCOP.pdf[/url]
    >
    >There is a perl example in the article, but I think stable ruby bindings are on
    >their way.
    you can however use kxmlrpcd and script kde via xmlrpc, fairly easy
    gabriele renzi Guest

  14. #13

    Default Re: [ANN] win32-clipboard 0.1.0

    Hal Fulton wrote:

    Sorry for the slow reply ... timezones.
    > Suppose you crank out a little text window with a Send button, and
    > I'll work on the drb part?
    Sounds good to me. It's Friday here, so I should be able to have a go at it tomorrow morning.
    > I think it's acceptable to make the user hit Send, although it
    > would be nicer if it just sensed when the text had changed.
    I think having to press Send isn't such a bad thing. A lot of the time you won't be switching backwards and forwards between the two systems. Hence, there'll be many things that end up in the clipboard on one side that you don't necessarily want to send to the other. Perhaps it could be an option.

    I also think the idea of keeping the last N clips that were transferred, as Eric suggested, is a good idea.

    Another thought is that we could use pull rather than push. Ie, each side keeps track of all the things that have gone through the clipboard (assuming that's possible) and when you're sitting on Linux, say, and want something that was copied to the Windows clipboard, you ask the Linux instance of the client to show you the Windows clips ... and vice versa.

    Cheers,

    Harry O.




    Harry Ohlsen Guest

  15. #14

    Default Re: [ANN] win32-clipboard 0.1.0

    Raphael Bauduin wrote:
    > KDE specific, but as it was mentioned earlier in this thread:
    > you can use DCOP to interact with the clipboard:
    >
    > [url]https://www.linux-magazine.com/issue/36/KDE_Scripting_DCOP.pdf[/url]
    >
    > There is a perl example in the article, but I think stable ruby bindings
    > are on their way.
    It would be really nice if there was a common mechanism used by all X11 desktops for this kind of generic stuff, rather than each having their own :-(.

    I don't suppose there's some way we can get to a lower level API, and avoid being KDE (or Gnome or ...) specific. Does anyone have any ideas on whether that's feasible?

    H.




    Harry Ohlsen Guest

  16. #15

    Default Re: [ANN] win32-clipboard 0.1.0

    --5xSkJheCpeK0RUEJ
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable
    > >KDE specific, but as it was mentioned earlier in this thread:
    > >you can use DCOP to interact with the clipboard:
    > >
    > >[url]https://www.linux-magazine.com/issue/36/KDE_Scripting_DCOP.pdf[/url]
    > >
    > >There is a perl example in the article, but I think stable ruby bindings=
    =20
    > >are on their way.
    >=20
    > It would be really nice if there was a common mechanism used by all X11=
    =20
    > desktops for this kind of generic stuff, rather than each having their ow=
    n=20
    > :-(.
    >=20
    > I don't suppose there's some way we can get to a lower level API, and avo=
    id=20
    > being KDE (or Gnome or ...) specific. Does anyone have any ideas on wheth=
    er=20
    > that's feasible?
    There mostly is. The problem is not every piece of software follows it
    exactly. Check out
    [url]http://freedesktop.org/Standards/clipboards-spec/clipboards.txt[/url] for an
    explanation of how the clipboard is SUPPOSED to be implemented. I think
    most software does follow this, however.

    That xclip program I posted seems to follow these standards. Also, the
    code is split up into a library and a command-line program, so it
    probably wouldn't be particularly difficult to create ruby bindings for
    it. The xclip link was [url]http://people.debian.org/~kims/xclip/[/url] for those
    who missed it.

    --=20
    Zachary P. Landau <kapheine@hypa.net>
    GPG: gpg --recv-key 0x24E5AD99 | [url]http://kapheine.hypa.net/kapheine.asc[/url]

    --5xSkJheCpeK0RUEJ
    Content-Type: application/pgp-signature
    Content-Disposition: inline

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQE/vWGZCwWyMCTlrZkRAmylAJoCHqL1xLw2Xclex3YociGl6WS6nw CfW7Jo
    LZEqMGrqrMQ2YtexB0GiSng=
    =C4ZD
    -----END PGP SIGNATURE-----

    --5xSkJheCpeK0RUEJ--


    Zachary P. Landau Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139