summaryrefslogtreecommitdiff
path: root/src/gsm_color_button.h
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-29 18:10:09 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-01 19:45:21 +0100
commitb7d7127bfa1b1c2e8d10467087556298cdc77102 (patch)
tree2f603c303e35f188593d5ca8fabe8459e609b720 /src/gsm_color_button.h
parentdf50b9c871f4f00609bef2ee022495677c4511fa (diff)
downloadmate-system-monitor-b7d7127bfa1b1c2e8d10467087556298cdc77102.tar.bz2
mate-system-monitor-b7d7127bfa1b1c2e8d10467087556298cdc77102.tar.xz
GTK3: Do not use deprecated API
Namely, we make the following replacements: * GtkStyle -> GtkStyleContext * GdkColor -> GdkRGBA * GtkColorSelectionDialog -> GtkColorChooserDialog taken from....but adjusted: https://git.gnome.org/browse/gnome-system-monitor/commit/?id=7ac1c1c
Diffstat (limited to 'src/gsm_color_button.h')
-rw-r--r--src/gsm_color_button.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gsm_color_button.h b/src/gsm_color_button.h
index bb885bc..bb54f72 100644
--- a/src/gsm_color_button.h
+++ b/src/gsm_color_button.h
@@ -25,10 +25,9 @@
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
#include <cairo.h>
#include <librsvg/rsvg.h>
-#ifndef RSVG_CAIRO_H
-#include <librsvg/rsvg-cairo.h>
#endif
G_BEGIN_DECLS
@@ -80,11 +79,20 @@ struct _GSMColorButtonClass
};
GType gsm_color_button_get_type (void) G_GNUC_CONST;
+#if GTK_CHECK_VERSION(3,0,0)
+GtkWidget *gsm_color_button_new (const GdkRGBA * color, guint type);
+void gsm_color_button_set_color (GSMColorButton * color_button, const GdkRGBA * color);
+#else
GtkWidget *gsm_color_button_new (const GdkColor * color, guint type);
void gsm_color_button_set_color (GSMColorButton * color_button, const GdkColor * color);
+#endif
void gsm_color_button_set_fraction (GSMColorButton * color_button, const gdouble fraction);
void gsm_color_button_set_cbtype (GSMColorButton * color_button, guint type);
+#if GTK_CHECK_VERSION(3,0,0)
+void gsm_color_button_get_color (GSMColorButton * color_button, GdkRGBA * color);
+#else
void gsm_color_button_get_color (GSMColorButton * color_button, GdkColor * color);
+#endif
gdouble gsm_color_button_get_fraction (GSMColorButton * color_button);
guint gsm_color_button_get_cbtype (GSMColorButton * color_button);
void gsm_color_button_set_title (GSMColorButton * color_button, const gchar * title);