2018-03-20 10:46:11 +00:00
|
|
|
/* gdksurface-quartz.c
|
2005-11-22 10:03:32 +00:00
|
|
|
*
|
2007-06-01 21:03:34 +00:00
|
|
|
* Copyright (C) 2005-2007 Imendio AB
|
2005-11-22 10:03:32 +00: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 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
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2005-11-22 10:03:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_PRIVATE_QUARTZ_H__
|
|
|
|
#define __GDK_PRIVATE_QUARTZ_H__
|
|
|
|
|
|
|
|
#define GDK_QUARTZ_ALLOC_POOL NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]
|
|
|
|
#define GDK_QUARTZ_RELEASE_POOL [pool release]
|
|
|
|
|
2010-06-27 08:32:12 +00:00
|
|
|
#include <gdk/quartz/gdkquartz.h>
|
2010-12-23 11:59:26 +00:00
|
|
|
#include <gdk/quartz/gdkdevicemanager-core-quartz.h>
|
|
|
|
#include <gdk/quartz/gdkdnd-quartz.h>
|
|
|
|
#include <gdk/quartz/gdkscreen-quartz.h>
|
2018-03-20 10:46:11 +00:00
|
|
|
#include <gdk/quartz/gdksurface-quartz.h>
|
2005-11-22 10:03:32 +00:00
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
|
|
|
|
#include "gdkinternals.h"
|
|
|
|
|
2008-06-22 14:28:52 +00:00
|
|
|
#include "config.h"
|
2006-07-24 10:46:21 +00:00
|
|
|
|
2005-11-22 10:03:32 +00:00
|
|
|
extern GdkDisplay *_gdk_display;
|
2017-11-17 18:43:53 +00:00
|
|
|
extern GdkQuartzScreen *_gdk_screen;
|
2018-03-20 10:40:08 +00:00
|
|
|
extern GdkSurface *_gdk_root;
|
2017-11-24 17:03:36 +00:00
|
|
|
extern GdkDeviceManager *_gdk_device_manager;
|
2005-11-22 10:03:32 +00:00
|
|
|
|
2006-03-21 08:02:17 +00:00
|
|
|
extern GdkDragContext *_gdk_quartz_drag_source_context;
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
#define GDK_SURFACE_IS_QUARTZ(win) (GDK_IS_SURFACE_IMPL_QUARTZ (((GdkSurface *)win)->impl))
|
2009-01-07 13:08:02 +00:00
|
|
|
|
2005-11-22 10:03:32 +00:00
|
|
|
/* Initialization */
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_quartz_surface_init_windowing (GdkDisplay *display);
|
2010-12-17 16:38:02 +00:00
|
|
|
void _gdk_quartz_events_init (void);
|
2009-10-26 07:53:20 +00:00
|
|
|
void _gdk_quartz_event_loop_init (void);
|
2005-11-22 10:03:32 +00:00
|
|
|
|
2010-12-23 11:59:26 +00:00
|
|
|
/* Cursor */
|
|
|
|
NSCursor *_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor);
|
|
|
|
|
2007-04-06 21:12:48 +00:00
|
|
|
/* Events */
|
2008-02-24 17:45:29 +00:00
|
|
|
typedef enum {
|
2009-02-03 15:01:31 +00:00
|
|
|
GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP
|
2008-02-24 17:45:29 +00:00
|
|
|
} GdkQuartzEventSubType;
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_quartz_events_update_focus_window (GdkSurface *new_window,
|
2007-07-13 19:09:10 +00:00
|
|
|
gboolean got_focus);
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_quartz_events_send_map_event (GdkSurface *window);
|
2006-08-15 20:13:13 +00:00
|
|
|
|
2011-07-25 20:26:52 +00:00
|
|
|
GdkModifierType _gdk_quartz_events_get_current_keyboard_modifiers (void);
|
|
|
|
GdkModifierType _gdk_quartz_events_get_current_mouse_modifiers (void);
|
|
|
|
|
2012-02-19 15:02:09 +00:00
|
|
|
void _gdk_quartz_events_break_all_grabs (guint32 time);
|
2010-01-03 14:27:53 +00:00
|
|
|
|
2007-04-06 21:12:48 +00:00
|
|
|
/* Event loop */
|
2007-12-10 19:00:23 +00:00
|
|
|
gboolean _gdk_quartz_event_loop_check_pending (void);
|
|
|
|
NSEvent * _gdk_quartz_event_loop_get_pending (void);
|
|
|
|
void _gdk_quartz_event_loop_release_event (NSEvent *event);
|
2007-04-06 21:12:48 +00:00
|
|
|
|
|
|
|
/* Keys */
|
|
|
|
GdkEventType _gdk_quartz_keys_event_type (NSEvent *event);
|
|
|
|
gboolean _gdk_quartz_keys_is_modifier (guint keycode);
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_quartz_synthesize_null_key_event (GdkSurface *window);
|
2007-04-06 21:12:48 +00:00
|
|
|
|
2010-12-23 13:08:40 +00:00
|
|
|
/* Drag and Drop */
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkDragContext * _gdk_quartz_surface_drag_begin (GdkSurface *window,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
GList *targets,
|
|
|
|
gint x_root,
|
|
|
|
gint y_root);
|
2010-12-17 15:52:14 +00:00
|
|
|
|
2010-12-23 13:08:40 +00:00
|
|
|
/* Display */
|
2010-12-22 02:12:04 +00:00
|
|
|
|
2010-12-23 13:08:40 +00:00
|
|
|
GdkDisplay * _gdk_quartz_display_open (const gchar *name);
|
|
|
|
|
2010-12-17 15:52:14 +00:00
|
|
|
|
2010-12-23 13:08:40 +00:00
|
|
|
/* Screen */
|
2017-11-17 18:43:53 +00:00
|
|
|
GdkQuartzScreen *_gdk_quartz_screen_new (void);
|
|
|
|
void _gdk_quartz_screen_update_window_sizes (GdkQuartzScreen *screen);
|
2010-12-23 13:08:40 +00:00
|
|
|
|
|
|
|
/* Screen methods - events */
|
2017-11-17 18:29:14 +00:00
|
|
|
gboolean _gdk_quartz_get_setting (const gchar *name,
|
|
|
|
GValue *value);
|
2010-12-17 14:50:21 +00:00
|
|
|
|
2010-12-22 13:45:25 +00:00
|
|
|
|
2010-12-23 13:08:40 +00:00
|
|
|
/* Window */
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean _gdk_quartz_surface_is_ancestor (GdkSurface *ancestor,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface *window);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_gdk_xy_to_xy (gint gdk_x,
|
2010-12-23 13:08:40 +00:00
|
|
|
gint gdk_y,
|
|
|
|
gint *ns_x,
|
|
|
|
gint *ns_y);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_xy_to_gdk_xy (gint ns_x,
|
2010-12-23 13:08:40 +00:00
|
|
|
gint ns_y,
|
|
|
|
gint *gdk_x,
|
|
|
|
gint *gdk_y);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_nspoint_to_gdk_xy (NSPoint point,
|
2010-12-23 13:08:40 +00:00
|
|
|
gint *x,
|
|
|
|
gint *y);
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkSurface *_gdk_quartz_surface_find_child (GdkSurface *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
2010-12-23 13:08:40 +00:00
|
|
|
gboolean get_toplevel);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_attach_to_parent (GdkSurface *window);
|
|
|
|
void _gdk_quartz_surface_detach_from_parent (GdkSurface *window);
|
|
|
|
void _gdk_quartz_surface_did_become_main (GdkSurface *window);
|
|
|
|
void _gdk_quartz_surface_did_resign_main (GdkSurface *window);
|
|
|
|
void _gdk_quartz_surface_debug_highlight (GdkSurface *window,
|
2010-12-23 13:08:40 +00:00
|
|
|
gint number);
|
2010-12-17 17:51:38 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_quartz_surface_update_position (GdkSurface *window);
|
|
|
|
void _gdk_quartz_surface_update_fullscreen_state (GdkSurface *window);
|
2010-12-23 13:08:40 +00:00
|
|
|
|
|
|
|
/* Window methods - property */
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean _gdk_quartz_surface_get_property (GdkSurface *window,
|
2010-12-22 02:29:50 +00:00
|
|
|
GdkAtom property,
|
|
|
|
GdkAtom type,
|
|
|
|
gulong offset,
|
|
|
|
gulong length,
|
|
|
|
gint pdelete,
|
|
|
|
GdkAtom *actual_property_type,
|
|
|
|
gint *actual_format_type,
|
|
|
|
gint *actual_length,
|
|
|
|
guchar **data);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_change_property (GdkSurface *window,
|
2010-12-22 02:29:50 +00:00
|
|
|
GdkAtom property,
|
|
|
|
GdkAtom type,
|
|
|
|
gint format,
|
|
|
|
GdkPropMode mode,
|
|
|
|
const guchar *data,
|
|
|
|
gint nelements);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_quartz_surface_delete_property (GdkSurface *window,
|
2010-12-22 02:29:50 +00:00
|
|
|
GdkAtom property);
|
|
|
|
|
2010-12-22 02:13:02 +00:00
|
|
|
|
2005-11-22 10:03:32 +00:00
|
|
|
#endif /* __GDK_PRIVATE_QUARTZ_H__ */
|