c228a01d0fad0229c172639bd5f9d6d7f84d995b
[clutter-gtk] / clutter-gtk / gtk-clutter-util.h
1 /* gtk-clutter-util.h: GTK+ integration utilities
2  *
3  * Copyright (C) 2008 OpenedHand
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not see <http://www.fsf.org/licensing>.
17  *
18  * Authors:
19  *   Emmanuele Bassi  <ebassi@openedhand.com>
20  */
21
22 #if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
23 #error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
24 #endif
25
26 #ifndef __GTK_CLUTTER_UTIL_H__
27 #define __GTK_CLUTTER_UTIL_H__
28
29 #include <gtk/gtk.h>
30 #include <clutter/clutter.h>
31
32 G_BEGIN_DECLS
33
34 /**
35  * ClutterGtkInitError:
36  * @CLUTTER_INIT_ERROR_LAST: Placeholder
37  * @CLUTTER_INIT_ERROR_GTK: Unable to initialize GTK+
38  *
39  * Extension of the #ClutterInitError enumeration for the integration
40  * with GTK+
41  *
42  * Since: 0.8
43  */
44 typedef enum {
45   CLUTTER_INIT_ERROR_LAST = CLUTTER_INIT_ERROR_INTERNAL,
46
47   CLUTTER_INIT_ERROR_GTK  = (CLUTTER_INIT_ERROR_LAST - 1)
48 } ClutterGtkInitError;
49
50 ClutterInitError gtk_clutter_init           (int            *argc,
51                                              char         ***argv);
52 ClutterInitError gtk_clutter_init_with_args (int            *argc,
53                                              char         ***argv,
54                                              const char     *parameter_string,
55                                              GOptionEntry   *entries,
56                                              const char     *translation_domain,
57                                              GError        **error);
58
59 void          gtk_clutter_get_fg_color               (GtkWidget      *widget,
60                                                       GtkStateType    state,
61                                                       ClutterColor   *color);
62 void          gtk_clutter_get_bg_color               (GtkWidget      *widget,
63                                                       GtkStateType    state,
64                                                       ClutterColor   *color);
65 void          gtk_clutter_get_text_color             (GtkWidget      *widget,
66                                                       GtkStateType    state,
67                                                       ClutterColor   *color);
68 void          gtk_clutter_get_text_aa_color          (GtkWidget      *widget,
69                                                       GtkStateType    state,
70                                                       ClutterColor   *color);
71 void          gtk_clutter_get_base_color             (GtkWidget      *widget,
72                                                       GtkStateType    state,
73                                                       ClutterColor   *color);
74 void          gtk_clutter_get_light_color            (GtkWidget      *widget,
75                                                       GtkStateType    state,
76                                                       ClutterColor   *color);
77 void          gtk_clutter_get_dark_color             (GtkWidget      *widget,
78                                                       GtkStateType    state,
79                                                       ClutterColor   *color);
80 void          gtk_clutter_get_mid_color              (GtkWidget      *widget,
81                                                       GtkStateType    state,
82                                                       ClutterColor   *color);
83
84 ClutterActor *gtk_clutter_texture_new_from_pixbuf    (GdkPixbuf      *pixbuf);
85 ClutterActor *gtk_clutter_texture_new_from_stock     (GtkWidget      *widget,
86                                                       const gchar    *stock_id,
87                                                       GtkIconSize     size);
88 ClutterActor *gtk_clutter_texture_new_from_icon_name (GtkWidget      *widget,
89                                                       const gchar    *icon_name,
90                                                       GtkIconSize     size);
91 void          gtk_clutter_texture_set_from_pixbuf    (ClutterTexture *texture,
92                                                       GdkPixbuf      *pixbuf);
93 void          gtk_clutter_texture_set_from_stock     (ClutterTexture *texture,
94                                                       GtkWidget      *widget,
95                                                       const gchar    *stock_id,
96                                                       GtkIconSize     size);
97 void          gtk_clutter_texture_set_from_icon_name (ClutterTexture *texture,
98                                                       GtkWidget      *widget,
99                                                       const gchar    *icon_name,
100                                                       GtkIconSize     size);
101
102 G_END_DECLS
103
104 #endif /* __GTK_CLUTTER_UTIL_H__ */