[mutter/wip/carlosg/frames-client: 2/12] core: Shuffle function to get description string from a frame




commit 2f7c1e558b3d4ffbdc54062172e6897617886844
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 8 16:10:59 2022 +0200

    core: Shuffle function to get description string from a frame
    
    This will remain used (and mildly useful), so move it outside of src/ui.

 src/core/frame.c | 39 +++++++++++++++++++++++++++++++++++++++
 src/ui/theme.c   | 39 ---------------------------------------
 2 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 80978b92fd..b770588e32 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -583,3 +583,42 @@ meta_frame_initialize (MetaDisplay *display)
                         NULL);
     }
 }
+
+/**
+ * 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>";
+}
diff --git a/src/ui/theme.c b/src/ui/theme.c
index a4c8a0de29..9e488c073c 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>";
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]