aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/interfaces
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-14 10:33:46 -0400
committerGitHub <noreply@github.com>2017-08-14 10:33:46 -0400
commit53052b3f6e457f35d46fc3a71bd7eac96e55a484 (patch)
treec51bfcd472cf38df7528eab9330bb0e44981ffbb /include/wlr/interfaces
parent1e1e9887fba15291256a806aca6cc6f94a8f671e (diff)
parente922e62924314866620cce662756ff09c8092cc2 (diff)
Merge pull request #85 from martinetd/refactor_states
Refactor states
Diffstat (limited to 'include/wlr/interfaces')
-rw-r--r--include/wlr/interfaces/wlr_input_device.h6
-rw-r--r--include/wlr/interfaces/wlr_keyboard.h7
-rw-r--r--include/wlr/interfaces/wlr_pointer.h6
-rw-r--r--include/wlr/interfaces/wlr_tablet_pad.h6
-rw-r--r--include/wlr/interfaces/wlr_tablet_tool.h6
-rw-r--r--include/wlr/interfaces/wlr_touch.h6
6 files changed, 18 insertions, 19 deletions
diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h
index 26729c7c..b236a24a 100644
--- a/include/wlr/interfaces/wlr_input_device.h
+++ b/include/wlr/interfaces/wlr_input_device.h
@@ -3,13 +3,13 @@
#include <wlr/types/wlr_input_device.h>
struct wlr_input_device_impl {
- void (*destroy)(struct wlr_input_device_state *state);
+ void (*destroy)(struct wlr_input_device *wlr_device);
};
-struct wlr_input_device *wlr_input_device_create(
+void wlr_input_device_init(
+ struct wlr_input_device *wlr_device,
enum wlr_input_device_type type,
struct wlr_input_device_impl *impl,
- struct wlr_input_device_state *state,
const char *name, int vendor, int product);
void wlr_input_device_destroy(struct wlr_input_device *dev);
diff --git a/include/wlr/interfaces/wlr_keyboard.h b/include/wlr/interfaces/wlr_keyboard.h
index 1acc6428..779b302f 100644
--- a/include/wlr/interfaces/wlr_keyboard.h
+++ b/include/wlr/interfaces/wlr_keyboard.h
@@ -4,12 +4,11 @@
#include <stdint.h>
struct wlr_keyboard_impl {
- void (*destroy)(struct wlr_keyboard_state *state);
- void (*led_update)(struct wlr_keyboard_state *state, uint32_t leds);
+ void (*destroy)(struct wlr_keyboard *keyboard);
+ void (*led_update)(struct wlr_keyboard *keyboard, uint32_t leds);
};
-struct wlr_keyboard *wlr_keyboard_create(struct wlr_keyboard_impl *impl,
- struct wlr_keyboard_state *state);
+void wlr_keyboard_init(struct wlr_keyboard *keyboard, struct wlr_keyboard_impl *impl);
void wlr_keyboard_destroy(struct wlr_keyboard *keyboard);
#endif
diff --git a/include/wlr/interfaces/wlr_pointer.h b/include/wlr/interfaces/wlr_pointer.h
index 8c3f7e0d..8d4bf703 100644
--- a/include/wlr/interfaces/wlr_pointer.h
+++ b/include/wlr/interfaces/wlr_pointer.h
@@ -3,11 +3,11 @@
#include <wlr/types/wlr_pointer.h>
struct wlr_pointer_impl {
- void (*destroy)(struct wlr_pointer_state *state);
+ void (*destroy)(struct wlr_pointer *pointer);
};
-struct wlr_pointer *wlr_pointer_create(struct wlr_pointer_impl *impl,
- struct wlr_pointer_state *state);
+void wlr_pointer_init(struct wlr_pointer *pointer,
+ struct wlr_pointer_impl *impl);
void wlr_pointer_destroy(struct wlr_pointer *pointer);
#endif
diff --git a/include/wlr/interfaces/wlr_tablet_pad.h b/include/wlr/interfaces/wlr_tablet_pad.h
index 09274c6c..81af3c3f 100644
--- a/include/wlr/interfaces/wlr_tablet_pad.h
+++ b/include/wlr/interfaces/wlr_tablet_pad.h
@@ -3,11 +3,11 @@
#include <wlr/types/wlr_tablet_pad.h>
struct wlr_tablet_pad_impl {
- void (*destroy)(struct wlr_tablet_pad_state *pad);
+ void (*destroy)(struct wlr_tablet_pad *pad);
};
-struct wlr_tablet_pad *wlr_tablet_pad_create(struct wlr_tablet_pad_impl *impl,
- struct wlr_tablet_pad_state *state);
+void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
+ struct wlr_tablet_pad_impl *impl);
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad);
#endif
diff --git a/include/wlr/interfaces/wlr_tablet_tool.h b/include/wlr/interfaces/wlr_tablet_tool.h
index cd326878..43a24fd0 100644
--- a/include/wlr/interfaces/wlr_tablet_tool.h
+++ b/include/wlr/interfaces/wlr_tablet_tool.h
@@ -3,11 +3,11 @@
#include <wlr/types/wlr_tablet_tool.h>
struct wlr_tablet_tool_impl {
- void (*destroy)(struct wlr_tablet_tool_state *tool);
+ void (*destroy)(struct wlr_tablet_tool *tool);
};
-struct wlr_tablet_tool *wlr_tablet_tool_create(struct wlr_tablet_tool_impl *impl,
- struct wlr_tablet_tool_state *state);
+void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
+ struct wlr_tablet_tool_impl *impl);
void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool);
#endif
diff --git a/include/wlr/interfaces/wlr_touch.h b/include/wlr/interfaces/wlr_touch.h
index d83ad558..b5fcef18 100644
--- a/include/wlr/interfaces/wlr_touch.h
+++ b/include/wlr/interfaces/wlr_touch.h
@@ -3,11 +3,11 @@
#include <wlr/types/wlr_touch.h>
struct wlr_touch_impl {
- void (*destroy)(struct wlr_touch_state *state);
+ void (*destroy)(struct wlr_touch *touch);
};
-struct wlr_touch *wlr_touch_create(struct wlr_touch_impl *impl,
- struct wlr_touch_state *state);
+void wlr_touch_init(struct wlr_touch *touch,
+ struct wlr_touch_impl *impl);
void wlr_touch_destroy(struct wlr_touch *touch);
#endif