Esempio n. 1
0
gboolean
panel_check_dnd_target_data (GtkWidget      *widget,
			     GdkDragContext *context,
			     guint          *ret_info,
			     GdkAtom        *ret_atom)
{
	GList *l;

	g_return_val_if_fail (widget, FALSE);

	if (!PANEL_IS_TOPLEVEL  (widget) &&
	    !BUTTON_IS_WIDGET (widget))
		return FALSE;

	if (!(gdk_drag_context_get_actions (context) & (GDK_ACTION_COPY|GDK_ACTION_MOVE)))
		return FALSE;

	for (l = gdk_drag_context_list_targets (context); l; l = l->next) {
		GdkAtom atom;
		guint   info;

		atom = GDK_POINTER_TO_ATOM (l->data);

		if (gtk_target_list_find (get_target_list (), atom, &info)) {
			if (ret_info)
				*ret_info = info;

			if (ret_atom)
				*ret_atom = atom;
			break;
		}
	}

	return l ? TRUE : FALSE;
}
Esempio n. 2
0
void _add_block(t_context *C,t_block *block)
{
	// GET LIST
	t_lst *list=get_target_list(C);

	// ADD TO MAIN LIST
	list_add_global(list,block);

	// SET BLOCK POS
	vset3f(block->pos,C->app->mouse->x,C->app->mouse->y,0);

}
Esempio n. 3
0
/* Check if a target type is not registered with the kernel after a failure. */
static int
check_table(struct lib_context *lc, char *table)
{
	return handle_table(lc, NULL, table, get_target_list());
}