| 1 |
/* GdkQuartzView.h |
| 2 |
* |
| 3 |
* Copyright (C) 2005 Imendio AB |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#import <AppKit/AppKit.h> |
| 20 |
#import <CoreVideo/CoreVideo.h> |
| 21 |
#include "gdk/gdk.h" |
| 22 |
|
| 23 |
/* Text Input Client */ |
| 24 |
#define TIC_MARKED_TEXT "tic-marked-text" |
| 25 |
#define TIC_SELECTED_POS "tic-selected-pos" |
| 26 |
#define TIC_SELECTED_LEN "tic-selected-len" |
| 27 |
#define TIC_INSERT_TEXT "tic-insert-text" |
| 28 |
#define TIC_INSERT_TEXT_REPLACE_LEN "tic-insert-text-replace-len" |
| 29 |
#define TIC_IN_KEY_DOWN "tic-in-key-down" |
| 30 |
|
| 31 |
/* GtkIMContext */ |
| 32 |
#define GIC_CURSOR_RECT "gic-cursor-rect" |
| 33 |
#define GIC_FILTER_KEY "gic-filter-key" |
| 34 |
#define GIC_FILTER_PASSTHRU 0 |
| 35 |
#define GIC_FILTER_FILTERED 1 |
| 36 |
|
| 37 |
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400 |
| 38 |
@interface GdkQuartzView : NSView <NSTextInputClient> |
| 39 |
#else |
| 40 |
@interface GdkQuartzView : NSView <NSTextInputClient, NSViewLayerContentScaleDelegate> |
| 41 |
#endif |
| 42 |
{ |
| 43 |
GdkWindow *gdk_window; |
| 44 |
NSTrackingRectTag trackingRect; |
| 45 |
BOOL needsInvalidateShadow; |
| 46 |
NSRange markedRange; |
| 47 |
NSRange selectedRange; |
| 48 |
CVPixelBufferRef pixels; |
| 49 |
NSDictionary *pb_props; |
| 50 |
CFDictionaryRef cfpb_props; |
| 51 |
} |
| 52 |
|
| 53 |
- (void)setGdkWindow: (GdkWindow *)window; |
| 54 |
- (GdkWindow *)gdkWindow; |
| 55 |
- (NSTrackingRectTag)trackingRect; |
| 56 |
- (void)setNeedsInvalidateShadow: (BOOL)invalidate; |
| 57 |
- (void)createBackingStoreWithWidth: (CGFloat) width andHeight: (CGFloat) height; |
| 58 |
|
| 59 |
@end |