int DIA_colorSel(uint8_t *r, uint8_t *g, uint8_t *b) { GtkWidget *dialog; int ret=0; GdkColor color; dialog=create_colorselectiondialog1(); color.red=*r<<8; color.green=*g<<8; color.blue=*b<<8; gtk_color_selection_set_current_color (GTK_COLOR_SELECTION(WID(color_selection1)),&color); if(GTK_RESPONSE_OK==gtk_dialog_run(GTK_DIALOG(dialog))) { gtk_color_selection_get_current_color (GTK_COLOR_SELECTION(WID(color_selection1)),&color); *r=color.red>>8; *g=color.green>>8; *b=color.blue>>8; ret=1; }
GtkWidget *new_ColorSelectionDialog() { if(! ColorSelectionDialog) { GtkWidget *colorselection; ColorSelectionDialog = create_colorselectiondialog1(); colorselection = GTK_COLOR_SELECTION_DIALOG(ColorSelectionDialog)->colorsel; gtk_color_selection_set_opacity(GTK_COLOR_SELECTION(colorselection),TRUE); } gtk_widget_show(ColorSelectionDialog); return ColorSelectionDialog; }