1

XDND プロトコルは、X11 アプリケーションでの dnd サポートに使用されます。 http://www.newplanetsoftware.com/xdnd/

Gtk は X11 に基づいていますが、gtk は XDND プロトコルだけをサポートしていません。

typedef enum
{
  GDK_DRAG_PROTO_MOTIF,
  GDK_DRAG_PROTO_XDND,
  GDK_DRAG_PROTO_ROOTWIN,     /* A root window with nobody claiming
               * drags */
  GDK_DRAG_PROTO_NONE,        /* Not a valid drag window */
  GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
  GDK_DRAG_PROTO_OLE2,        /* The complex OLE2 dnd (not implemented) */
  GDK_DRAG_PROTO_LOCAL            /* Intra-app */
} GdkDragProtocol;

そして、SWTで値を調べました

public class GdkDragContext {     
    /** @field cast=(GdkDragProtocol) */
   public int protocol;
    /** @field cast=(gboolean) */
   public boolean is_source;
    /** @field cast=(GdkWindow *) */
   public long /*int*/ source_window;
    /** @field cast=(GdkWindow *) */
   public long /*int*/ dest_window;
    /** @field cast=(GList *) */
   public long /*int*/ targets;
    /** @field cast=(GdkDragAction) */
   public int actions;
    /** @field cast=(GdkDragAction) */
   public int suggested_action;
    /** @field cast=(GdkDragAction) */
   public int action; 
    /** @field cast=(guint32) */
   public int start_time;
   public static final int sizeof = OS.GdkDragContext_sizeof();
}

protocol の値は 1 なので、XDND プロトコルも使用されます。では、X11 と SWT アプリケーションの間でデータを交換することは可能ですか?つまり、x11 から SWT にドラッグしたり、逆にドラッグしたりできますか?

4

0 に答える 0