简体   繁体   中英

How do I find out programmatically which GTK+ theme and engine are being used?

The Murrine engine hard-codes some behavior that I need to duplicate in my own code, so I need to find out whether the Murrine engine is being used, or some other one. How can I do that? Which config files store this information, and is there an API that I can call?

http://developer.gnome.org/gtk3/stable/GtkSettings.html can help you parse some Gtk+ settings. At least reading the theme name is fairly simple:

GtkSettings *settings;
gchar *theme_name;
settings = gtk_settings_get_default();
g_object_get(settings, "gtk-theme-name", &theme_name, NULL);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM