GTK Selection non-sense, need clarification



I've been reading up on the tutorial for GTK selections

        http://gtk.org/tutorial/gtk_tut-19.html


In the section:

      /* Print out the atoms we received */
      atoms = (GdkAtom *)selection_data->data;

      item_list = NULL;
      for (i=0; i<selection_data->length/sizeof(GdkAtom); i++)
        {
          char *name;
          name = gdk_atom_name (atoms[i]);
          if (name != NULL)
            g_print ("%s\n",name);
          else
            g_print ("(bad atom)\n");
        }


It seems to print out the retrieved selection as atoms.

I tried printing them out as characters but they all appear to be wrong
values from what I coppied to the clipboard.

The tutorial never shows how to fetch the actual data on the `clipboard',
why is that and how do I do that?


--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]