forked from AuroraMiddleware/gtk
Merge branch 'cocoa-access-header' into 'gtk-3-24'
Add a public header for Cocoa access functions. See merge request GNOME/gtk!3450
This commit is contained in:
commit
610f52b125
@ -60,6 +60,7 @@ libgdkinclude_HEADERS = \
|
||||
gdkquartz.h
|
||||
|
||||
libgdkquartzinclude_HEADERS = \
|
||||
gdkquartz-cocoa-access.h \
|
||||
gdkquartz-gtk-only.h \
|
||||
gdkquartzcursor.h \
|
||||
gdkquartzdevice-core.h \
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "gdkquartzglcontext.h"
|
||||
#include "gdkquartzwindow.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkquartz-gtk-only.h"
|
||||
#include "gdkquartz-cocoa-access.h"
|
||||
|
||||
#include "gdkinternals.h"
|
||||
|
||||
|
@ -79,10 +79,14 @@ typedef enum {
|
||||
#define GDK_QUARTZ_EVENT_TABLET_PROXIMITY NSEventTypeTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY NSEventSubtypeTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT NSEventSubtypeTabletPoint
|
||||
#else
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 10120
|
||||
#define GDK_QUARTZ_EVENT_TABLET_PROXIMITY NSTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY NSTabletProximityEventSubtype
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT NSTabletPointEventSubtype
|
||||
#else
|
||||
#define GDK_QUARTZ_EVENT_TABLET_PROXIMITY kEventTabletProximity
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_PROXIMITY NSTabletProximityEventSubtype
|
||||
#define GDK_QUARTZ_EVENT_SUBTYPE_TABLET_POINT kCGEventMouseSubtypeTabletPoint
|
||||
#endif
|
||||
|
||||
void _gdk_quartz_events_update_focus_window (GdkWindow *new_window,
|
||||
|
37
gdk/quartz/gdkquartz-cocoa-access.h
Normal file
37
gdk/quartz/gdkquartz-cocoa-access.h
Normal file
@ -0,0 +1,37 @@
|
||||
/* gdkquartz-gtk-only.h
|
||||
*
|
||||
* Copyright (C) 2005-2007 Imendio AB
|
||||
*
|
||||
* 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
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_COCOA_ACCESS_H__
|
||||
#define __GDK_QUARTZ_COCOA_ACCESS_H__
|
||||
|
||||
#ifndef __OBJC__
|
||||
#error "This header declares Cocoa types and can be included only from source files compiled with Objective-C."
|
||||
#endif
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/quartz/gdkquartz.h>
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
|
||||
|
||||
#endif
|
@ -38,13 +38,5 @@ NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom
|
||||
/* Utilities */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
|
||||
|
||||
/* Window */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
|
||||
|
||||
#endif
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <gdkinternals.h>
|
||||
|
||||
#include "gdkquartz-gtk-only.h"
|
||||
#include "gdkquartz-cocoa-access.h"
|
||||
#include <gdkquartzutils.h>
|
||||
|
||||
NSImage *
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "gdkquartzglcontext.h"
|
||||
#include "gdkquartzscreen.h"
|
||||
#include "gdkquartzcursor.h"
|
||||
#include "gdkquartz-gtk-only.h"
|
||||
#include "gdkquartz-cocoa-access.h"
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
|
@ -26,6 +26,7 @@ gdk_quartz_sources = files(
|
||||
)
|
||||
|
||||
gdk_quartz_public_headers = files(
|
||||
'gdkquartz-cocoa-access.h',
|
||||
'gdkquartzcursor.h',
|
||||
'gdkquartzdevice-core.h',
|
||||
'gdkquartzdevicemanager-core.h',
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "gtkintl.h"
|
||||
#include "gtkquartz.h"
|
||||
#include "gdk/quartz/gdkquartz.h"
|
||||
#include "gdk/quartz/gdkquartz-cocoa-access.h"
|
||||
#include "gdk/quartz/gdkquartz-gtk-only.h"
|
||||
#include "gdk/quartz/gdkquartzdnd.h"
|
||||
#include "gtkselectionprivate.h"
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "gtklabel.h"
|
||||
#include "gtkfilechooserentry.h"
|
||||
#include "gtkfilefilterprivate.h"
|
||||
#include <quartz/gdkquartz-gtk-only.h>
|
||||
#include <quartz/gdkquartz-cocoa-access.h>
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
|
||||
typedef struct {
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define GTK_COMPILATION 1 // For gdkquartz-gtk-only.h
|
||||
|
||||
#include "gdk/quartz/gdkinternal-quartz.h"
|
||||
#include "gdk/quartz/gdkquartz-gtk-only.h"
|
||||
#include "gdk/quartz/gdkquartz-cocoa-access.h"
|
||||
#include "gdk/quartz/GdkQuartzView.h"
|
||||
|
||||
#define GTK_IM_CONTEXT_TYPE_QUARTZ (type_quartz)
|
||||
|
Loading…
Reference in New Issue
Block a user