aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland-server-core.h
diff options
context:
space:
mode:
authorJon Cruz <jonc@osg.samsung.com>2015-10-26 14:51:19 +0900
committerBryce Harrington <bryce@osg.samsung.com>2015-10-26 10:50:48 -0700
commit9a170b98342c1fde42cd3f7fbef73d5af86c3a7c (patch)
treefc67cc2bda61e470259515b4ed36e3abde853b2b /src/wayland-server-core.h
parentshm: Add shm_buffer ref and shm_pool unref functions (diff)
downloadwayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar.gz
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar.bz2
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar.lz
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar.xz
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.tar.zst
wayland-9a170b98342c1fde42cd3f7fbef73d5af86c3a7c.zip
cosmetic: fix inconsistent code style with header prototypes.
A few of the header files had function prototypes that were not following project conventions, sometimes even in the same file. Corrected these to follow as per wayland-os.h. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Diffstat (limited to 'src/wayland-server-core.h')
-rw-r--r--src/wayland-server-core.h190
1 files changed, 129 insertions, 61 deletions
diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h
index 4c2bdfe..55a2db0 100644
--- a/src/wayland-server-core.h
+++ b/src/wayland-server-core.h
@@ -49,34 +49,56 @@ typedef int (*wl_event_loop_timer_func_t)(void *data);
typedef int (*wl_event_loop_signal_func_t)(int signal_number, void *data);
typedef void (*wl_event_loop_idle_func_t)(void *data);
-struct wl_event_loop *wl_event_loop_create(void);
-void wl_event_loop_destroy(struct wl_event_loop *loop);
-struct wl_event_source *wl_event_loop_add_fd(struct wl_event_loop *loop,
- int fd, uint32_t mask,
- wl_event_loop_fd_func_t func,
- void *data);
-int wl_event_source_fd_update(struct wl_event_source *source, uint32_t mask);
-struct wl_event_source *wl_event_loop_add_timer(struct wl_event_loop *loop,
- wl_event_loop_timer_func_t func,
- void *data);
+struct wl_event_loop *
+wl_event_loop_create(void);
+
+void
+wl_event_loop_destroy(struct wl_event_loop *loop);
+
+struct wl_event_source *
+wl_event_loop_add_fd(struct wl_event_loop *loop,
+ int fd, uint32_t mask,
+ wl_event_loop_fd_func_t func,
+ void *data);
+
+int
+wl_event_source_fd_update(struct wl_event_source *source, uint32_t mask);
+
+struct wl_event_source *
+wl_event_loop_add_timer(struct wl_event_loop *loop,
+ wl_event_loop_timer_func_t func,
+ void *data);
+
struct wl_event_source *
wl_event_loop_add_signal(struct wl_event_loop *loop,
int signal_number,
wl_event_loop_signal_func_t func,
void *data);
-int wl_event_source_timer_update(struct wl_event_source *source,
- int ms_delay);
-int wl_event_source_remove(struct wl_event_source *source);
-void wl_event_source_check(struct wl_event_source *source);
+int
+wl_event_source_timer_update(struct wl_event_source *source,
+ int ms_delay);
+
+int
+wl_event_source_remove(struct wl_event_source *source);
+
+void
+wl_event_source_check(struct wl_event_source *source);
-int wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout);
-void wl_event_loop_dispatch_idle(struct wl_event_loop *loop);
-struct wl_event_source *wl_event_loop_add_idle(struct wl_event_loop *loop,
- wl_event_loop_idle_func_t func,
- void *data);
-int wl_event_loop_get_fd(struct wl_event_loop *loop);
+int
+wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout);
+
+void
+wl_event_loop_dispatch_idle(struct wl_event_loop *loop);
+
+struct wl_event_source *
+wl_event_loop_add_idle(struct wl_event_loop *loop,
+ wl_event_loop_idle_func_t func,
+ void *data);
+
+int
+wl_event_loop_get_fd(struct wl_event_loop *loop);
struct wl_client;
struct wl_display;
@@ -85,51 +107,89 @@ struct wl_resource;
struct wl_global;
typedef void (*wl_notify_func_t)(struct wl_listener *listener, void *data);
-void wl_event_loop_add_destroy_listener(struct wl_event_loop *loop,
- struct wl_listener * listener);
-struct wl_listener *wl_event_loop_get_destroy_listener(
- struct wl_event_loop *loop,
- wl_notify_func_t notify);
+void
+wl_event_loop_add_destroy_listener(struct wl_event_loop *loop,
+ struct wl_listener * listener);
+
+struct wl_listener *
+wl_event_loop_get_destroy_listener(
+ struct wl_event_loop *loop,
+ wl_notify_func_t notify);
+
+struct wl_display *
+wl_display_create(void);
+
+void
+wl_display_destroy(struct wl_display *display);
+
+struct wl_event_loop *
+wl_display_get_event_loop(struct wl_display *display);
+
+int
+wl_display_add_socket(struct wl_display *display, const char *name);
-struct wl_display *wl_display_create(void);
-void wl_display_destroy(struct wl_display *display);
-struct wl_event_loop *wl_display_get_event_loop(struct wl_display *display);
-int wl_display_add_socket(struct wl_display *display, const char *name);
-const char *wl_display_add_socket_auto(struct wl_display *display);
-void wl_display_terminate(struct wl_display *display);
-void wl_display_run(struct wl_display *display);
-void wl_display_flush_clients(struct wl_display *display);
+const char *
+wl_display_add_socket_auto(struct wl_display *display);
+
+void
+wl_display_terminate(struct wl_display *display);
+
+void
+wl_display_run(struct wl_display *display);
+
+void
+wl_display_flush_clients(struct wl_display *display);
typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data,
uint32_t version, uint32_t id);
-uint32_t wl_display_get_serial(struct wl_display *display);
-uint32_t wl_display_next_serial(struct wl_display *display);
+uint32_t
+wl_display_get_serial(struct wl_display *display);
+
+uint32_t
+wl_display_next_serial(struct wl_display *display);
+
+void
+wl_display_add_destroy_listener(struct wl_display *display,
+ struct wl_listener *listener);
+
+struct wl_listener *
+wl_display_get_destroy_listener(struct wl_display *display,
+ wl_notify_func_t notify);
+
+struct wl_global *
+wl_global_create(struct wl_display *display,
+ const struct wl_interface *interface,
+ int version,
+ void *data, wl_global_bind_func_t bind);
+
+void
+wl_global_destroy(struct wl_global *global);
+
+struct wl_client *
+wl_client_create(struct wl_display *display, int fd);
+
+void
+wl_client_destroy(struct wl_client *client);
-void wl_display_add_destroy_listener(struct wl_display *display,
- struct wl_listener *listener);
-struct wl_listener *wl_display_get_destroy_listener(struct wl_display *display,
- wl_notify_func_t notify);
+void
+wl_client_flush(struct wl_client *client);
-struct wl_global *wl_global_create(struct wl_display *display,
- const struct wl_interface *interface,
- int version,
- void *data, wl_global_bind_func_t bind);
-void wl_global_destroy(struct wl_global *global);
+void
+wl_client_get_credentials(struct wl_client *client,
+ pid_t *pid, uid_t *uid, gid_t *gid);
-struct wl_client *wl_client_create(struct wl_display *display, int fd);
-void wl_client_destroy(struct wl_client *client);
-void wl_client_flush(struct wl_client *client);
-void wl_client_get_credentials(struct wl_client *client,
- pid_t *pid, uid_t *uid, gid_t *gid);
+void
+wl_client_add_destroy_listener(struct wl_client *client,
+ struct wl_listener *listener);
-void wl_client_add_destroy_listener(struct wl_client *client,
- struct wl_listener *listener);
-struct wl_listener *wl_client_get_destroy_listener(struct wl_client *client,
- wl_notify_func_t notify);
+struct wl_listener *
+wl_client_get_destroy_listener(struct wl_client *client,
+ wl_notify_func_t notify);
struct wl_resource *
wl_client_get_object(struct wl_client *client, uint32_t id);
+
void
wl_client_post_no_memory(struct wl_client *client);
@@ -282,19 +342,27 @@ typedef void (*wl_resource_destroy_func_t)(struct wl_resource *resource);
* - type=new_id: (struct wl_object *) or (struct wl_resource *)
* - type=object: (struct wl_object *) or (struct wl_resource *)
*/
-void wl_resource_post_event(struct wl_resource *resource,
- uint32_t opcode, ...);
-void wl_resource_post_event_array(struct wl_resource *resource,
- uint32_t opcode, union wl_argument *args);
-void wl_resource_queue_event(struct wl_resource *resource,
- uint32_t opcode, ...);
+void
+wl_resource_post_event(struct wl_resource *resource,
+ uint32_t opcode, ...);
+
+void
+wl_resource_post_event_array(struct wl_resource *resource,
+ uint32_t opcode, union wl_argument *args);
+
+void
+wl_resource_queue_event(struct wl_resource *resource,
+ uint32_t opcode, ...);
+
void wl_resource_queue_event_array(struct wl_resource *resource,
uint32_t opcode, union wl_argument *args);
/* msg is a printf format string, variable args are its args. */
-void wl_resource_post_error(struct wl_resource *resource,
- uint32_t code, const char *msg, ...)
+void
+wl_resource_post_error(struct wl_resource *resource,
+ uint32_t code, const char *msg, ...)
__attribute__ ((format (printf, 3, 4)));
+
void wl_resource_post_no_memory(struct wl_resource *resource);
struct wl_display *