change parameter type of layer_set_mode