output->repaint_needed = 0;
wl_list_for_each_safe(cb, cnext, &output->frame_callback_list, link) {
- wl_resource_post_event(&cb->resource, WL_CALLBACK_DONE, msecs);
+ wl_callback_send_done(&cb->resource, msecs);
wl_resource_destroy(&cb->resource, 0);
}
}
if (wd->touch_focus_resource && wd->touch_focus)
- wl_resource_post_event(wd->touch_focus_resource,
- touch_type, time,
- wd->touch_focus,
- touch_id, sx, sy);
+ wl_input_device_send_touch_down(wd->touch_focus_resource,
+ time, &wd->touch_focus->resource,
+ touch_id, sx, sy);
break;
case WL_INPUT_DEVICE_TOUCH_MOTION:
es = (struct weston_surface *) wd->touch_focus;
weston_surface_from_global(es, x, y, &sx, &sy);
if (wd->touch_focus_resource)
- wl_resource_post_event(wd->touch_focus_resource,
- touch_type, time,
- touch_id, sx, sy);
+ wl_input_device_send_touch_motion(wd->touch_focus_resource,
+ time, touch_id, sx, sy);
break;
case WL_INPUT_DEVICE_TOUCH_UP:
weston_compositor_idle_release(ec);
wd->num_tp--;
if (wd->touch_focus_resource)
- wl_resource_post_event(wd->touch_focus_resource,
- touch_type, time, touch_id);
+ wl_input_device_send_touch_up(wd->touch_focus_resource,
+ time, touch_id);
if (wd->num_tp == 0)
touch_set_focus(wd, NULL, time);
break;
resource = wl_client_add_object(client,
&wl_output_interface, NULL, id, data);
- wl_resource_post_event(resource,
- WL_OUTPUT_GEOMETRY,
- output->x,
- output->y,
- output->mm_width,
- output->mm_height,
- output->subpixel,
- output->make, output->model);
+ wl_output_send_geometry(resource,
+ output->x,
+ output->y,
+ output->mm_width,
+ output->mm_height,
+ output->subpixel,
+ output->make, output->model);
wl_list_for_each (mode, &output->mode_list, link) {
- wl_resource_post_event(resource,
- WL_OUTPUT_MODE,
- mode->flags,
- mode->width,
- mode->height,
- mode->refresh);
+ wl_output_send_mode(resource,
+ mode->flags,
+ mode->width,
+ mode->height,
+ mode->refresh);
}
}
height = resize->height;
}
- wl_resource_post_event(&resize->shsurf->resource,
- WL_SHELL_SURFACE_CONFIGURE, time, resize->edges,
- width, height);
+ wl_shell_surface_send_configure(&resize->shsurf->resource,
+ time, resize->edges, width, height);
}
static void
wlshell = shell_surface_get_shell(shsurf);
panel_height = get_output_panel_height(wlshell, es->output);
edges = WL_SHELL_SURFACE_RESIZE_TOP|WL_SHELL_SURFACE_RESIZE_LEFT;
- wl_resource_post_event(&shsurf->resource,
- WL_SHELL_SURFACE_CONFIGURE,
- weston_compositor_get_time(), edges,
- es->output->current->width,
- es->output->current->height - panel_height);
+
+ wl_shell_surface_send_configure(&shsurf->resource,
+ weston_compositor_get_time(), edges,
+ es->output->current->width,
+ es->output->current->height - panel_height);
shsurf->type = SHELL_SURFACE_MAXIMIZED;
}
if (es->output)
shsurf->surface->force_configure = 1;
- wl_resource_post_event(resource,
- WL_SHELL_SURFACE_CONFIGURE,
- weston_compositor_get_time(), 0,
- shsurf->output->current->width,
- shsurf->output->current->height);
+ wl_shell_surface_send_configure(&shsurf->resource,
+ weston_compositor_get_time(), 0,
+ shsurf->output->current->width,
+ shsurf->output->current->height);
}
static void
resource = grab->input_device->pointer_focus_resource;
if (resource)
- wl_resource_post_event(resource, WL_INPUT_DEVICE_MOTION,
- time, sx, sy);
+ wl_input_device_send_motion(resource, time, sx, sy);
}
static void
resource = grab->input_device->pointer_focus_resource;
if (resource) {
- wl_resource_post_event(resource, WL_INPUT_DEVICE_BUTTON,
- time, button, state);
+ wl_input_device_send_button(resource, time, button, state);
} else if (state == 0 &&
(shsurf->popup.initial_up ||
time - shsurf->popup.time > 500)) {
- wl_resource_post_event(&shsurf->resource,
- WL_SHELL_SURFACE_POPUP_DONE);
+ wl_shell_surface_send_popup_done(&shsurf->resource);
wl_input_device_end_pointer_grab(grab->input_device, time);
shsurf->popup.grab.input_device = NULL;
}
weston_surface_set_position(surface, shsurf->output->x,
shsurf->output->y);
- wl_resource_post_event(resource,
- DESKTOP_SHELL_CONFIGURE,
- weston_compositor_get_time(), 0, surface_resource,
- shsurf->output->current->width,
- shsurf->output->current->height);
+ desktop_shell_send_configure(resource,
+ weston_compositor_get_time(), 0,
+ surface_resource,
+ shsurf->output->current->width,
+ shsurf->output->current->height);
}
static void
weston_surface_set_position(surface, shsurf->output->x,
shsurf->output->y);
- wl_resource_post_event(resource,
- DESKTOP_SHELL_CONFIGURE,
- weston_compositor_get_time(), 0, surface_resource,
- shsurf->output->current->width,
- shsurf->output->current->height);
+ desktop_shell_send_configure(resource,
+ weston_compositor_get_time(), 0,
+ surface_resource,
+ shsurf->output->current->width,
+ shsurf->output->current->height);
}
static void
if (shell->prepare_event_sent)
return;
- wl_resource_post_event(shell->child.desktop_shell,
- DESKTOP_SHELL_PREPARE_LOCK_SURFACE);
+ desktop_shell_send_prepare_lock_surface(shell->child.desktop_shell);
shell->prepare_event_sent = true;
}
if (shell->state == STATE_STARTING) {
tablet_shell_set_state(shell, STATE_LOCKED);
shell->previous_state = STATE_HOME;
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_SHOW_LOCKSCREEN);
+ tablet_shell_send_show_lockscreen(&shell->resource);
}
} else if (shell->current_client &&
shell->current_client->surface != surface &&
{
switch (shell->state) {
case STATE_SWITCHER:
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_HIDE_SWITCHER);
+ tablet_shell_send_hide_switcher(&shell->resource);
break;
default:
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_SHOW_SWITCHER);
+ tablet_shell_send_show_switcher(&shell->resource);
tablet_shell_set_state(shell, STATE_SWITCHER);
break;
}
if (shell->state == STATE_LOCKED)
return;
if (shell->state == STATE_SWITCHER)
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_HIDE_SWITCHER);
+ tablet_shell_send_hide_switcher(&shell->resource);
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_SHOW_LOCKSCREEN);
-
+ tablet_shell_send_show_lockscreen(&shell->resource);
tablet_shell_set_state(shell, STATE_LOCKED);
}
(struct weston_input_device *) shell->compositor->input_device;
if (shell->state == STATE_SWITCHER)
- wl_resource_post_event(&shell->resource,
- TABLET_SHELL_HIDE_SWITCHER);
+ tablet_shell_send_hide_switcher(&shell->resource);
weston_surface_activate(shell->home_surface, device,
weston_compositor_get_time());
weston_wm_read_data_source,
wm);
- wl_resource_post_event(&device->selection_data_source->resource,
- WL_DATA_SOURCE_SEND, mime_type, p[1]);
+ wl_data_source_send_send(&device->selection_data_source->resource,
+ mime_type, p[1]);
close(p[1]);
}
return NULL;
}
- wl_resource_post_event(wxs->resource, XSERVER_CLIENT, sv[1]);
+ xserver_send_client(wxs->resource, sv[1]);
wl_client_flush(wxs->resource->client);
close(sv[1]);
fprintf(stderr, "failed to create wm\n");
}
- wl_resource_post_event(wxs->resource,
- XSERVER_LISTEN_SOCKET, wxs->abstract_fd);
-
- wl_resource_post_event(wxs->resource,
- XSERVER_LISTEN_SOCKET, wxs->unix_fd);
+ xserver_send_listen_socket(wxs->resource, wxs->abstract_fd);
+ xserver_send_listen_socket(wxs->resource, wxs->unix_fd);
}
static int