comp.lang.ada
 help / color / mirror / Atom feed
* Using the Clipboard in Linux
@ 2009-11-07 20:48 Alex
  2009-11-08  9:52 ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Alex @ 2009-11-07 20:48 UTC (permalink / raw)


Greetings

I've written an application in windows that involves writing to the 
clipboard. I'm trying to write a version to work in Linux (Ubuntu 9.04 is 
what I'm developing on) and am struggling to get started with Florist.

Can anybody point me in the right direction of some good documentation. 
I've scoured the web but not found anything just yet - if anybody can 
suggest a good place to start then I'd really appreciate it.

Please note I'm not asking for code just somewhere which might have some 
documentation - e.g. tutorial or notes or anything really.

Many thanks

Alex



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using the Clipboard in Linux
  2009-11-07 20:48 Using the Clipboard in Linux Alex
@ 2009-11-08  9:52 ` Stephen Leake
  2009-11-08 19:55   ` Tero Koskinen
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2009-11-08  9:52 UTC (permalink / raw)


Alex <false_email@dontwantspam.com> writes:

> I've written an application in windows that involves writing to the 
> clipboard. I'm trying to write a version to work in Linux (Ubuntu 9.04 is 
> what I'm developing on) and am struggling to get started with Florist.

Linux the operating system kernel doesn't have a clipboard.

X Windows does, and particular window managers may have other
variations on it.

So you need to look in X Windows documentation, not Linux documentation.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using the Clipboard in Linux
  2009-11-08  9:52 ` Stephen Leake
@ 2009-11-08 19:55   ` Tero Koskinen
  2009-11-09 21:09     ` Alex
  0 siblings, 1 reply; 6+ messages in thread
From: Tero Koskinen @ 2009-11-08 19:55 UTC (permalink / raw)


On Sun, 08 Nov 2009 04:52:29 -0500 Stephen Leake wrote:

> Alex <false_email@dontwantspam.com> writes:
> 
> > I've written an application in windows that involves writing to the 
> > clipboard. I'm trying to write a version to work in Linux (Ubuntu 9.04 is 
> > what I'm developing on) and am struggling to get started with Florist.
> 
> Linux the operating system kernel doesn't have a clipboard.
> 
> X Windows does, and particular window managers may have other
> variations on it.
> 
> So you need to look in X Windows documentation, not Linux documentation.

Probably the easiest way is to use GtkAda and its clipboard methods:
http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-clipboard.html

And please note that X Window System (which GtkAda uses) has two different
clipboards, PRIMARY and CLIPBOARD. (This mostly matters if you need to
communicate between two different programs via clipboard.)

-- 
Tero Koskinen - http://iki.fi/tero.koskinen/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using the Clipboard in Linux
  2009-11-08 19:55   ` Tero Koskinen
@ 2009-11-09 21:09     ` Alex
  2009-11-10  8:00       ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Alex @ 2009-11-09 21:09 UTC (permalink / raw)


On Sun, 08 Nov 2009 21:55:19 +0200, Tero Koskinen wrote:

> On Sun, 08 Nov 2009 04:52:29 -0500 Stephen Leake wrote:
> 
>> Alex <false_email@dontwantspam.com> writes:
>> 
>> > I've written an application in windows that involves writing to the
>> > clipboard. I'm trying to write a version to work in Linux (Ubuntu
>> > 9.04 is what I'm developing on) and am struggling to get started with
>> > Florist.
>> 
>> Linux the operating system kernel doesn't have a clipboard.
>> 
>> X Windows does, and particular window managers may have other
>> variations on it.
>> 
>> So you need to look in X Windows documentation, not Linux
>> documentation.
> 
> Probably the easiest way is to use GtkAda and its clipboard methods:
> http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/
gtkada_rm/gtkada_rm/gtk-clipboard.html
> 
> And please note that X Window System (which GtkAda uses) has two
> different clipboards, PRIMARY and CLIPBOARD. (This mostly matters if you
> need to communicate between two different programs via clipboard.)

Tero and Stephen

Thanks very much for your advice - it's a great help.

My application is using GTK anyway but for the windows version I used the 
Win32 API so I assumed that symmetrically I would need the Linux API to 
do the same on windows. Thanks for clearing that up - I should be able to 
crack on and effect the clipboard part of my application with GTK now.

I have to say that I've really found this group a helpful bunch - the Ada 
community really does seem a good crowd.

Thanks again chaps

Alex



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using the Clipboard in Linux
  2009-11-09 21:09     ` Alex
@ 2009-11-10  8:00       ` Stephen Leake
  2009-11-10 21:16         ` Alex
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2009-11-10  8:00 UTC (permalink / raw)


Alex <false_email@dontwantspam.com> writes:

> My application is using GTK anyway but for the windows version I used the 
> Win32 API 

I don't understand; Gtk is available on Win32, and (should) provide
everything you need.

I guess you just didn't realize Gtk handled the clipboard?

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using the Clipboard in Linux
  2009-11-10  8:00       ` Stephen Leake
@ 2009-11-10 21:16         ` Alex
  0 siblings, 0 replies; 6+ messages in thread
From: Alex @ 2009-11-10 21:16 UTC (permalink / raw)


On Tue, 10 Nov 2009 03:00:21 -0500, Stephen Leake wrote:

> Alex <false_email@dontwantspam.com> writes:
> 
>> My application is using GTK anyway but for the windows version I used
>> the Win32 API
> 
> I don't understand; Gtk is available on Win32, and (should) provide
> everything you need.
> 
> I guess you just didn't realize Gtk handled the clipboard?

I didn't realise that Gtk provided a clipboard access so I did it with 
the win32 api. I guess I can revisit that too.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-10 21:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-07 20:48 Using the Clipboard in Linux Alex
2009-11-08  9:52 ` Stephen Leake
2009-11-08 19:55   ` Tero Koskinen
2009-11-09 21:09     ` Alex
2009-11-10  8:00       ` Stephen Leake
2009-11-10 21:16         ` Alex

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox