From 7952feb48b4352e95be269c4d891614469ca602f Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 11 Nov 2010 16:14:07 -0500 Subject: [PATCH] Export meta_frame_type_to_string() Frame types will form the bases of shadow classes, which are strings, so export the to-string function so that we can do the conversion uniformly. https://bugzilla.gnome.org/show_bug.cgi?id=592382 --- src/include/util.h | 3 +++ src/ui/theme-private.h | 1 - src/ui/theme.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/include/util.h b/src/include/util.h index 595dc3053..f9176f47e 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -28,6 +28,8 @@ #include #include +#include "common.h" + gboolean meta_is_verbose (void); void meta_set_verbose (gboolean setting); gboolean meta_is_debugging (void); @@ -91,6 +93,7 @@ guint meta_unsigned_long_hash (gconstpointer v); void meta_print_backtrace (void); +const char* meta_frame_type_to_string (MetaFrameType type); const char* meta_gravity_to_string (int gravity); #include diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h index 9c5f7d741..ba5f64d09 100644 --- a/src/ui/theme-private.h +++ b/src/ui/theme-private.h @@ -1189,7 +1189,6 @@ const char* meta_frame_resize_to_string (MetaFrameResize r MetaFrameFocus meta_frame_focus_from_string (const char *str); const char* meta_frame_focus_to_string (MetaFrameFocus focus); MetaFrameType meta_frame_type_from_string (const char *str); -const char* meta_frame_type_to_string (MetaFrameType type); MetaGradientType meta_gradient_type_from_string (const char *str); const char* meta_gradient_type_to_string (MetaGradientType type); GtkStateType meta_gtk_state_from_string (const char *str); diff --git a/src/ui/theme.c b/src/ui/theme.c index 577ab6227..f7ac4aa62 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -6017,6 +6017,14 @@ meta_frame_type_from_string (const char *str) return META_FRAME_TYPE_LAST; } +/** + * meta_frame_type_to_string: + * + * Converts a frame type enum value to the name string that would + * appear in the theme definition file. + * + * Return value: the string value + */ const char* meta_frame_type_to_string (MetaFrameType type) {