| 1 |
/* |
| 2 |
* gdkdisplay-quartz.h |
| 3 |
* |
| 4 |
* Copyright 2017 Tom Schoonjans |
| 5 |
* |
| 6 |
* This library is free software; you can redistribute it and/or |
| 7 |
* modify it under the terms of the GNU Library General Public |
| 8 |
* License as published by the Free Software Foundation; either |
| 9 |
* version 2 of the License, or (at your option) any later version. |
| 10 |
* |
| 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 |
* Library General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Library General Public |
| 17 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef __GDK_QUARTZ_DISPLAY__ |
| 21 |
#define __GDK_QUARTZ_DISPLAY__ |
| 22 |
|
| 23 |
#include <AppKit/AppKit.h> |
| 24 |
|
| 25 |
#include "gdkdisplayprivate.h" |
| 26 |
#include "gdkkeys.h" |
| 27 |
#include "gdkwindow.h" |
| 28 |
#include "gdkinternals.h" |
| 29 |
#include "gdkmain.h" |
| 30 |
|
| 31 |
G_BEGIN_DECLS |
| 32 |
|
| 33 |
|
| 34 |
struct _GdkQuartzDisplay |
| 35 |
{ |
| 36 |
GdkDisplay parent_instance; |
| 37 |
NSRect geometry; /* In AppKit coordinates. */ |
| 38 |
NSSize size; /* Aggregate size of displays in millimeters. */ |
| 39 |
GPtrArray *monitors; |
| 40 |
/* This structure is not allocated. It points to an embedded |
| 41 |
* GList in the GdkWindow. */ |
| 42 |
GSList *windows_awaiting_frame; |
| 43 |
GSource *frame_source; |
| 44 |
}; |
| 45 |
|
| 46 |
struct _GdkQuartzDisplayClass |
| 47 |
{ |
| 48 |
GdkDisplayClass parent_class; |
| 49 |
}; |
| 50 |
|
| 51 |
/* Display methods - events */ |
| 52 |
void _gdk_quartz_display_queue_events (GdkDisplay *display); |
| 53 |
gboolean _gdk_quartz_display_has_pending (GdkDisplay *display); |
| 54 |
|
| 55 |
void _gdk_quartz_display_event_data_copy (GdkDisplay *display, |
| 56 |
const GdkEvent *src, |
| 57 |
GdkEvent *dst); |
| 58 |
void _gdk_quartz_display_event_data_free (GdkDisplay *display, |
| 59 |
GdkEvent *event); |
| 60 |
|
| 61 |
/* Display methods - cursor */ |
| 62 |
GdkCursor *_gdk_quartz_display_get_cursor_for_type (GdkDisplay *display, |
| 63 |
GdkCursorType type); |
| 64 |
GdkCursor *_gdk_quartz_display_get_cursor_for_name (GdkDisplay *display, |
| 65 |
const gchar *name); |
| 66 |
GdkCursor *_gdk_quartz_display_get_cursor_for_surface (GdkDisplay *display, |
| 67 |
cairo_surface_t *surface, |
| 68 |
gdouble x, |
| 69 |
gdouble y); |
| 70 |
gboolean _gdk_quartz_display_supports_cursor_alpha (GdkDisplay *display); |
| 71 |
gboolean _gdk_quartz_display_supports_cursor_color (GdkDisplay *display); |
| 72 |
void _gdk_quartz_display_get_default_cursor_size (GdkDisplay *display, |
| 73 |
guint *width, |
| 74 |
guint *height); |
| 75 |
void _gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display, |
| 76 |
guint *width, |
| 77 |
guint *height); |
| 78 |
|
| 79 |
/* Display methods - window */ |
| 80 |
void _gdk_quartz_display_before_process_all_updates (GdkDisplay *display); |
| 81 |
void _gdk_quartz_display_after_process_all_updates (GdkDisplay *display); |
| 82 |
void _gdk_quartz_display_create_window_impl (GdkDisplay *display, |
| 83 |
GdkWindow *window, |
| 84 |
GdkWindow *real_parent, |
| 85 |
GdkScreen *screen, |
| 86 |
GdkEventMask event_mask, |
| 87 |
GdkWindowAttr *attributes, |
| 88 |
gint attributes_mask); |
| 89 |
|
| 90 |
/* Display methods - keymap */ |
| 91 |
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display); |
| 92 |
|
| 93 |
/* Display methods - selection */ |
| 94 |
gboolean _gdk_quartz_display_set_selection_owner (GdkDisplay *display, |
| 95 |
GdkWindow *owner, |
| 96 |
GdkAtom selection, |
| 97 |
guint32 time, |
| 98 |
gboolean send_event); |
| 99 |
GdkWindow * _gdk_quartz_display_get_selection_owner (GdkDisplay *display, |
| 100 |
GdkAtom selection); |
| 101 |
gint _gdk_quartz_display_get_selection_property (GdkDisplay *display, |
| 102 |
GdkWindow *requestor, |
| 103 |
guchar **data, |
| 104 |
GdkAtom *ret_type, |
| 105 |
gint *ret_format); |
| 106 |
void _gdk_quartz_display_convert_selection (GdkDisplay *display, |
| 107 |
GdkWindow *requestor, |
| 108 |
GdkAtom selection, |
| 109 |
GdkAtom target, |
| 110 |
guint32 time); |
| 111 |
gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display, |
| 112 |
GdkAtom encoding, |
| 113 |
gint format, |
| 114 |
const guchar *text, |
| 115 |
gint length, |
| 116 |
gchar ***list); |
| 117 |
gchar * _gdk_quartz_display_utf8_to_string_target (GdkDisplay *displayt, |
| 118 |
const gchar *str); |
| 119 |
G_END_DECLS |
| 120 |
|
| 121 |
#endif /* __GDK_QUARTZ_DISPLAY__ */ |