Commit 98216867 authored by Benjamin Otte's avatar Benjamin Otte

win32: Allow querying names for metrics

parent 63934ba3
......@@ -450,6 +450,34 @@ static struct {
{ "cxpaddedborder", 0, NULL }
};
const char *
gtk_win32_get_sys_metric_name_for_id (gint id)
{
if (id >= 0 && id < G_N_ELEMENTS (win32_default_metrics))
return win32_default_metrics[id].name;
else
return NULL;
}
int
gtk_win32_get_sys_metric_id_for_name (const char *name)
{
int i;
g_return_val_if_fail (name != NULL, -1);
for (i = 0; i < G_N_ELEMENTS (win32_default_metrics); i++)
{
if (win32_default_metrics[i].name == NULL)
continue;
if (g_str_equal (name, win32_default_metrics[i].name))
return i;
}
return -1;
}
int
gtk_win32_get_sys_metric (gint id)
{
......
......@@ -167,6 +167,8 @@ void gtk_win32_get_theme_margins (const char
int state,
GtkBorder *out_margins);
const char * gtk_win32_get_sys_metric_name_for_id (gint id);
int gtk_win32_get_sys_metric_id_for_name (const char *name);
int gtk_win32_get_sys_metric (gint id);
const char * gtk_win32_get_sys_color_name_for_id (gint id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment