[Gimp-developer] The clipboard selection in thegimp

2001-05-02 Thread Philip Van Hoof


Hi there,

I hope that this is not a FAQ, I am pretty new on this
mailinglist...

I am trying to get the copied selection in thegimp
(Select a region of an image loaded in thegimp and
then press ctl+c) in my gtk application. I already
know how to get for example the selection if this
is TEXT in another X or Gtk application .. 

void on_button_GetClip_clicked
(GtkButton   *button,
 gpointer user_data)
{
  static GdkAtom targets_atom = GDK_NONE;
  if (targets_atom == GDK_NONE)
  targets_atom = gdk_atom_intern (TEXT, FALSE);
  gtk_selection_convert (button, GDK_SELECTION_PRIMARY, 
  targets_atom, GDK_CURRENT_TIME);
}

void on_button_GetClip_selection_received
(GtkWidget   *widget,
 GtkSelectionData *data,
 guinttime,
 gpointer user_data)
{
  if (data-length  0)
  {
   GtkText *text;
   text = lookup_widget(GTK_WIDGET(widget),text_in);
   printf(%s,data-data);
  }
}   


Is this similar for getting the data which thegimp will
'broadcast' to the other X applications ?
my best guess is that I have to use another atom here :
targets_atom = gdk_atom_intern (TEXT, FALSE);

My next question will be .. how do I 'set' this clipboard
of thegimp from my external gtk application.. or perhaps
I will have to write a gimp plugin for something like that?
Again, I already know how to do this for TEXT clipboards .. 
(there was a very good example available for this at the 
Gtk+ documentation :
http://www.gtk.org/tutorial/sec-retrievingtheselection.html
http://www.gtk.org/tutorial/sec-supplyingtheselection.html)


-- 
Philip van Hoof aka freax (http://www.freax.eu.org)
irc: irc.openprojects.net mailto:freax @ pandora.be

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] The clipboard selection in thegimp

2001-05-02 Thread Sven Neumann

Hi,

Philip Van Hoof [EMAIL PROTECTED] writes:

 I am trying to get the copied selection in thegimp
 (Select a region of an image loaded in thegimp and
 then press ctl+c) in my gtk application. I already
 know how to get for example the selection if this
 is TEXT in another X or Gtk application .. 

Gimp does not use the X clipboard at all. Since we use 
GTK+, the clipboard is used for texts, but as far as I 
know, no other data types go through the clipboard.

 Is this similar for getting the data which thegimp will
 'broadcast' to the other X applications ?

There's no way for you to get the contents of gimps 
internal buffer thru X since it is not broadcasted.


Salut, Sven
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] The clipboard selection in thegimp

2001-05-02 Thread Philip Van Hoof

On 2001.05.02 16:30:24 +0200 Sven Neumann wrote:

  I am trying to get the copied selection in thegimp
- - 
 Gimp does not use the X clipboard at all. Since we use 
 GTK+, the clipboard is used for texts, but as far as I 
 know, no other data types go through the clipboard.
- -
 There's no way for you to get the contents of gimps 
 internal buffer thru X since it is not broadcasted.

I am not a plugin developper, but would it be possible
to write a plugin or- a module for thegimp that passes
or sets the data of the internal gimp-buffer available 
to other applications ? Or should I not even think about
trying to write something like that? Or is it way to
difficult anyway.. ? Or maybe other suggestions ?


--  
Philip van Hoof aka freax (http://www.freax.eu.org)
irc: irc.openprojects.net mailto:freax @ pandora.be

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] The clipboard selection in thegimp

2001-05-02 Thread Sven Neumann

Hi,

Philip Van Hoof [EMAIL PROTECTED] writes:

 I am not a plugin developper, but would it be possible
 to write a plugin or- a module for thegimp that passes
 or sets the data of the internal gimp-buffer available 
 to other applications ? 

Theoretically it should be possible since Gimp exports
functionality to copy to and paste from the buffer thru
the PDB:

  gimp-edit-copy
  gimp-edit-paste  

 Or maybe other suggestions ?

What about using temporary files? I guess this would be
easier and it solves the problem what format to use for 
the data.


Salut, Sven
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] (no subject)

2001-05-02 Thread Ken Ames

Hi,
  I am trying to build Gimp on OS/2 but am having trouble. Can 
somebody give me some guidance in this area? All the auto 
tools like autoconf, automake, and those give me errors like - 
aclocal: configure.in: 293: macro `AM_PATH_GLIB_' not found in 
library

any help would be appreciated. thanks.

Ken



___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer