Ejemplo n.º 1
0
static void gtkDragBegin(GtkWidget *widget, GdkDragContext *drag_context, Ihandle *ih)
{
  IFnii cbDragBegin = (IFnii)IupGetCallback(ih, "DRAGBEGIN_CB");
  if(cbDragBegin)
  {
    int x, y;
    gdk_window_get_pointer(iupgtkGetWindow(widget), &x, &y, NULL);

    if (cbDragBegin(ih, x, y) == IUP_IGNORE)
      gdk_drag_abort(drag_context, 0);
  }
}
Ejemplo n.º 2
0
int
clip_GDK_DRAGABORT(ClipMachine * cm)
{
        C_object *ccontext = _fetch_co_arg(cm);
        guint32       time = _clip_parni(cm, 2);

	if (!ccontext || ccontext->type != GDK_TYPE_DRAG_CONTEXT)
        	goto err;
	CHECKARG(2, NUMERIC_t);

        gdk_drag_abort((GdkDragContext*)ccontext->object, time);

	return 0;
err:
	return 1;
}
Ejemplo n.º 3
0
static VALUE
rg_drag_abort(VALUE self, VALUE time)
{
    gdk_drag_abort(_SELF(self), NUM2UINT(time));
    return self;
}
Ejemplo n.º 4
-1
static void process_dnd_source_mouse_release(GdkWindow *window, GdkEventButton *event) {
    glass_gdk_master_pointer_ungrab();
    
    if (GLASS_GDK_DRAG_CONTEXT_GET_SELECTED_ACTION(get_drag_context())) {
        gdk_drag_drop(get_drag_context(), GDK_CURRENT_TIME);
    } else {
        gdk_drag_abort(get_drag_context(), GDK_CURRENT_TIME);
        /* let the gdk_drag_abort messages handled before finish */
        gdk_threads_add_idle((GSourceFunc) dnd_finish_callback, NULL);
    }
}