dbghelp: Properly fail on PDB files generated by MSVC compiler version 14.31.
[wine.git] / dlls / winemac.drv / macdrv_cocoa.h
blob94f9fbcfa172794126b6c0bbcf73f0f7e1e51089
1 /*
2 * MACDRV Cocoa interface declarations
4 * Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 /* This header serves as a C interface between the Wine parts of MACDRV
22 * and the Objective-C parts. It should restrict itself to C and the C-based
23 * Mac APIs, avoiding both Wine and Objective-C/Cocoa features, so that it can
24 * be included by both sides without contaminating either.
27 #ifndef __WINE_MACDRV_COCOA_H
28 #define __WINE_MACDRV_COCOA_H
31 #define GetCurrentProcess MacGetCurrentProcess
32 #define GetCurrentThread MacGetCurrentThread
33 #define LoadResource MacLoadResource
34 #define AnimatePalette MacAnimatePalette
35 #define EqualRgn MacEqualRgn
36 #define FillRgn MacFillRgn
37 #define FrameRgn MacFrameRgn
38 #define GetPixel MacGetPixel
39 #define InvertRgn MacInvertRgn
40 #define LineTo MacLineTo
41 #define OffsetRgn MacOffsetRgn
42 #define PaintRgn MacPaintRgn
43 #define Polygon MacPolygon
44 #define ResizePalette MacResizePalette
45 #define SetRectRgn MacSetRectRgn
46 #define EqualRect MacEqualRect
47 #define FillRect MacFillRect
48 #define FrameRect MacFrameRect
49 #define GetCursor MacGetCursor
50 #define InvertRect MacInvertRect
51 #define OffsetRect MacOffsetRect
52 #define PtInRect MacPtInRect
53 #define SetCursor MacSetCursor
54 #define SetRect MacSetRect
55 #define ShowCursor MacShowCursor
56 #define UnionRect MacUnionRect
58 #include <ApplicationServices/ApplicationServices.h>
60 #undef GetCurrentProcess
61 #undef GetCurrentThread
62 #undef LoadResource
63 #undef AnimatePalette
64 #undef EqualRgn
65 #undef FillRgn
66 #undef FrameRgn
67 #undef GetPixel
68 #undef InvertRgn
69 #undef LineTo
70 #undef OffsetRgn
71 #undef PaintRgn
72 #undef Polygon
73 #undef ResizePalette
74 #undef SetRectRgn
75 #undef EqualRect
76 #undef FillRect
77 #undef FrameRect
78 #undef GetCursor
79 #undef InvertRect
80 #undef OffsetRect
81 #undef PtInRect
82 #undef SetCursor
83 #undef SetRect
84 #undef ShowCursor
85 #undef UnionRect
87 #include <pthread.h>
90 #ifndef DECLSPEC_HIDDEN
91 # if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)
92 # define DECLSPEC_HIDDEN
93 # elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
94 # define DECLSPEC_HIDDEN __attribute__((visibility ("hidden")))
95 # else
96 # define DECLSPEC_HIDDEN
97 # endif
98 #endif
101 #include "macdrv_res.h"
104 /* Must match the values of Cocoa's NSDragOperation enum. */
105 enum {
106 DRAG_OP_NONE = 0,
107 DRAG_OP_COPY = 1,
108 DRAG_OP_LINK = 2,
109 DRAG_OP_GENERIC = 4,
110 DRAG_OP_PRIVATE = 8,
111 DRAG_OP_MOVE = 16,
112 DRAG_OP_DELETE = 32,
113 DRAG_OP_EVERY = UINT32_MAX
116 enum {
117 TOPMOST_FLOAT_INACTIVE_NONE,
118 TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN,
119 TOPMOST_FLOAT_INACTIVE_ALL,
122 enum {
123 GL_SURFACE_IN_FRONT_OPAQUE,
124 GL_SURFACE_IN_FRONT_TRANSPARENT,
125 GL_SURFACE_BEHIND,
128 enum {
129 MACDRV_HOTKEY_SUCCESS,
130 MACDRV_HOTKEY_ALREADY_REGISTERED,
131 MACDRV_HOTKEY_FAILURE,
134 typedef struct __TISInputSource *TISInputSourceRef;
136 typedef struct macdrv_opaque_window* macdrv_window;
137 typedef struct macdrv_opaque_event_queue* macdrv_event_queue;
138 typedef struct macdrv_opaque_view* macdrv_view;
139 typedef struct macdrv_opaque_opengl_context* macdrv_opengl_context;
140 #ifdef HAVE_METAL_METAL_H
141 typedef struct macdrv_opaque_metal_device* macdrv_metal_device;
142 typedef struct macdrv_opaque_metal_view* macdrv_metal_view;
143 typedef struct macdrv_opaque_metal_layer* macdrv_metal_layer;
144 #endif
145 typedef struct macdrv_opaque_status_item* macdrv_status_item;
146 struct macdrv_event;
147 struct macdrv_query;
149 struct macdrv_display {
150 CGDirectDisplayID displayID;
151 CGRect frame;
152 CGRect work_frame;
156 /* main */
157 extern int macdrv_err_on;
158 extern int topmost_float_inactive DECLSPEC_HIDDEN;
159 extern int capture_displays_for_fullscreen DECLSPEC_HIDDEN;
160 extern int left_option_is_alt DECLSPEC_HIDDEN;
161 extern int right_option_is_alt DECLSPEC_HIDDEN;
162 extern int left_command_is_ctrl DECLSPEC_HIDDEN;
163 extern int right_command_is_ctrl DECLSPEC_HIDDEN;
164 extern int allow_immovable_windows DECLSPEC_HIDDEN;
165 extern int use_confinement_cursor_clipping DECLSPEC_HIDDEN;
166 extern int cursor_clipping_locks_windows DECLSPEC_HIDDEN;
167 extern int use_precise_scrolling DECLSPEC_HIDDEN;
168 extern int gl_surface_mode DECLSPEC_HIDDEN;
169 extern CFDictionaryRef localized_strings DECLSPEC_HIDDEN;
170 extern int retina_enabled DECLSPEC_HIDDEN; /* Whether Retina mode is enabled via registry setting. */
171 extern int retina_on DECLSPEC_HIDDEN; /* Whether Retina mode is currently active (enabled and display is in default mode). */
172 extern int enable_app_nap DECLSPEC_HIDDEN;
174 static inline CGRect cgrect_mac_from_win(CGRect rect)
176 if (retina_on)
178 rect.origin.x /= 2;
179 rect.origin.y /= 2;
180 rect.size.width /= 2;
181 rect.size.height /= 2;
184 return rect;
187 static inline CGRect cgrect_win_from_mac(CGRect rect)
189 if (retina_on)
191 rect.origin.x *= 2;
192 rect.origin.y *= 2;
193 rect.size.width *= 2;
194 rect.size.height *= 2;
197 return rect;
200 static inline CGSize cgsize_mac_from_win(CGSize size)
202 if (retina_on)
204 size.width /= 2;
205 size.height /= 2;
208 return size;
211 static inline CGSize cgsize_win_from_mac(CGSize size)
213 if (retina_on)
215 size.width *= 2;
216 size.height *= 2;
219 return size;
222 static inline CGPoint cgpoint_mac_from_win(CGPoint point)
224 if (retina_on)
226 point.x /= 2;
227 point.y /= 2;
230 return point;
233 static inline CGPoint cgpoint_win_from_mac(CGPoint point)
235 if (retina_on)
237 point.x *= 2;
238 point.y *= 2;
241 return point;
244 extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN;
245 extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN;
246 extern void macdrv_beep(void) DECLSPEC_HIDDEN;
247 extern void macdrv_set_application_icon(CFArrayRef images) DECLSPEC_HIDDEN;
248 extern void macdrv_quit_reply(int reply) DECLSPEC_HIDDEN;
249 extern int macdrv_using_input_method(void) DECLSPEC_HIDDEN;
250 extern void macdrv_set_mouse_capture_window(macdrv_window window) DECLSPEC_HIDDEN;
251 extern void macdrv_set_cocoa_retina_mode(int new_mode) DECLSPEC_HIDDEN;
254 /* cursor */
255 extern void macdrv_set_cursor(CFStringRef name, CFArrayRef frames) DECLSPEC_HIDDEN;
256 extern int macdrv_get_cursor_position(CGPoint *pos) DECLSPEC_HIDDEN;
257 extern int macdrv_set_cursor_position(CGPoint pos) DECLSPEC_HIDDEN;
258 extern int macdrv_clip_cursor(CGRect rect) DECLSPEC_HIDDEN;
261 /* display */
263 /* Used DISPLAY_DEVICE.StateFlags for adapters */
264 #define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
265 #define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004
266 /* Used DISPLAY_DEVICE.StateFlags for monitors */
267 #define DISPLAY_DEVICE_ACTIVE 0x00000001
268 #define DISPLAY_DEVICE_ATTACHED 0x00000002
270 /* Represent a physical GPU in the PCI slots */
271 struct macdrv_gpu
273 /* PCI GPU io registry entry id */
274 uint64_t id;
275 /* Name, in UTF-8 encoding */
276 char name[128];
277 /* PCI ID */
278 uint32_t vendor_id;
279 uint32_t device_id;
280 uint32_t subsys_id;
281 uint32_t revision_id;
284 /* Represent an adapter in EnumDisplayDevices context */
285 struct macdrv_adapter
287 /* ID to uniquely identify an adapter. Currently it's a CGDirectDisplayID */
288 uint32_t id;
289 /* as StateFlags in DISPLAY_DEVICE struct */
290 uint32_t state_flags;
293 /* Represent a monitor in EnumDisplayDevices context */
294 struct macdrv_monitor
296 /* Name, in UTF-8 encoding */
297 char name[128];
298 /* as RcMonitor in MONITORINFO struct after conversion by rect_from_cgrect */
299 CGRect rc_monitor;
300 /* as RcWork in MONITORINFO struct after conversion by rect_from_cgrect */
301 CGRect rc_work;
302 /* StateFlags in DISPLAY_DEVICE struct */
303 uint32_t state_flags;
306 extern int macdrv_get_displays(struct macdrv_display** displays, int* count) DECLSPEC_HIDDEN;
307 extern void macdrv_free_displays(struct macdrv_display* displays) DECLSPEC_HIDDEN;
308 extern int macdrv_set_display_mode(const struct macdrv_display* display,
309 CGDisplayModeRef display_mode) DECLSPEC_HIDDEN;
310 extern int macdrv_get_gpus(struct macdrv_gpu** gpus, int* count) DECLSPEC_HIDDEN;
311 extern void macdrv_free_gpus(struct macdrv_gpu* gpus) DECLSPEC_HIDDEN;
312 extern int macdrv_get_adapters(uint64_t gpu_id, struct macdrv_adapter** adapters, int* count) DECLSPEC_HIDDEN;
313 extern void macdrv_free_adapters(struct macdrv_adapter* adapters) DECLSPEC_HIDDEN;
314 extern int macdrv_get_monitors(uint32_t adapter_id, struct macdrv_monitor** monitors, int* count) DECLSPEC_HIDDEN;
315 extern void macdrv_free_monitors(struct macdrv_monitor* monitors) DECLSPEC_HIDDEN;
318 /* event */
319 enum {
320 APP_ACTIVATED,
321 APP_DEACTIVATED,
322 APP_QUIT_REQUESTED,
323 DISPLAYS_CHANGED,
324 HOTKEY_PRESS,
325 IM_SET_TEXT,
326 KEY_PRESS,
327 KEY_RELEASE,
328 KEYBOARD_CHANGED,
329 LOST_PASTEBOARD_OWNERSHIP,
330 MOUSE_BUTTON,
331 MOUSE_MOVED,
332 MOUSE_MOVED_ABSOLUTE,
333 MOUSE_SCROLL,
334 QUERY_EVENT,
335 QUERY_EVENT_NO_PREEMPT_WAIT,
336 REASSERT_WINDOW_POSITION,
337 RELEASE_CAPTURE,
338 SENT_TEXT_INPUT,
339 STATUS_ITEM_MOUSE_BUTTON,
340 STATUS_ITEM_MOUSE_MOVE,
341 WINDOW_BROUGHT_FORWARD,
342 WINDOW_CLOSE_REQUESTED,
343 WINDOW_DID_MINIMIZE,
344 WINDOW_DID_UNMINIMIZE,
345 WINDOW_DRAG_BEGIN,
346 WINDOW_DRAG_END,
347 WINDOW_FRAME_CHANGED,
348 WINDOW_GOT_FOCUS,
349 WINDOW_LOST_FOCUS,
350 WINDOW_MAXIMIZE_REQUESTED,
351 WINDOW_MINIMIZE_REQUESTED,
352 WINDOW_RESIZE_ENDED,
353 WINDOW_RESTORE_REQUESTED,
354 NUM_EVENT_TYPES
357 enum {
358 QUIT_REASON_NONE,
359 QUIT_REASON_LOGOUT,
360 QUIT_REASON_RESTART,
361 QUIT_REASON_SHUTDOWN,
364 typedef uint64_t macdrv_event_mask;
366 typedef struct macdrv_event {
367 int refs;
368 int deliver;
369 int type;
370 macdrv_window window;
371 union {
372 struct {
373 int reason;
374 } app_quit_requested;
375 struct {
376 int activating;
377 } displays_changed;
378 struct {
379 unsigned int vkey;
380 unsigned int mod_flags;
381 unsigned int keycode;
382 unsigned long time_ms;
383 } hotkey_press;
384 struct {
385 void *data;
386 CFStringRef text; /* new text or NULL if just completing existing text */
387 unsigned int cursor_pos;
388 unsigned int complete; /* is completing text? */
389 } im_set_text;
390 struct {
391 CGKeyCode keycode;
392 CGEventFlags modifiers;
393 unsigned long time_ms;
394 } key;
395 struct {
396 CFDataRef uchr;
397 CGEventSourceKeyboardType keyboard_type;
398 int iso_keyboard;
399 TISInputSourceRef input_source;
400 } keyboard_changed;
401 struct {
402 int button;
403 int pressed;
404 int x;
405 int y;
406 unsigned long time_ms;
407 } mouse_button;
408 struct {
409 int x;
410 int y;
411 int drag;
412 unsigned long time_ms;
413 } mouse_moved;
414 struct {
415 int x_scroll;
416 int y_scroll;
417 int x;
418 int y;
419 unsigned long time_ms;
420 } mouse_scroll;
421 struct {
422 struct macdrv_query *query;
423 } query_event;
424 struct {
425 int handled;
426 int *done;
427 } sent_text_input;
428 struct {
429 macdrv_status_item item;
430 int button;
431 int down;
432 int count;
433 int x;
434 int y;
435 } status_item_mouse_button;
436 struct {
437 macdrv_status_item item;
438 int x;
439 int y;
440 } status_item_mouse_move;
441 struct {
442 int no_activate;
443 } window_drag_begin;
444 struct {
445 CGRect frame;
446 int fullscreen;
447 int in_resize;
448 int skip_size_move_loop;
449 } window_frame_changed;
450 struct {
451 unsigned long serial;
452 void *tried_windows;
453 } window_got_focus;
454 struct {
455 int keep_frame;
456 CGRect frame;
457 } window_restore_requested;
459 } macdrv_event;
461 enum {
462 QUERY_DRAG_DROP,
463 QUERY_DRAG_EXITED,
464 QUERY_DRAG_OPERATION,
465 QUERY_IME_CHAR_RECT,
466 QUERY_PASTEBOARD_DATA,
467 QUERY_RESIZE_SIZE,
468 QUERY_RESIZE_START,
469 QUERY_MIN_MAX_INFO,
470 NUM_QUERY_TYPES
473 typedef struct macdrv_query {
474 int refs;
475 int type;
476 macdrv_window window;
477 int status;
478 int done;
479 union {
480 struct {
481 int x;
482 int y;
483 uint32_t op;
484 CFTypeRef pasteboard;
485 } drag_drop;
486 struct {
487 int x;
488 int y;
489 uint32_t offered_ops;
490 uint32_t accepted_op;
491 CFTypeRef pasteboard;
492 } drag_operation;
493 struct {
494 void *data;
495 CFRange range;
496 CGRect rect;
497 } ime_char_rect;
498 struct {
499 CFStringRef type;
500 } pasteboard_data;
501 struct {
502 CGRect rect;
503 unsigned int from_left : 1;
504 unsigned int from_top : 1;
505 } resize_size;
507 } macdrv_query;
509 static inline macdrv_event_mask event_mask_for_type(int type)
511 return ((macdrv_event_mask)1 << type);
514 typedef void (*macdrv_event_handler)(const macdrv_event *event);
516 extern macdrv_event_queue macdrv_create_event_queue(macdrv_event_handler handler) DECLSPEC_HIDDEN;
517 extern void macdrv_destroy_event_queue(macdrv_event_queue queue) DECLSPEC_HIDDEN;
518 extern int macdrv_get_event_queue_fd(macdrv_event_queue queue) DECLSPEC_HIDDEN;
520 extern int macdrv_copy_event_from_queue(macdrv_event_queue queue,
521 macdrv_event_mask mask, macdrv_event **event) DECLSPEC_HIDDEN;
522 extern void macdrv_release_event(macdrv_event *event) DECLSPEC_HIDDEN;
524 extern macdrv_query* macdrv_create_query(void) DECLSPEC_HIDDEN;
525 extern macdrv_query* macdrv_retain_query(macdrv_query *query) DECLSPEC_HIDDEN;
526 extern void macdrv_release_query(macdrv_query *query) DECLSPEC_HIDDEN;
527 extern void macdrv_set_query_done(macdrv_query *query) DECLSPEC_HIDDEN;
528 extern int macdrv_register_hot_key(macdrv_event_queue q, unsigned int vkey, unsigned int mod_flags,
529 unsigned int keycode, unsigned int modifiers) DECLSPEC_HIDDEN;
530 extern void macdrv_unregister_hot_key(macdrv_event_queue q, unsigned int vkey, unsigned int mod_flags) DECLSPEC_HIDDEN;
533 /* window */
534 struct macdrv_window_features {
535 unsigned int title_bar:1;
536 unsigned int close_button:1;
537 unsigned int minimize_button:1;
538 unsigned int resizable:1;
539 unsigned int maximize_button:1;
540 unsigned int utility:1;
541 unsigned int shadow:1;
542 unsigned int prevents_app_activation:1;
545 struct macdrv_window_state {
546 unsigned int disabled:1;
547 unsigned int no_foreground:1;
548 unsigned int floating:1;
549 unsigned int excluded_by_expose:1;
550 unsigned int excluded_by_cycle:1;
551 unsigned int minimized:1;
552 unsigned int minimized_valid:1;
553 unsigned int maximized:1;
556 extern macdrv_window macdrv_create_cocoa_window(const struct macdrv_window_features* wf,
557 CGRect frame, void* hwnd, macdrv_event_queue queue) DECLSPEC_HIDDEN;
558 extern void macdrv_destroy_cocoa_window(macdrv_window w) DECLSPEC_HIDDEN;
559 extern void* macdrv_get_window_hwnd(macdrv_window w) DECLSPEC_HIDDEN;
560 extern void macdrv_set_cocoa_window_features(macdrv_window w,
561 const struct macdrv_window_features* wf) DECLSPEC_HIDDEN;
562 extern void macdrv_set_cocoa_window_state(macdrv_window w,
563 const struct macdrv_window_state* state) DECLSPEC_HIDDEN;
564 extern void macdrv_set_cocoa_window_title(macdrv_window w, const UniChar* title,
565 size_t length) DECLSPEC_HIDDEN;
566 extern void macdrv_order_cocoa_window(macdrv_window w, macdrv_window prev,
567 macdrv_window next, int activate) DECLSPEC_HIDDEN;
568 extern void macdrv_hide_cocoa_window(macdrv_window w) DECLSPEC_HIDDEN;
569 extern void macdrv_set_cocoa_window_frame(macdrv_window w, const CGRect* new_frame) DECLSPEC_HIDDEN;
570 extern void macdrv_get_cocoa_window_frame(macdrv_window w, CGRect* out_frame) DECLSPEC_HIDDEN;
571 extern void macdrv_set_cocoa_parent_window(macdrv_window w, macdrv_window parent) DECLSPEC_HIDDEN;
572 extern void macdrv_set_window_surface(macdrv_window w, void *surface, pthread_mutex_t *mutex) DECLSPEC_HIDDEN;
573 extern CGImageRef create_surface_image(void *window_surface, CGRect *rect, int copy_data, int color_keyed,
574 CGFloat key_red, CGFloat key_green, CGFloat key_blue) DECLSPEC_HIDDEN;
575 extern int get_surface_blit_rects(void *window_surface, const CGRect **rects, int *count) DECLSPEC_HIDDEN;
576 extern void macdrv_window_needs_display(macdrv_window w, CGRect rect) DECLSPEC_HIDDEN;
577 extern void macdrv_set_window_shape(macdrv_window w, const CGRect *rects, int count) DECLSPEC_HIDDEN;
578 extern void macdrv_set_window_alpha(macdrv_window w, CGFloat alpha) DECLSPEC_HIDDEN;
579 extern void macdrv_set_window_color_key(macdrv_window w, CGFloat keyRed, CGFloat keyGreen,
580 CGFloat keyBlue) DECLSPEC_HIDDEN;
581 extern void macdrv_clear_window_color_key(macdrv_window w) DECLSPEC_HIDDEN;
582 extern void macdrv_window_use_per_pixel_alpha(macdrv_window w, int use_per_pixel_alpha) DECLSPEC_HIDDEN;
583 extern void macdrv_give_cocoa_window_focus(macdrv_window w, int activate) DECLSPEC_HIDDEN;
584 extern void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize max_size) DECLSPEC_HIDDEN;
585 extern macdrv_view macdrv_create_view(CGRect rect) DECLSPEC_HIDDEN;
586 extern void macdrv_dispose_view(macdrv_view v) DECLSPEC_HIDDEN;
587 extern void macdrv_set_view_frame(macdrv_view v, CGRect rect) DECLSPEC_HIDDEN;
588 extern void macdrv_set_view_superview(macdrv_view v, macdrv_view s, macdrv_window w, macdrv_view p, macdrv_view n) DECLSPEC_HIDDEN;
589 extern void macdrv_set_view_hidden(macdrv_view v, int hidden) DECLSPEC_HIDDEN;
590 extern void macdrv_add_view_opengl_context(macdrv_view v, macdrv_opengl_context c) DECLSPEC_HIDDEN;
591 extern void macdrv_remove_view_opengl_context(macdrv_view v, macdrv_opengl_context c) DECLSPEC_HIDDEN;
592 #ifdef HAVE_METAL_METAL_H
593 extern macdrv_metal_device macdrv_create_metal_device(void) DECLSPEC_HIDDEN;
594 extern void macdrv_release_metal_device(macdrv_metal_device d) DECLSPEC_HIDDEN;
595 extern macdrv_metal_view macdrv_view_create_metal_view(macdrv_view v, macdrv_metal_device d) DECLSPEC_HIDDEN;
596 extern macdrv_metal_layer macdrv_view_get_metal_layer(macdrv_metal_view v) DECLSPEC_HIDDEN;
597 extern void macdrv_view_release_metal_view(macdrv_metal_view v) DECLSPEC_HIDDEN;
598 #endif
599 extern int macdrv_get_view_backing_size(macdrv_view v, int backing_size[2]) DECLSPEC_HIDDEN;
600 extern void macdrv_set_view_backing_size(macdrv_view v, const int backing_size[2]) DECLSPEC_HIDDEN;
601 extern uint32_t macdrv_window_background_color(void) DECLSPEC_HIDDEN;
602 extern void macdrv_send_text_input_event(int pressed, unsigned int flags, int repeat, int keyc,
603 void* data, int* done) DECLSPEC_HIDDEN;
604 extern int macdrv_is_any_wine_window_visible(void) DECLSPEC_HIDDEN;
607 /* keyboard */
608 extern void macdrv_get_input_source_info(CFDataRef* uchr,CGEventSourceKeyboardType* keyboard_type, int* is_iso,
609 TISInputSourceRef* input_source) DECLSPEC_HIDDEN;
610 extern CFArrayRef macdrv_create_input_source_list(void) DECLSPEC_HIDDEN;
611 extern int macdrv_select_input_source(TISInputSourceRef input_source) DECLSPEC_HIDDEN;
612 extern const CFStringRef macdrv_input_source_input_key DECLSPEC_HIDDEN;
613 extern const CFStringRef macdrv_input_source_type_key DECLSPEC_HIDDEN;
614 extern const CFStringRef macdrv_input_source_lang_key DECLSPEC_HIDDEN;
615 extern int macdrv_layout_list_needs_update DECLSPEC_HIDDEN;
618 /* clipboard */
619 extern CFArrayRef macdrv_copy_pasteboard_types(CFTypeRef pasteboard) DECLSPEC_HIDDEN;
620 extern CFDataRef macdrv_copy_pasteboard_data(CFTypeRef pasteboard, CFStringRef type) DECLSPEC_HIDDEN;
621 extern int macdrv_is_pasteboard_owner(macdrv_window w) DECLSPEC_HIDDEN;
622 extern int macdrv_has_pasteboard_changed(void) DECLSPEC_HIDDEN;
623 extern void macdrv_clear_pasteboard(macdrv_window w) DECLSPEC_HIDDEN;
624 extern int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w) DECLSPEC_HIDDEN;
627 /* opengl */
628 extern macdrv_opengl_context macdrv_create_opengl_context(void* cglctx) DECLSPEC_HIDDEN;
629 extern void macdrv_dispose_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
630 extern void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v, CGRect r) DECLSPEC_HIDDEN;
631 extern void macdrv_update_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
632 extern void macdrv_flush_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
635 /* systray / status item */
636 extern macdrv_status_item macdrv_create_status_item(macdrv_event_queue q) DECLSPEC_HIDDEN;
637 extern void macdrv_destroy_status_item(macdrv_status_item s) DECLSPEC_HIDDEN;
638 extern void macdrv_set_status_item_image(macdrv_status_item s, CGImageRef cgimage) DECLSPEC_HIDDEN;
639 extern void macdrv_set_status_item_tooltip(macdrv_status_item s, CFStringRef cftip) DECLSPEC_HIDDEN;
641 extern void macdrv_clear_ime_text(void) DECLSPEC_HIDDEN;
643 #endif /* __WINE_MACDRV_COCOA_H */