Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Initial pass on API stability guarantees
Browse files Browse the repository at this point in the history
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
  • Loading branch information
ddevault committed Jul 13, 2018
1 parent 3ae423b commit ba6cae1
Show file tree
Hide file tree
Showing 62 changed files with 551 additions and 4 deletions.
8 changes: 8 additions & 0 deletions include/wlr/backend.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_H
#define WLR_BACKEND_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/drm.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_DRM_H
#define WLR_BACKEND_DRM_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/headless.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_HEADLESS_H
#define WLR_BACKEND_HEADLESS_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/interface.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_INTERFACE_H
#define WLR_BACKEND_INTERFACE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/libinput.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_LIBINPUT_H
#define WLR_BACKEND_LIBINPUT_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/multi.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_MULTI_H
#define WLR_BACKEND_MULTI_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/backend/session/interface.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_BACKEND_SESSION_INTERFACE_H
#define WLR_BACKEND_SESSION_INTERFACE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_input_device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_INPUT_DEVICE_H
#define WLR_INTERFACES_WLR_INPUT_DEVICE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_keyboard.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_KEYBOARD_H
#define WLR_INTERFACES_WLR_KEYBOARD_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_output.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_OUTPUT_H
#define WLR_INTERFACES_WLR_OUTPUT_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_pointer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_POINTER_H
#define WLR_INTERFACES_WLR_POINTER_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_tablet_pad.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_TABLET_PAD_H
#define WLR_INTERFACES_WLR_TABLET_PAD_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_tablet_tool.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_TABLET_TOOL_H
#define WLR_INTERFACES_WLR_TABLET_TOOL_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/interfaces/wlr_touch.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_INTERFACES_WLR_TOUCH_H
#define WLR_INTERFACES_WLR_TOUCH_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/dmabuf.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_DMABUF_H
#define WLR_RENDER_DMABUF_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/egl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_EGL_H
#define WLR_RENDER_EGL_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/gles2.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_GLES2_H
#define WLR_RENDER_GLES2_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/interface.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_INTERFACE_H
#define WLR_RENDER_INTERFACE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/wlr_renderer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_WLR_RENDERER_H
#define WLR_RENDER_WLR_RENDERER_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/render/wlr_texture.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_RENDER_WLR_TEXTURE_H
#define WLR_RENDER_WLR_TEXTURE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_box.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_BOX_H
#define WLR_TYPES_WLR_BOX_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_buffer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_BUFFER_H
#define WLR_TYPES_WLR_BUFFER_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_compositor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_COMPOSITOR_H
#define WLR_TYPES_WLR_COMPOSITOR_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_cursor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_CURSOR_H
#define WLR_TYPES_WLR_CURSOR_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_data_device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_DATA_DEVICE_H
#define WLR_TYPES_WLR_DATA_DEVICE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_export_dmabuf_v1.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_EXPORT_DMABUF_V1_H
#define WLR_TYPES_WLR_EXPORT_DMABUF_V1_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_gamma_control.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_GAMMA_CONTROL_H
#define WLR_TYPES_WLR_GAMMA_CONTROL_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_idle.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_IDLE_H
#define WLR_TYPES_WLR_IDLE_H

Expand Down
10 changes: 9 additions & 1 deletion include/wlr/types/wlr_idle_inhibit_v1.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_IDLE_INHIBIT_V1_H
#define WLR_TYPES_WLR_IDLE_INHIBIT_V1_H

Expand All @@ -19,7 +27,7 @@ struct wlr_idle_inhibit_manager_v1 {
struct wl_list resources; // wl_resource_get_link
struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1::link
struct wl_global *global;

struct wl_listener display_destroy;

struct {
Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_input_device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_INPUT_DEVICE_H
#define WLR_TYPES_WLR_INPUT_DEVICE_H

Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_input_inhibitor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_INPUT_INHIBITOR_H
#define WLR_TYPES_INPUT_INHIBITOR_H
#include <wayland-server.h>
Expand Down
8 changes: 8 additions & 0 deletions include/wlr/types/wlr_keyboard.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This an unstable interface of wlroots. No guarantees are made regarding the
* future consistency of this API.
*/
#ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif

#ifndef WLR_TYPES_WLR_KEYBOARD_H
#define WLR_TYPES_WLR_KEYBOARD_H

Expand Down
Loading

0 comments on commit ba6cae1

Please sign in to comment.