summaryrefslogtreecommitdiffstats
path: root/widget/gtk/mozwayland/mozwayland.c
blob: ad8e949ce25a63ebb15bdcd3d20b0dfa57e8360f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
 */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include <stdlib.h>
#include "mozilla/Types.h"
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <gdk/gdkwayland.h>

union wl_argument;

/* Those strucures are just placeholders and will be replaced by
 * real symbols from libwayland during run-time linking. We need to make
 * them explicitly visible.
 */
#pragma GCC visibility push(default)
const struct wl_interface wl_buffer_interface;
const struct wl_interface wl_callback_interface;
const struct wl_interface wl_data_device_interface;
const struct wl_interface wl_data_device_manager_interface;
const struct wl_interface wl_keyboard_interface;
const struct wl_interface wl_pointer_interface;
const struct wl_interface wl_region_interface;
const struct wl_interface wl_registry_interface;
const struct wl_interface wl_shm_interface;
const struct wl_interface wl_shm_pool_interface;
const struct wl_interface wl_seat_interface;
const struct wl_interface wl_surface_interface;
const struct wl_interface wl_subsurface_interface;
const struct wl_interface wl_compositor_interface;
const struct wl_interface wl_subcompositor_interface;
const struct wl_interface wl_output_interface;
#pragma GCC visibility pop

MOZ_EXPORT void wl_event_queue_destroy(struct wl_event_queue* queue) {}

MOZ_EXPORT void wl_proxy_marshal(struct wl_proxy* p, uint32_t opcode, ...) {}

MOZ_EXPORT void wl_proxy_marshal_array(struct wl_proxy* p, uint32_t opcode,
                                       union wl_argument* args) {}

MOZ_EXPORT struct wl_proxy* wl_proxy_create(
    struct wl_proxy* factory, const struct wl_interface* interface) {
  return NULL;
}

MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy) { return NULL; }

MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper) {}

MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor(
    struct wl_proxy* proxy, uint32_t opcode,
    const struct wl_interface* interface, ...) {
  return NULL;
}

MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_constructor_versioned(
    struct wl_proxy* proxy, uint32_t opcode,
    const struct wl_interface* interface, uint32_t version, ...) {
  return NULL;
}

MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_array_constructor(
    struct wl_proxy* proxy, uint32_t opcode, union wl_argument* args,
    const struct wl_interface* interface) {
  return NULL;
}

MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_array_constructor_versioned(
    struct wl_proxy* proxy, uint32_t opcode, union wl_argument* args,
    const struct wl_interface* interface, uint32_t version) {
  return NULL;
}

MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy) {}

MOZ_EXPORT int wl_proxy_add_listener(struct wl_proxy* proxy,
                                     void (**implementation)(void),
                                     void* data) {
  return -1;
}

MOZ_EXPORT const void* wl_proxy_get_listener(struct wl_proxy* proxy) {
  return NULL;
}

typedef int (*wl_dispatcher_func_t)(const void*, void*, uint32_t,
                                    const struct wl_message*,
                                    union wl_argument*);

MOZ_EXPORT int wl_proxy_add_dispatcher(struct wl_proxy* proxy,
                                       wl_dispatcher_func_t dispatcher_func,
                                       const void* dispatcher_data,
                                       void* data) {
  return -1;
}

MOZ_EXPORT void wl_proxy_set_user_data(struct wl_proxy* proxy,
                                       void* user_data) {}

MOZ_EXPORT void* wl_proxy_get_user_data(struct wl_proxy* proxy) { return NULL; }

MOZ_EXPORT uint32_t wl_proxy_get_version(struct wl_proxy* proxy) { return -1; }

MOZ_EXPORT uint32_t wl_proxy_get_id(struct wl_proxy* proxy) { return -1; }

MOZ_EXPORT const char* wl_proxy_get_class(struct wl_proxy* proxy) {
  return NULL;
}

MOZ_EXPORT void wl_proxy_set_queue(struct wl_proxy* proxy,
                                   struct wl_event_queue* queue) {}

MOZ_EXPORT struct wl_display* wl_display_connect(const char* name) {
  return NULL;
}

MOZ_EXPORT struct wl_display* wl_display_connect_to_fd(int fd) { return NULL; }

MOZ_EXPORT void wl_display_disconnect(struct wl_display* display) {}

MOZ_EXPORT int wl_display_get_fd(struct wl_display* display) { return -1; }

MOZ_EXPORT int wl_display_dispatch(struct wl_display* display) { return -1; }

MOZ_EXPORT int wl_display_dispatch_queue(struct wl_display* display,
                                         struct wl_event_queue* queue) {
  return -1;
}

MOZ_EXPORT int wl_display_dispatch_queue_pending(struct wl_display* display,
                                                 struct wl_event_queue* queue) {
  return -1;
}

MOZ_EXPORT int wl_display_dispatch_pending(struct wl_display* display) {
  return -1;
}

MOZ_EXPORT int wl_display_get_error(struct wl_display* display) { return -1; }

MOZ_EXPORT uint32_t wl_display_get_protocol_error(
    struct wl_display* display, const struct wl_interface** interface,
    uint32_t* id) {
  return -1;
}

MOZ_EXPORT int wl_display_flush(struct wl_display* display) { return -1; }

MOZ_EXPORT int wl_display_roundtrip_queue(struct wl_display* display,
                                          struct wl_event_queue* queue) {
  return -1;
}

MOZ_EXPORT int wl_display_roundtrip(struct wl_display* display) { return -1; }

MOZ_EXPORT struct wl_event_queue* wl_display_create_queue(
    struct wl_display* display) {
  return NULL;
}

MOZ_EXPORT int wl_display_prepare_read_queue(struct wl_display* display,
                                             struct wl_event_queue* queue) {
  return -1;
}

MOZ_EXPORT int wl_display_prepare_read(struct wl_display* display) {
  return -1;
}

MOZ_EXPORT void wl_display_cancel_read(struct wl_display* display) {}

MOZ_EXPORT int wl_display_read_events(struct wl_display* display) { return -1; }

MOZ_EXPORT void wl_log_set_handler_client(wl_log_func_t handler) {}

MOZ_EXPORT struct wl_egl_window* wl_egl_window_create(
    struct wl_surface* surface, int width, int height) {
  return NULL;
}

MOZ_EXPORT void wl_egl_window_destroy(struct wl_egl_window* egl_window) {}

MOZ_EXPORT void wl_egl_window_resize(struct wl_egl_window* egl_window,
                                     int width, int height, int dx, int dy) {}

MOZ_EXPORT void wl_egl_window_get_attached_size(
    struct wl_egl_window* egl_window, int* width, int* height) {}

MOZ_EXPORT void wl_list_init(struct wl_list* list) {}

MOZ_EXPORT void wl_list_insert(struct wl_list* list, struct wl_list* elm) {}

MOZ_EXPORT void wl_list_remove(struct wl_list* elm) {}

MOZ_EXPORT int wl_list_length(const struct wl_list* list) { return -1; }

MOZ_EXPORT int wl_list_empty(const struct wl_list* list) { return -1; }

MOZ_EXPORT void wl_list_insert_list(struct wl_list* list,
                                    struct wl_list* other) {}

MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags(
    struct wl_proxy* proxy, uint32_t opcode,
    const struct wl_interface* interface, uint32_t version, uint32_t flags,
    ...) {
  return NULL;
}