enum wl_eom_mode eom_mode;
enum wl_eom_attribute eom_attribute;
enum wl_eom_attribute_state eom_attribute_state;
+ enum wl_eom_error error;
/* client info */
EomWaylandClientInfo *client_info;
eom_wl_output->physical_height = h_mm;
eom_wl_output->eom_status = connection;
eom_wl_output->client_info = &wl_client_info;
+ eom_wl_output->error = WL_EOM_ERROR_NONE;
wl_list_insert(&eom_client_info->eom_wl_output_list, &eom_wl_output->link);
}
_eom_wayland_client_call_notify(eom_wl_output,
EOM_OUTPUT_NOTIFY_ATTRIBUTE_CHANGED);
}
+
+ eom_wl_output->error = error;
}
+
+static void
+_eom_wl_eom_output_set_window(void *data,
+ struct wl_eom *wl_eom,
+ uint32_t output_id,
+ uint32_t error)
+{
+ EomWaylandClientInfo *eom_client_info = (EomWaylandClientInfo *)data;
+ EomWaylandOutput *eom_wl_output = NULL;
+
+ INFO("SET_WINODW - id : %d, error : %d\n", output_id, error);
+
+ eom_wl_output = _eom_wayland_client_find_output_from_wl_output(
+ &eom_client_info->eom_wl_output_list, output_id);
+ RET_IF_FAIL(eom_wl_output != NULL);
+
+ eom_wl_output->error = error;
+}
+
/*LCOV_EXCL_STOP*/
static const struct wl_eom_listener eom_wl_eom_listener = {
_eom_wl_eom_output_count,
_eom_wl_eom_output_type,
_eom_wl_eom_output_mode,
_eom_wl_eom_output_attribute,
+ _eom_wl_eom_output_set_window,
};
wl_display_dispatch(wl_client_info.display);
wl_display_roundtrip(wl_client_info.display);
- ret = 1;
+ if (eom_wl_output->error == WL_EOM_ERROR_NONE)
+ ret = 1;
array = g_array_new(FALSE, FALSE, sizeof(GValue));
g_value_init(&v, G_TYPE_INT);
}
}
- ret = 1;
+ /* TODO:
+ * wait for the result of set_window.
+ * this should be the blocking call.
+ */
+ wl_display_dispatch(wl_client_info.display);
+ wl_display_roundtrip(wl_client_info.display);
+
+ if (eom_wl_output->error == WL_EOM_ERROR_NONE)
+ ret = 1;
array = g_array_new(FALSE, FALSE, sizeof(GValue));
g_value_init(&v, G_TYPE_INT);
{ "output_type", "uuu", types + 0 },
{ "output_mode", "uu", types + 0 },
{ "output_attribute", "uuuu", types + 0 },
+ { "output_set_window", "uu", types + 0 },
};
WL_EXPORT const struct wl_interface wl_eom_interface = {
"wl_eom", 1,
4, wl_eom_requests,
- 5, wl_eom_events,
+ 6, wl_eom_events,
};