// LookupColor is a wrapper around gtk_style_context_lookup_color(). func (v *StyleContext) LookupColor(colorName string) (*gdk.RGBA, bool) { cstr := (*C.gchar)(C.CString(colorName)) defer C.free(unsafe.Pointer(cstr)) gdkColor := gdk.NewRGBA() ret := C.gtk_style_context_lookup_color(v.native(), cstr, (*C.GdkRGBA)(unsafe.Pointer(gdkColor.Native()))) return gdkColor, gobool(ret) }
// GetColor is a wrapper around gtk_style_context_get_color(). func (v *StyleContext) GetColor(state StateFlags) *gdk.RGBA { gdkColor := gdk.NewRGBA() C.gtk_style_context_get_color(v.native(), C.GtkStateFlags(state), (*C.GdkRGBA)(unsafe.Pointer(gdkColor.Native()))) return gdkColor }
// GetRGBA() is a wrapper around gtk_color_chooser_get_rgba(). func (v *ColorChooser) GetRGBA() *gdk.RGBA { gdkColor := gdk.NewRGBA() C.gtk_color_chooser_get_rgba(v.native(), (*C.GdkRGBA)(unsafe.Pointer(gdkColor.Native()))) return gdkColor }