title: clipboard lastupdated: 2008-08-24 GNUstep's clipboard implementation should work well with other desktop environments (that is, should fully support the X selection mechanism and conventions).

Tasks

Notes

gpbs

  • It looks like we need both gpbs and X selection mechanism.
  • gpbs will handle the OpenStep side of things
  • gpbs should not handle the X selection interface, since gpbs may be running on a different host from the X server, and may not be able to connect to the X server.
  • X selection mechanism should be handled by gnustep-back
  • need to modify the interface between gnustep-gui and gnustep-back
    • gnustep-gui should pass clipboard requests to gnustep-gui

pasteboard types/selection targets

  • pasteboard should advertise support for targets (by responding to the TARGETS target) named after the GNUstep pasteboard type names (NS*PboardType), the standard X selection targets, and MIME types
  • obviously, GNUstep programs should favour GNUstep pasteboard type names when requesting from the X selection
  • pasteboard class should maintain a mapping of GNUstep pasteboard types and X selection targets, and conversion functions
  • mappings should be given a priority.
    • e.g. both NSStringPboardType and NSTabularTextPboardType could provide data for a selection target TEXT, but if TEXT is requested, and both pasteboard types are provided, NSStringPboardType should be used

pasteboard names

  • pasteboard names correspond to selection names
  • CLIPBOARD should be mapped to NSGeneralPboard
  • XdndSelection should be mapped to NSDragPboard
  • when a program creates a new unique pasteboard name, it should be of the form "GS_<PID>_<SERIAL>" to ensure uniqueness

References