/* data - GtkSelectionData to fetch content from targets - map of handled types of passed data time - creation timestamp ud - no idea what it is for */ Sprite *new_sprite( GtkSelectionData *data, int targets, guint time, gpointer ud ) { debug(">>> new_sprite()"); (void)data; (void)targets; (void)time; (void)ud; Sprite *s = NULL; GdkPixbuf *data_pic = NULL; gchar **data_uris = NULL; guchar *data_text = NULL; const void *d[][3] = { {&data_pic, >k_selection_data_get_pixbuf, &Data_Image }, {&data_uris, >k_selection_data_get_uris, &Data_Uri }, {&data_text, >k_selection_data_get_text, &Data_Text }, }; /* {{{ msg(…) - output warning message on converting failure */ void msg(int target) { char m[64] = "new_sprite(): data cannot be converted: "; warn( strcat(m, get_data_name(target)) ); }
int search_dname_and_other(void){ char *data_name; dname[0]='\0'; data_name=get_data_name(); if(data_name==NULL) return 1; else if(strcmp(data_name,"NO HITS")!=0 && fileend!=NULL){ get_data_length_and_sp_name(); } return 0; }