summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-06-08 16:10:59 +0200
committerMarge Bot <marge-bot@gnome.org>2022-12-01 20:10:53 +0000
commitbbd988cbc5ea8594d141e449958ac08eba5cc70a (patch)
tree81cc189ac0a0b3f856b8c793c29f4a2981425a82
parent3994297429cf351907c65835f0673a11ce3f6198 (diff)
downloadmutter-bbd988cbc5ea8594d141e449958ac08eba5cc70a.tar.gz
core: Shuffle function to get description string from a frame
This will remain used (and mildly useful), so move it outside of src/ui. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
-rw-r--r--src/core/frame.c35
-rw-r--r--src/ui/theme.c39
2 files changed, 35 insertions, 39 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index 1e09c260f..a3a0e5cf1 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -537,3 +537,38 @@ meta_frame_launch_client (MetaX11Display *x11_display,
return proc;
}
+
+/**
+ * meta_frame_type_to_string:
+ * @type: a #MetaFrameType
+ *
+ * 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)
+{
+ switch (type)
+ {
+ case META_FRAME_TYPE_NORMAL:
+ return "normal";
+ case META_FRAME_TYPE_DIALOG:
+ return "dialog";
+ case META_FRAME_TYPE_MODAL_DIALOG:
+ return "modal_dialog";
+ case META_FRAME_TYPE_UTILITY:
+ return "utility";
+ case META_FRAME_TYPE_MENU:
+ return "menu";
+ case META_FRAME_TYPE_BORDER:
+ return "border";
+ case META_FRAME_TYPE_ATTACHED:
+ return "attached";
+ case META_FRAME_TYPE_LAST:
+ break;
+ }
+
+ return "<unknown>";
+}
diff --git a/src/ui/theme.c b/src/ui/theme.c
index a4c8a0de2..9e488c073 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -1356,42 +1356,3 @@ meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc,
return retval;
}
-
-/**
- * meta_frame_type_to_string:
- * @type: a #MetaFrameType
- *
- * 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)
-{
- switch (type)
- {
- case META_FRAME_TYPE_NORMAL:
- return "normal";
- case META_FRAME_TYPE_DIALOG:
- return "dialog";
- case META_FRAME_TYPE_MODAL_DIALOG:
- return "modal_dialog";
- case META_FRAME_TYPE_UTILITY:
- return "utility";
- case META_FRAME_TYPE_MENU:
- return "menu";
- case META_FRAME_TYPE_BORDER:
- return "border";
- case META_FRAME_TYPE_ATTACHED:
- return "attached";
-#if 0
- case META_FRAME_TYPE_TOOLBAR:
- return "toolbar";
-#endif
- case META_FRAME_TYPE_LAST:
- break;
- }
-
- return "<unknown>";
-}