Commit 3eb2d0ca authored by Guido Gunther's avatar Guido Gunther

PhoshMonitor: add phosh_monitor_get_current mode

This returns the currently set mode
parent 46f8211b
......@@ -214,3 +214,11 @@ phosh_monitor_new_from_wl_output (gpointer wl_output)
return g_object_new (PHOSH_TYPE_MONITOR, "wl-output", wl_output, NULL);
PhoshMonitorMode *
phosh_monitor_get_current_mode (PhoshMonitor *self)
g_return_val_if_fail (PHOSH_IS_MONITOR (self), NULL);
return &g_array_index (self->modes, PhoshMonitorMode, self->current_mode);
......@@ -41,4 +41,5 @@ struct _PhoshMonitor {
G_DECLARE_FINAL_TYPE (PhoshMonitor, phosh_monitor, PHOSH, MONITOR, GObject)
PhoshMonitor * phosh_monitor_new_from_wl_output (gpointer wl_output);
PhoshMonitor * phosh_monitor_new_from_wl_output (gpointer wl_output);
PhoshMonitorMode * phosh_monitor_get_current_mode (PhoshMonitor *monitor);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment