2012-12-21 02:02:28 +01:00
|
|
|
/*
|
|
|
|
* MACDRV Cocoa interface declarations
|
|
|
|
*
|
2013-01-07 21:44:36 +01:00
|
|
|
* Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
|
2012-12-21 02:02:28 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This header serves as a C interface between the Wine parts of MACDRV
|
|
|
|
* and the Objective-C parts. It should restrict itself to C and the C-based
|
|
|
|
* Mac APIs, avoiding both Wine and Objective-C/Cocoa features, so that it can
|
|
|
|
* be included by both sides without contaminating either.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_MACDRV_COCOA_H
|
|
|
|
#define __WINE_MACDRV_COCOA_H
|
|
|
|
|
|
|
|
|
|
|
|
#define GetCurrentProcess MacGetCurrentProcess
|
|
|
|
#define GetCurrentThread MacGetCurrentThread
|
|
|
|
#define LoadResource MacLoadResource
|
|
|
|
#define AnimatePalette MacAnimatePalette
|
|
|
|
#define EqualRgn MacEqualRgn
|
|
|
|
#define FillRgn MacFillRgn
|
|
|
|
#define FrameRgn MacFrameRgn
|
|
|
|
#define GetPixel MacGetPixel
|
|
|
|
#define InvertRgn MacInvertRgn
|
|
|
|
#define LineTo MacLineTo
|
|
|
|
#define OffsetRgn MacOffsetRgn
|
|
|
|
#define PaintRgn MacPaintRgn
|
|
|
|
#define Polygon MacPolygon
|
|
|
|
#define ResizePalette MacResizePalette
|
|
|
|
#define SetRectRgn MacSetRectRgn
|
|
|
|
#define EqualRect MacEqualRect
|
|
|
|
#define FillRect MacFillRect
|
|
|
|
#define FrameRect MacFrameRect
|
|
|
|
#define GetCursor MacGetCursor
|
|
|
|
#define InvertRect MacInvertRect
|
|
|
|
#define OffsetRect MacOffsetRect
|
|
|
|
#define PtInRect MacPtInRect
|
|
|
|
#define SetCursor MacSetCursor
|
|
|
|
#define SetRect MacSetRect
|
|
|
|
#define ShowCursor MacShowCursor
|
|
|
|
#define UnionRect MacUnionRect
|
|
|
|
|
|
|
|
#include <ApplicationServices/ApplicationServices.h>
|
|
|
|
|
|
|
|
#undef GetCurrentProcess
|
|
|
|
#undef GetCurrentThread
|
|
|
|
#undef LoadResource
|
|
|
|
#undef AnimatePalette
|
|
|
|
#undef EqualRgn
|
|
|
|
#undef FillRgn
|
|
|
|
#undef FrameRgn
|
|
|
|
#undef GetPixel
|
|
|
|
#undef InvertRgn
|
|
|
|
#undef LineTo
|
|
|
|
#undef OffsetRgn
|
|
|
|
#undef PaintRgn
|
|
|
|
#undef Polygon
|
|
|
|
#undef ResizePalette
|
|
|
|
#undef SetRectRgn
|
|
|
|
#undef EqualRect
|
|
|
|
#undef FillRect
|
|
|
|
#undef FrameRect
|
|
|
|
#undef GetCursor
|
|
|
|
#undef InvertRect
|
|
|
|
#undef OffsetRect
|
|
|
|
#undef PtInRect
|
|
|
|
#undef SetCursor
|
|
|
|
#undef SetRect
|
|
|
|
#undef ShowCursor
|
|
|
|
#undef UnionRect
|
|
|
|
#undef DPRINTF
|
|
|
|
|
2013-01-15 03:23:55 +01:00
|
|
|
#include <pthread.h>
|
|
|
|
|
2012-12-21 02:02:28 +01:00
|
|
|
|
|
|
|
#ifndef DECLSPEC_HIDDEN
|
|
|
|
# if defined(__MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)
|
|
|
|
# define DECLSPEC_HIDDEN
|
|
|
|
# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
|
|
|
# define DECLSPEC_HIDDEN __attribute__((visibility ("hidden")))
|
|
|
|
# else
|
|
|
|
# define DECLSPEC_HIDDEN
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2013-03-13 22:53:32 +01:00
|
|
|
/* Must match the values of Cocoa's NSDragOperation enum. */
|
|
|
|
enum {
|
|
|
|
DRAG_OP_NONE = 0,
|
|
|
|
DRAG_OP_COPY = 1,
|
|
|
|
DRAG_OP_LINK = 2,
|
|
|
|
DRAG_OP_GENERIC = 4,
|
|
|
|
DRAG_OP_PRIVATE = 8,
|
|
|
|
DRAG_OP_MOVE = 16,
|
|
|
|
DRAG_OP_DELETE = 32,
|
|
|
|
DRAG_OP_EVERY = UINT32_MAX
|
|
|
|
};
|
|
|
|
|
2013-05-29 16:21:25 +02:00
|
|
|
enum {
|
|
|
|
TOPMOST_FLOAT_INACTIVE_NONE,
|
|
|
|
TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN,
|
|
|
|
TOPMOST_FLOAT_INACTIVE_ALL,
|
|
|
|
};
|
|
|
|
|
2013-09-26 00:10:37 +02:00
|
|
|
enum {
|
|
|
|
MACDRV_HOTKEY_SUCCESS,
|
|
|
|
MACDRV_HOTKEY_ALREADY_REGISTERED,
|
|
|
|
MACDRV_HOTKEY_FAILURE,
|
|
|
|
};
|
|
|
|
|
2013-11-20 16:30:34 +01:00
|
|
|
typedef struct __TISInputSource *TISInputSourceRef;
|
2013-03-13 22:53:32 +01:00
|
|
|
|
2013-01-07 21:44:44 +01:00
|
|
|
typedef struct macdrv_opaque_window* macdrv_window;
|
2013-01-21 07:07:51 +01:00
|
|
|
typedef struct macdrv_opaque_event_queue* macdrv_event_queue;
|
2013-03-06 11:59:07 +01:00
|
|
|
typedef struct macdrv_opaque_view* macdrv_view;
|
|
|
|
typedef struct macdrv_opaque_opengl_context* macdrv_opengl_context;
|
2013-03-18 04:40:54 +01:00
|
|
|
typedef struct macdrv_opaque_status_item* macdrv_status_item;
|
2013-01-27 23:19:48 +01:00
|
|
|
struct macdrv_event;
|
2013-03-11 04:58:26 +01:00
|
|
|
struct macdrv_query;
|
2013-01-07 21:44:44 +01:00
|
|
|
|
2012-12-21 02:02:28 +01:00
|
|
|
struct macdrv_display {
|
|
|
|
CGDirectDisplayID displayID;
|
|
|
|
CGRect frame;
|
|
|
|
CGRect work_frame;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-01-07 21:44:36 +01:00
|
|
|
/* main */
|
2013-01-21 07:07:47 +01:00
|
|
|
extern int macdrv_err_on;
|
2013-05-29 16:21:25 +02:00
|
|
|
extern int topmost_float_inactive DECLSPEC_HIDDEN;
|
2013-06-07 00:43:06 +02:00
|
|
|
extern int capture_displays_for_fullscreen DECLSPEC_HIDDEN;
|
2013-10-09 23:30:59 +02:00
|
|
|
extern int left_option_is_alt DECLSPEC_HIDDEN;
|
|
|
|
extern int right_option_is_alt DECLSPEC_HIDDEN;
|
2013-01-21 07:07:47 +01:00
|
|
|
|
2013-01-27 23:19:33 +01:00
|
|
|
extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN;
|
2013-01-27 23:19:48 +01:00
|
|
|
extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN;
|
2013-02-06 11:36:49 +01:00
|
|
|
extern void macdrv_beep(void) DECLSPEC_HIDDEN;
|
2013-03-18 04:40:49 +01:00
|
|
|
extern void macdrv_set_application_icon(CFArrayRef images) DECLSPEC_HIDDEN;
|
2013-04-04 01:56:55 +02:00
|
|
|
extern void macdrv_quit_reply(int reply) DECLSPEC_HIDDEN;
|
2013-04-22 04:32:26 +02:00
|
|
|
extern int macdrv_using_input_method(void) DECLSPEC_HIDDEN;
|
2013-05-07 10:00:55 +02:00
|
|
|
extern void macdrv_set_mouse_capture_window(macdrv_window window) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:36 +01:00
|
|
|
|
|
|
|
|
2013-02-25 05:53:21 +01:00
|
|
|
/* cursor */
|
|
|
|
extern void macdrv_set_cursor(CFStringRef name, CFArrayRef frames) DECLSPEC_HIDDEN;
|
2013-02-25 05:53:29 +01:00
|
|
|
extern int macdrv_get_cursor_position(CGPoint *pos) DECLSPEC_HIDDEN;
|
2013-02-25 05:53:47 +01:00
|
|
|
extern int macdrv_set_cursor_position(CGPoint pos) DECLSPEC_HIDDEN;
|
2013-02-25 05:53:51 +01:00
|
|
|
extern int macdrv_clip_cursor(CGRect rect) DECLSPEC_HIDDEN;
|
2013-02-25 05:53:21 +01:00
|
|
|
|
|
|
|
|
2012-12-21 02:02:28 +01:00
|
|
|
/* display */
|
|
|
|
extern int macdrv_get_displays(struct macdrv_display** displays, int* count) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_free_displays(struct macdrv_display* displays) DECLSPEC_HIDDEN;
|
2013-02-18 02:28:49 +01:00
|
|
|
extern int macdrv_set_display_mode(const struct macdrv_display* display,
|
|
|
|
CGDisplayModeRef display_mode) DECLSPEC_HIDDEN;
|
2012-12-21 02:02:28 +01:00
|
|
|
|
2013-01-07 21:44:44 +01:00
|
|
|
|
2013-01-21 07:07:51 +01:00
|
|
|
/* event */
|
2013-01-21 07:08:12 +01:00
|
|
|
enum {
|
2013-01-27 23:19:56 +01:00
|
|
|
APP_DEACTIVATED,
|
2013-04-04 01:56:55 +02:00
|
|
|
APP_QUIT_REQUESTED,
|
2013-02-18 02:28:34 +01:00
|
|
|
DISPLAYS_CHANGED,
|
2013-09-26 00:10:37 +02:00
|
|
|
HOTKEY_PRESS,
|
2013-04-22 04:32:26 +02:00
|
|
|
IM_SET_TEXT,
|
2013-02-04 00:20:18 +01:00
|
|
|
KEY_PRESS,
|
|
|
|
KEY_RELEASE,
|
2013-02-04 00:20:15 +01:00
|
|
|
KEYBOARD_CHANGED,
|
2013-01-27 23:19:37 +01:00
|
|
|
MOUSE_BUTTON,
|
2013-02-07 02:32:26 +01:00
|
|
|
MOUSE_MOVED,
|
|
|
|
MOUSE_MOVED_ABSOLUTE,
|
2013-02-11 02:09:12 +01:00
|
|
|
MOUSE_SCROLL,
|
2013-03-11 04:58:26 +01:00
|
|
|
QUERY_EVENT,
|
2013-06-20 02:09:33 +02:00
|
|
|
RELEASE_CAPTURE,
|
2013-09-06 05:23:52 +02:00
|
|
|
STATUS_ITEM_MOUSE_BUTTON,
|
|
|
|
STATUS_ITEM_MOUSE_MOVE,
|
2013-10-08 09:21:34 +02:00
|
|
|
WINDOW_BROUGHT_FORWARD,
|
2013-01-21 07:08:12 +01:00
|
|
|
WINDOW_CLOSE_REQUESTED,
|
2013-02-04 00:20:07 +01:00
|
|
|
WINDOW_DID_UNMINIMIZE,
|
2013-01-27 23:19:29 +01:00
|
|
|
WINDOW_FRAME_CHANGED,
|
2013-01-27 23:19:48 +01:00
|
|
|
WINDOW_GOT_FOCUS,
|
2013-01-27 23:19:53 +01:00
|
|
|
WINDOW_LOST_FOCUS,
|
2013-09-30 17:29:23 +02:00
|
|
|
WINDOW_MINIMIZE_REQUESTED,
|
2013-11-01 01:16:42 +01:00
|
|
|
WINDOW_RESIZE_ENDED,
|
2013-01-21 07:08:12 +01:00
|
|
|
NUM_EVENT_TYPES
|
|
|
|
};
|
|
|
|
|
2013-04-04 01:56:55 +02:00
|
|
|
enum {
|
|
|
|
QUIT_REASON_NONE,
|
|
|
|
QUIT_REASON_LOGOUT,
|
|
|
|
QUIT_REASON_RESTART,
|
|
|
|
QUIT_REASON_SHUTDOWN,
|
|
|
|
};
|
|
|
|
|
2013-01-21 07:07:51 +01:00
|
|
|
typedef uint32_t macdrv_event_mask;
|
|
|
|
|
|
|
|
typedef struct macdrv_event {
|
2013-04-04 01:56:35 +02:00
|
|
|
int refs;
|
2013-04-04 01:56:41 +02:00
|
|
|
int deliver;
|
2013-01-21 07:07:51 +01:00
|
|
|
int type;
|
|
|
|
macdrv_window window;
|
2013-01-27 23:19:29 +01:00
|
|
|
union {
|
2013-04-04 01:56:55 +02:00
|
|
|
struct {
|
|
|
|
int reason;
|
|
|
|
} app_quit_requested;
|
2013-02-18 02:28:49 +01:00
|
|
|
struct {
|
|
|
|
int activating;
|
|
|
|
} displays_changed;
|
2013-09-26 00:10:37 +02:00
|
|
|
struct {
|
|
|
|
unsigned int vkey;
|
|
|
|
unsigned int mod_flags;
|
|
|
|
unsigned int keycode;
|
|
|
|
unsigned long time_ms;
|
|
|
|
} hotkey_press;
|
2013-04-22 04:32:26 +02:00
|
|
|
struct {
|
|
|
|
void *data;
|
|
|
|
CFStringRef text; /* new text or NULL if just completing existing text */
|
2013-05-29 20:11:57 +02:00
|
|
|
unsigned int cursor_pos;
|
2013-04-22 04:32:26 +02:00
|
|
|
unsigned int complete; /* is completing text? */
|
|
|
|
} im_set_text;
|
2013-02-04 00:20:18 +01:00
|
|
|
struct {
|
|
|
|
CGKeyCode keycode;
|
|
|
|
CGEventFlags modifiers;
|
|
|
|
unsigned long time_ms;
|
|
|
|
} key;
|
2013-02-04 00:20:15 +01:00
|
|
|
struct {
|
|
|
|
CFDataRef uchr;
|
|
|
|
CGEventSourceKeyboardType keyboard_type;
|
|
|
|
int iso_keyboard;
|
2013-11-20 16:30:36 +01:00
|
|
|
TISInputSourceRef input_source;
|
2013-02-04 00:20:15 +01:00
|
|
|
} keyboard_changed;
|
2013-01-27 23:19:37 +01:00
|
|
|
struct {
|
|
|
|
int button;
|
|
|
|
int pressed;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
unsigned long time_ms;
|
|
|
|
} mouse_button;
|
2013-02-07 02:32:26 +01:00
|
|
|
struct {
|
|
|
|
int x;
|
|
|
|
int y;
|
2013-05-07 10:00:52 +02:00
|
|
|
int drag;
|
2013-02-07 02:32:26 +01:00
|
|
|
unsigned long time_ms;
|
|
|
|
} mouse_moved;
|
2013-02-11 02:09:12 +01:00
|
|
|
struct {
|
|
|
|
int x_scroll;
|
|
|
|
int y_scroll;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
unsigned long time_ms;
|
|
|
|
} mouse_scroll;
|
2013-03-11 04:58:26 +01:00
|
|
|
struct {
|
|
|
|
struct macdrv_query *query;
|
|
|
|
} query_event;
|
2013-03-18 04:40:54 +01:00
|
|
|
struct {
|
|
|
|
macdrv_status_item item;
|
2013-09-06 05:23:52 +02:00
|
|
|
int button;
|
|
|
|
int down;
|
2013-03-18 04:40:54 +01:00
|
|
|
int count;
|
2013-09-06 05:23:52 +02:00
|
|
|
} status_item_mouse_button;
|
|
|
|
struct {
|
|
|
|
macdrv_status_item item;
|
|
|
|
} status_item_mouse_move;
|
2013-01-27 23:19:29 +01:00
|
|
|
struct {
|
2013-10-10 21:22:08 +02:00
|
|
|
CGRect frame;
|
|
|
|
int fullscreen;
|
2013-10-31 22:54:53 +01:00
|
|
|
int in_resize;
|
2013-01-27 23:19:29 +01:00
|
|
|
} window_frame_changed;
|
2013-01-27 23:19:48 +01:00
|
|
|
struct {
|
|
|
|
unsigned long serial;
|
|
|
|
void *tried_windows;
|
|
|
|
} window_got_focus;
|
2013-01-27 23:19:29 +01:00
|
|
|
};
|
2013-01-21 07:07:51 +01:00
|
|
|
} macdrv_event;
|
|
|
|
|
2013-03-11 04:58:26 +01:00
|
|
|
enum {
|
2013-03-13 22:53:32 +01:00
|
|
|
QUERY_DRAG_DROP,
|
|
|
|
QUERY_DRAG_EXITED,
|
|
|
|
QUERY_DRAG_OPERATION,
|
2013-05-16 23:48:39 +02:00
|
|
|
QUERY_IME_CHAR_RECT,
|
2013-03-11 04:58:51 +01:00
|
|
|
QUERY_PASTEBOARD_DATA,
|
2013-09-18 20:00:37 +02:00
|
|
|
QUERY_RESIZE_START,
|
2013-10-08 09:21:29 +02:00
|
|
|
QUERY_MIN_MAX_INFO,
|
2013-03-11 04:58:26 +01:00
|
|
|
NUM_QUERY_TYPES
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct macdrv_query {
|
|
|
|
int refs;
|
|
|
|
int type;
|
|
|
|
macdrv_window window;
|
|
|
|
int status;
|
|
|
|
int done;
|
2013-03-11 04:58:51 +01:00
|
|
|
union {
|
2013-03-13 22:53:32 +01:00
|
|
|
struct {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
uint32_t op;
|
|
|
|
CFTypeRef pasteboard;
|
|
|
|
} drag_drop;
|
|
|
|
struct {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
uint32_t offered_ops;
|
|
|
|
uint32_t accepted_op;
|
|
|
|
CFTypeRef pasteboard;
|
|
|
|
} drag_operation;
|
2013-05-16 23:48:39 +02:00
|
|
|
struct {
|
|
|
|
void *data;
|
|
|
|
CFRange range;
|
|
|
|
CGRect rect;
|
|
|
|
} ime_char_rect;
|
2013-03-11 04:58:51 +01:00
|
|
|
struct {
|
|
|
|
CFStringRef type;
|
|
|
|
} pasteboard_data;
|
|
|
|
};
|
2013-03-11 04:58:26 +01:00
|
|
|
} macdrv_query;
|
|
|
|
|
2013-01-21 07:07:51 +01:00
|
|
|
static inline macdrv_event_mask event_mask_for_type(int type)
|
|
|
|
{
|
|
|
|
return ((macdrv_event_mask)1 << type);
|
|
|
|
}
|
|
|
|
|
2013-04-04 01:56:25 +02:00
|
|
|
typedef void (*macdrv_event_handler)(const macdrv_event *event);
|
2013-03-11 04:58:26 +01:00
|
|
|
|
|
|
|
extern macdrv_event_queue macdrv_create_event_queue(macdrv_event_handler handler) DECLSPEC_HIDDEN;
|
2013-01-21 07:07:51 +01:00
|
|
|
extern void macdrv_destroy_event_queue(macdrv_event_queue queue) DECLSPEC_HIDDEN;
|
|
|
|
extern int macdrv_get_event_queue_fd(macdrv_event_queue queue) DECLSPEC_HIDDEN;
|
|
|
|
|
2013-04-04 01:56:35 +02:00
|
|
|
extern int macdrv_copy_event_from_queue(macdrv_event_queue queue,
|
|
|
|
macdrv_event_mask mask, macdrv_event **event) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_release_event(macdrv_event *event) DECLSPEC_HIDDEN;
|
2013-01-21 07:07:51 +01:00
|
|
|
|
2013-03-11 04:58:26 +01:00
|
|
|
extern macdrv_query* macdrv_create_query(void) DECLSPEC_HIDDEN;
|
|
|
|
extern macdrv_query* macdrv_retain_query(macdrv_query *query) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_release_query(macdrv_query *query) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_set_query_done(macdrv_query *query) DECLSPEC_HIDDEN;
|
2013-09-26 00:10:37 +02:00
|
|
|
extern int macdrv_register_hot_key(macdrv_event_queue q, unsigned int vkey, unsigned int mod_flags,
|
|
|
|
unsigned int keycode, unsigned int modifiers) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_unregister_hot_key(macdrv_event_queue q, unsigned int vkey, unsigned int mod_flags) DECLSPEC_HIDDEN;
|
2013-03-11 04:58:26 +01:00
|
|
|
|
2013-01-21 07:07:51 +01:00
|
|
|
|
2013-01-07 21:44:44 +01:00
|
|
|
/* window */
|
|
|
|
struct macdrv_window_features {
|
|
|
|
unsigned int title_bar:1;
|
|
|
|
unsigned int close_button:1;
|
|
|
|
unsigned int minimize_button:1;
|
|
|
|
unsigned int resizable:1;
|
|
|
|
unsigned int utility:1;
|
|
|
|
unsigned int shadow:1;
|
|
|
|
};
|
|
|
|
|
2013-01-11 13:18:05 +01:00
|
|
|
struct macdrv_window_state {
|
|
|
|
unsigned int disabled:1;
|
2013-01-11 13:18:36 +01:00
|
|
|
unsigned int no_activate:1;
|
2013-01-11 13:18:55 +01:00
|
|
|
unsigned int floating:1;
|
2013-01-11 13:20:40 +01:00
|
|
|
unsigned int excluded_by_expose:1;
|
|
|
|
unsigned int excluded_by_cycle:1;
|
2013-02-04 00:20:07 +01:00
|
|
|
unsigned int minimized:1;
|
2013-10-08 09:21:24 +02:00
|
|
|
unsigned int minimized_valid:1;
|
2013-01-11 13:18:05 +01:00
|
|
|
};
|
|
|
|
|
2013-01-07 21:44:44 +01:00
|
|
|
extern macdrv_window macdrv_create_cocoa_window(const struct macdrv_window_features* wf,
|
2013-01-21 07:08:03 +01:00
|
|
|
CGRect frame, void* hwnd, macdrv_event_queue queue) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:44 +01:00
|
|
|
extern void macdrv_destroy_cocoa_window(macdrv_window w) DECLSPEC_HIDDEN;
|
2013-01-21 07:07:58 +01:00
|
|
|
extern void* macdrv_get_window_hwnd(macdrv_window w) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:44 +01:00
|
|
|
extern void macdrv_set_cocoa_window_features(macdrv_window w,
|
|
|
|
const struct macdrv_window_features* wf) DECLSPEC_HIDDEN;
|
2013-01-11 13:18:05 +01:00
|
|
|
extern void macdrv_set_cocoa_window_state(macdrv_window w,
|
|
|
|
const struct macdrv_window_state* state) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:44 +01:00
|
|
|
extern void macdrv_set_cocoa_window_title(macdrv_window w, const UniChar* title,
|
|
|
|
size_t length) DECLSPEC_HIDDEN;
|
2013-11-15 03:52:04 +01:00
|
|
|
extern void macdrv_order_cocoa_window(macdrv_window w, macdrv_window prev,
|
2013-06-20 02:09:18 +02:00
|
|
|
macdrv_window next, int activate) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:44 +01:00
|
|
|
extern void macdrv_hide_cocoa_window(macdrv_window w) DECLSPEC_HIDDEN;
|
2013-11-15 03:52:04 +01:00
|
|
|
extern void macdrv_set_cocoa_window_frame(macdrv_window w, const CGRect* new_frame) DECLSPEC_HIDDEN;
|
2013-01-27 23:19:29 +01:00
|
|
|
extern void macdrv_get_cocoa_window_frame(macdrv_window w, CGRect* out_frame) DECLSPEC_HIDDEN;
|
2013-01-11 13:19:36 +01:00
|
|
|
extern void macdrv_set_cocoa_parent_window(macdrv_window w, macdrv_window parent) DECLSPEC_HIDDEN;
|
2013-01-15 03:23:55 +01:00
|
|
|
extern void macdrv_set_window_surface(macdrv_window w, void *surface, pthread_mutex_t *mutex) DECLSPEC_HIDDEN;
|
|
|
|
extern CGImageRef create_surface_image(void *window_surface, CGRect *rect, int copy_data) DECLSPEC_HIDDEN;
|
2013-03-29 05:34:06 +01:00
|
|
|
extern int get_surface_blit_rects(void *window_surface, const CGRect **rects, int *count) DECLSPEC_HIDDEN;
|
2013-01-15 03:23:55 +01:00
|
|
|
extern void macdrv_window_needs_display(macdrv_window w, CGRect rect) DECLSPEC_HIDDEN;
|
2013-01-15 03:23:58 +01:00
|
|
|
extern void macdrv_set_window_shape(macdrv_window w, const CGRect *rects, int count) DECLSPEC_HIDDEN;
|
2013-01-15 03:24:02 +01:00
|
|
|
extern void macdrv_set_window_alpha(macdrv_window w, CGFloat alpha) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_set_window_color_key(macdrv_window w, CGFloat keyRed, CGFloat keyGreen,
|
|
|
|
CGFloat keyBlue) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_clear_window_color_key(macdrv_window w) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_window_use_per_pixel_alpha(macdrv_window w, int use_per_pixel_alpha) DECLSPEC_HIDDEN;
|
2013-04-24 23:10:10 +02:00
|
|
|
extern void macdrv_give_cocoa_window_focus(macdrv_window w, int activate) DECLSPEC_HIDDEN;
|
2013-09-18 20:00:37 +02:00
|
|
|
extern void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize max_size) DECLSPEC_HIDDEN;
|
2013-03-06 11:59:07 +01:00
|
|
|
extern macdrv_view macdrv_create_view(macdrv_window w, CGRect rect) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_dispose_view(macdrv_view v) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_set_view_window_and_frame(macdrv_view v, macdrv_window w, CGRect rect) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_add_view_opengl_context(macdrv_view v, macdrv_opengl_context c) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_remove_view_opengl_context(macdrv_view v, macdrv_opengl_context c) DECLSPEC_HIDDEN;
|
2013-04-04 21:26:08 +02:00
|
|
|
extern uint32_t macdrv_window_background_color(void) DECLSPEC_HIDDEN;
|
2013-04-22 04:32:26 +02:00
|
|
|
extern int macdrv_send_text_input_event(int pressed, unsigned int flags, int repeat, int keyc,
|
|
|
|
void* data) DECLSPEC_HIDDEN;
|
2013-01-07 21:44:44 +01:00
|
|
|
|
2013-02-04 00:20:11 +01:00
|
|
|
|
|
|
|
/* keyboard */
|
2013-11-20 16:30:36 +01:00
|
|
|
extern void macdrv_get_input_source_info(CFDataRef* uchr,CGEventSourceKeyboardType* keyboard_type, int* is_iso,
|
|
|
|
TISInputSourceRef* input_source) DECLSPEC_HIDDEN;
|
2013-11-20 16:30:34 +01:00
|
|
|
extern CFArrayRef macdrv_create_input_source_list(void) DECLSPEC_HIDDEN;
|
2013-11-20 16:30:38 +01:00
|
|
|
extern int macdrv_select_input_source(TISInputSourceRef input_source) DECLSPEC_HIDDEN;
|
2013-11-20 16:30:34 +01:00
|
|
|
extern const CFStringRef macdrv_input_source_input_key DECLSPEC_HIDDEN;
|
|
|
|
extern const CFStringRef macdrv_input_source_type_key DECLSPEC_HIDDEN;
|
|
|
|
extern const CFStringRef macdrv_input_source_lang_key DECLSPEC_HIDDEN;
|
2013-11-20 16:30:35 +01:00
|
|
|
extern int macdrv_layout_list_needs_update DECLSPEC_HIDDEN;
|
2013-02-04 00:20:11 +01:00
|
|
|
|
2013-03-06 11:59:07 +01:00
|
|
|
|
2013-03-11 04:58:03 +01:00
|
|
|
/* clipboard */
|
2013-03-13 22:53:04 +01:00
|
|
|
extern CFArrayRef macdrv_copy_pasteboard_types(CFTypeRef pasteboard) DECLSPEC_HIDDEN;
|
|
|
|
extern CFDataRef macdrv_copy_pasteboard_data(CFTypeRef pasteboard, CFStringRef type) DECLSPEC_HIDDEN;
|
2013-03-11 04:58:21 +01:00
|
|
|
extern int macdrv_is_pasteboard_owner(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_clear_pasteboard(void) DECLSPEC_HIDDEN;
|
2013-03-11 04:58:51 +01:00
|
|
|
extern int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w) DECLSPEC_HIDDEN;
|
2013-03-11 04:58:03 +01:00
|
|
|
|
|
|
|
|
2013-03-06 11:59:07 +01:00
|
|
|
/* opengl */
|
|
|
|
extern macdrv_opengl_context macdrv_create_opengl_context(void* cglctx) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_dispose_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_update_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_flush_opengl_context(macdrv_opengl_context c) DECLSPEC_HIDDEN;
|
|
|
|
|
2013-03-18 04:40:54 +01:00
|
|
|
|
|
|
|
/* systray / status item */
|
|
|
|
extern macdrv_status_item macdrv_create_status_item(macdrv_event_queue q) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_destroy_status_item(macdrv_status_item s) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_set_status_item_image(macdrv_status_item s, CGImageRef cgimage) DECLSPEC_HIDDEN;
|
|
|
|
extern void macdrv_set_status_item_tooltip(macdrv_status_item s, CFStringRef cftip) DECLSPEC_HIDDEN;
|
|
|
|
|
2012-12-21 02:02:28 +01:00
|
|
|
#endif /* __WINE_MACDRV_COCOA_H */
|