]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkstyle.h
Fix a C99ism
[~andy/gtk] / gtk / gtkstyle.h
index 02b8a6e27b8a9146d54496472d74a70fe1b7ae1f..e4f71c6f8da08045d0bafb8d1647398078d804f3 100644 (file)
@@ -32,9 +32,7 @@
 #include <gtk/gtkenums.h>
 #include <pango/pango.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
 #define GTK_TYPE_STYLE              (gtk_style_get_type ())
 #define GTK_STYLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
@@ -43,6 +41,8 @@ extern "C" {
 #define GTK_IS_STYLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
 #define GTK_STYLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
 
+#define GTK_TYPE_BORDER             (gtk_border_get_type ())
+
 /* Some forward declarations needed to rationalize the header
  * files.
  */
@@ -54,6 +54,7 @@ typedef struct _GtkRcStyle     GtkRcStyle;
 typedef struct _GtkIconSet     GtkIconSet;
 typedef struct _GtkIconSource  GtkIconSource;
 typedef struct _GtkRcProperty  GtkRcProperty;
+typedef struct _GtkSettings    GtkSettings;
 typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
                                         const GString    *rc_string,
                                         GValue           *property_value);
@@ -181,8 +182,8 @@ struct _GtkStyleClass
                                 GdkRectangle           *area,
                                 GtkWidget              *widget,
                                 const gchar            *detail,
-                                gint                    y1,
-                                gint                    y2,
+                                gint                    y1_,
+                                gint                    y2_,
                                 gint                    x);
   void (*draw_shadow)          (GtkStyle               *style,
                                 GdkWindow              *window,
@@ -451,8 +452,12 @@ void         gtk_style_apply_default_background (GtkStyle     *style,
                                              gint          width, 
                                              gint          height);
 
-GtkIconSet* gtk_style_lookup_icon_set (GtkStyle            *style,
-                                       const gchar         *stock_id);
+GtkIconSet* gtk_style_lookup_icon_set        (GtkStyle     *style,
+                                              const gchar  *stock_id);
+gboolean    gtk_style_lookup_color           (GtkStyle     *style,
+                                              const gchar  *color_name,
+                                              GdkColor     *color);
+
 GdkPixbuf*  gtk_style_render_icon     (GtkStyle            *style,
                                        const GtkIconSource *source,
                                        GtkTextDirection     direction,
@@ -460,6 +465,7 @@ GdkPixbuf*  gtk_style_render_icon     (GtkStyle            *style,
                                        GtkIconSize          size,
                                        GtkWidget           *widget,
                                        const gchar         *detail);
+
 #ifndef GTK_DISABLE_DEPRECATED
 void gtk_draw_hline      (GtkStyle        *style,
                          GdkWindow       *window,
@@ -470,8 +476,8 @@ void gtk_draw_hline      (GtkStyle        *style,
 void gtk_draw_vline      (GtkStyle        *style,
                          GdkWindow       *window,
                          GtkStateType     state_type,
-                         gint             y1,
-                         gint             y2,
+                         gint             y1_,
+                         gint             y2_,
                          gint             x);
 void gtk_draw_shadow     (GtkStyle        *style,
                          GdkWindow       *window,
@@ -639,8 +645,8 @@ void gtk_paint_vline      (GtkStyle        *style,
                           GdkRectangle    *area,
                           GtkWidget       *widget,
                           const gchar     *detail,
-                          gint             y1,
-                          gint             y2,
+                          gint             y1_,
+                          gint             y2_,
                           gint             x);
 void gtk_paint_shadow     (GtkStyle        *style,
                           GdkWindow       *window,
@@ -849,8 +855,9 @@ void gtk_paint_resize_grip (GtkStyle                *style,
                             gint                height);
 
 
-GtkBorder *gtk_border_copy (const GtkBorder *border);
-void       gtk_border_free (GtkBorder       *border);
+GType      gtk_border_get_type (void) G_GNUC_CONST;
+GtkBorder *gtk_border_copy     (const GtkBorder *border_);
+void       gtk_border_free     (GtkBorder       *border_);
 
 /* --- private API --- */
 const GValue* _gtk_style_peek_property_value (GtkStyle           *style,
@@ -858,6 +865,12 @@ const GValue* _gtk_style_peek_property_value (GtkStyle           *style,
                                              GParamSpec         *pspec,
                                              GtkRcPropertyParser parser);
 
+void          _gtk_style_init_for_settings   (GtkStyle           *style,
+                                              GtkSettings        *settings);
+
+void          _gtk_style_shade               (GdkColor           *a,
+                                              GdkColor           *b,
+                                              gdouble             k);
 
 /* deprecated */
 #ifndef GTK_DISABLE_DEPRECATED
@@ -879,16 +892,14 @@ void gtk_paint_string     (GtkStyle        *style,
                           const gchar     *string);
 #endif /* GTK_DISABLE_DEPRECATED */
 
-void _gtk_draw_insertion_cursor (GtkWidget        *widget,
-                                GdkDrawable      *drawable,
-                                GdkGC            *gc,
-                                GdkRectangle     *location,
-                                 GtkTextDirection  direction,
-                                 gboolean          draw_arrow);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+void   gtk_draw_insertion_cursor (GtkWidget        *widget,
+                                 GdkDrawable      *drawable,
+                                 GdkRectangle     *area,
+                                 GdkRectangle     *location,
+                                 gboolean          is_primary,
+                                 GtkTextDirection  direction,
+                                 gboolean          draw_arrow);
 
+G_END_DECLS
 
 #endif /* __GTK_STYLE_H__ */