forked from AuroraMiddleware/gtk
mir: implement screen get_plug_name
This commit is contained in:
parent
a77571c42e
commit
4e4ccb76cd
@ -320,7 +320,46 @@ gdk_mir_screen_get_monitor_plug_name (GdkScreen *screen,
|
||||
gint monitor_num)
|
||||
{
|
||||
g_printerr ("gdk_mir_screen_get_monitor_plug_name (%d)\n", monitor_num);
|
||||
return NULL; //?
|
||||
MirDisplayOutput *output = get_output (screen, monitor_num);
|
||||
|
||||
if (output)
|
||||
{
|
||||
switch (output->type)
|
||||
{
|
||||
case mir_display_output_type_unknown:
|
||||
return g_strdup_printf ("UNKNOWN-%u", output->output_id);
|
||||
case mir_display_output_type_vga:
|
||||
return g_strdup_printf ("VGA-%u", output->output_id);
|
||||
case mir_display_output_type_dvii:
|
||||
return g_strdup_printf ("DVII-%u", output->output_id);
|
||||
case mir_display_output_type_dvid:
|
||||
return g_strdup_printf ("DVID-%u", output->output_id);
|
||||
case mir_display_output_type_dvia:
|
||||
return g_strdup_printf ("DVIA-%u", output->output_id);
|
||||
case mir_display_output_type_composite:
|
||||
return g_strdup_printf ("COMPOSITE-%u", output->output_id);
|
||||
case mir_display_output_type_svideo:
|
||||
return g_strdup_printf ("SVIDEO-%u", output->output_id);
|
||||
case mir_display_output_type_lvds:
|
||||
return g_strdup_printf ("LVDS-%u", output->output_id);
|
||||
case mir_display_output_type_component:
|
||||
return g_strdup_printf ("COMPONENT-%u", output->output_id);
|
||||
case mir_display_output_type_ninepindin:
|
||||
return g_strdup_printf ("NINEPINDIN-%u", output->output_id);
|
||||
case mir_display_output_type_displayport:
|
||||
return g_strdup_printf ("DISPLAYPORT-%u", output->output_id);
|
||||
case mir_display_output_type_hdmia:
|
||||
return g_strdup_printf ("HDMIA-%u", output->output_id);
|
||||
case mir_display_output_type_hdmib:
|
||||
return g_strdup_printf ("HDMIB-%u", output->output_id);
|
||||
case mir_display_output_type_tv:
|
||||
return g_strdup_printf ("TV-%u", output->output_id);
|
||||
case mir_display_output_type_edp:
|
||||
return g_strdup_printf ("EDP-%u", output->output_id);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user