st: Remove st_get_align_factor() utility method
It is now unused. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803
This commit is contained in:
parent
2f39bd8ba4
commit
72af64d964
@ -3112,63 +3112,3 @@ st_widget_get_focus_chain (StWidget *widget)
|
||||
{
|
||||
return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* st_get_align_factors:
|
||||
* @x_align: an #StAlign
|
||||
* @y_align: an #StAlign
|
||||
* @x_align_out: (out) (optional): @x_align as a #gdouble
|
||||
* @y_align_out: (out) (optional): @y_align as a #gdouble
|
||||
*
|
||||
* Converts @x_align and @y_align to #gdouble values.
|
||||
*/
|
||||
void
|
||||
st_get_align_factors (StAlign x_align,
|
||||
StAlign y_align,
|
||||
gdouble *x_align_out,
|
||||
gdouble *y_align_out)
|
||||
{
|
||||
if (x_align_out)
|
||||
{
|
||||
switch (x_align)
|
||||
{
|
||||
case ST_ALIGN_START:
|
||||
*x_align_out = 0.0;
|
||||
break;
|
||||
|
||||
case ST_ALIGN_MIDDLE:
|
||||
*x_align_out = 0.5;
|
||||
break;
|
||||
|
||||
case ST_ALIGN_END:
|
||||
*x_align_out = 1.0;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (y_align_out)
|
||||
{
|
||||
switch (y_align)
|
||||
{
|
||||
case ST_ALIGN_START:
|
||||
*y_align_out = 0.0;
|
||||
break;
|
||||
|
||||
case ST_ALIGN_MIDDLE:
|
||||
*y_align_out = 0.5;
|
||||
break;
|
||||
|
||||
case ST_ALIGN_END:
|
||||
*y_align_out = 1.0;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,12 +157,6 @@ void st_widget_set_accessible_name (StWidget *widget,
|
||||
const gchar * st_widget_get_accessible_name (StWidget *widget);
|
||||
void st_widget_set_accessible (StWidget *widget,
|
||||
AtkObject *accessible);
|
||||
/* utility methods */
|
||||
void st_get_align_factors (StAlign x_align,
|
||||
StAlign y_align,
|
||||
gdouble *x_align_out,
|
||||
gdouble *y_align_out);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __ST_WIDGET_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user