GnuCash  4.12-75-g66025ae738+
gnc-gtk-utils.h
Go to the documentation of this file.
1 /********************************************************************\
2  * gnc-gtk-utils.h -- utility functions based on glib functions *
3  * Copyright (C) 2006 David Hampton <hampton@employees.org> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA gnu@gnu.org *
21  * *
22 \********************************************************************/
23 
35 #ifndef GNC_GTK_UTILS_H
36 #define GNC_GTK_UTILS_H
37 
38 #include <gtk/gtk.h>
39 
44 void gnc_cbwe_set_by_string(GtkComboBox *cbwe, const gchar *text);
45 void gnc_cbwe_add_completion (GtkComboBox *cbwe);
46 void gnc_cbwe_require_list_item (GtkComboBox *cbwe);
47 
48 gboolean gnc_is_dark_theme (GdkRGBA *fg_color);
49 void gnc_style_context_get_background_color (GtkStyleContext *context,
50  GtkStateFlags state,
51  GdkRGBA *color);
52 void gnc_style_context_get_border_color (GtkStyleContext *context,
53  GtkStateFlags state,
54  GdkRGBA *color);
55 
56 GtkWidget *gnc_get_dialog_widget_from_id (GtkDialog *dialog, const gchar *id);
57 
60 #endif /* GNC_GTK_UTILS_H */
61 
void gnc_cbwe_set_by_string(GtkComboBox *cbwe, const gchar *text)
Find an entry in the GtkComboBox by its text value, and set the widget to that value.
Definition: gnc-gtk-utils.c:41
gboolean gnc_is_dark_theme(GdkRGBA *fg_color)
Return whether the current gtk theme is a dark one.
void gnc_style_context_get_border_color(GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color)
Wrapper to get the border color of a widget for a given state.
void gnc_style_context_get_background_color(GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color)
Wrapper to get the background color of a widget for a given state.
GtkWidget * gnc_get_dialog_widget_from_id(GtkDialog *dialog, const gchar *id)
Find the Widget defined by &#39;id&#39; in the dialog.