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>
This commit is contained in:
parent
3994297429
commit
bbd988cbc5
@ -537,3 +537,38 @@ meta_frame_launch_client (MetaX11Display *x11_display,
|
|||||||
|
|
||||||
return proc;
|
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>";
|
||||||
|
}
|
||||||
|
@ -1356,42 +1356,3 @@ meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc,
|
|||||||
|
|
||||||
return retval;
|
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>";
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user