2020-04-23 23:36:46 +00:00
|
|
|
/* GdkMacosBaseView.c
|
|
|
|
*
|
|
|
|
* Copyright 2005-2007 Imendio AB
|
|
|
|
* Copyright 2011 Hiroyuki Yamamoto
|
|
|
|
* Copyright 2020 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#import "GdkMacosBaseView.h"
|
|
|
|
#import "GdkMacosWindow.h"
|
|
|
|
|
|
|
|
#include "gdkmacosdisplay-private.h"
|
|
|
|
#include "gdkmacossurface-private.h"
|
|
|
|
|
2022-09-24 03:11:41 +00:00
|
|
|
#include "gdkdebugprivate.h"
|
2021-09-24 19:04:47 +00:00
|
|
|
|
2020-04-23 23:36:46 +00:00
|
|
|
@implementation GdkMacosBaseView
|
|
|
|
|
|
|
|
-(id)initWithFrame:(NSRect)frameRect
|
|
|
|
{
|
|
|
|
if ((self = [super initWithFrame: frameRect]))
|
|
|
|
{
|
|
|
|
NSRect rect = NSMakeRect (0, 0, 0, 0);
|
|
|
|
NSTrackingAreaOptions options;
|
|
|
|
|
|
|
|
markedRange = NSMakeRange (NSNotFound, 0);
|
|
|
|
selectedRange = NSMakeRange (0, 0);
|
|
|
|
[self setValue: @(YES) forKey: @"postsFrameChangedNotifications"];
|
|
|
|
|
|
|
|
options = (NSTrackingMouseEnteredAndExited |
|
|
|
|
NSTrackingMouseMoved |
|
|
|
|
NSTrackingActiveAlways);
|
|
|
|
trackingArea = [[NSTrackingArea alloc] initWithRect:rect
|
|
|
|
options:options
|
|
|
|
owner:(id)self
|
|
|
|
userInfo:nil];
|
|
|
|
[self addTrackingArea:trackingArea];
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2022-02-05 01:24:13 +00:00
|
|
|
-(void)setInputArea:(const cairo_rectangle_int_t *)area
|
|
|
|
{
|
|
|
|
NSRect rect = NSMakeRect (area->x, area->y, area->width, area->height);
|
|
|
|
NSTrackingAreaOptions options;
|
|
|
|
|
|
|
|
[self removeTrackingArea:trackingArea];
|
|
|
|
|
|
|
|
options = (NSTrackingMouseEnteredAndExited |
|
|
|
|
NSTrackingMouseMoved |
|
|
|
|
NSTrackingActiveAlways);
|
|
|
|
trackingArea = [[NSTrackingArea alloc] initWithRect:rect
|
|
|
|
options:options
|
|
|
|
owner:(id)self
|
|
|
|
userInfo:nil];
|
|
|
|
[self addTrackingArea:trackingArea];
|
|
|
|
}
|
|
|
|
|
2020-04-23 23:36:46 +00:00
|
|
|
-(void)setOpaqueRegion:(cairo_region_t *)region
|
|
|
|
{
|
2022-02-05 01:24:13 +00:00
|
|
|
/* Handled in Subclass */
|
2020-04-23 23:36:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)acceptsFirstMouse
|
|
|
|
{
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)mouseDownCanMoveWindow
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)acceptsFirstResponder
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "acceptsFirstResponder");
|
2020-04-23 23:36:46 +00:00
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)becomeFirstResponder
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "becomeFirstResponder");
|
2020-04-23 23:36:46 +00:00
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)resignFirstResponder
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "resignFirstResponder");
|
2020-04-23 23:36:46 +00:00
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)setNeedsInvalidateShadow: (BOOL)invalidate
|
|
|
|
{
|
|
|
|
needsInvalidateShadow = invalidate;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSTrackingArea *)trackingArea
|
|
|
|
{
|
|
|
|
return trackingArea;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(GdkMacosSurface *)gdkSurface
|
|
|
|
{
|
|
|
|
return [(GdkMacosWindow *)[self window] gdkSurface];
|
|
|
|
}
|
|
|
|
|
|
|
|
-(GdkMacosDisplay *)gdkDisplay
|
|
|
|
{
|
|
|
|
GdkMacosSurface *surface = [self gdkSurface];
|
|
|
|
GdkDisplay *display = gdk_surface_get_display (GDK_SURFACE (surface));
|
|
|
|
|
|
|
|
return GDK_MACOS_DISPLAY (display);
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)keyDown:(NSEvent *)theEvent
|
|
|
|
{
|
|
|
|
/* NOTE: When user press Cmd+A, interpretKeyEvents: will call noop:
|
|
|
|
* method. When user press and hold A to show the accented char window,
|
|
|
|
* it consumed repeating key down events for key 'A' do NOT call
|
|
|
|
* any other method. We use this behavior to determine if this key
|
|
|
|
* down event is filtered by interpretKeyEvents.
|
|
|
|
*/
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
|
|
|
|
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "keyDown");
|
2020-04-23 23:36:46 +00:00
|
|
|
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)flagsChanged: (NSEvent *)theEvent
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSUInteger)characterIndexForPoint:(NSPoint)aPoint
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "characterIndexForPoint");
|
2020-04-23 23:36:46 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange: (NSRangePointer)actualRange
|
|
|
|
{
|
|
|
|
GdkRectangle *rect;
|
|
|
|
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "firstRectForCharacterRange");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
if ((rect = g_object_get_data (G_OBJECT ([self gdkSurface]), GIC_CURSOR_RECT)))
|
|
|
|
{
|
|
|
|
GdkMacosDisplay *display = [self gdkDisplay];
|
|
|
|
int ns_x, ns_y;
|
|
|
|
|
|
|
|
_gdk_macos_display_to_display_coords (display,
|
|
|
|
rect->x, rect->y + rect->height,
|
|
|
|
&ns_x, &ns_y);
|
|
|
|
|
|
|
|
return NSMakeRect (ns_x, ns_y, rect->width, rect->height);
|
|
|
|
}
|
|
|
|
|
|
|
|
return NSMakeRect (0, 0, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSArray *)validAttributesForMarkedText
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "validAttributesForMarkedText");
|
2020-04-23 23:36:46 +00:00
|
|
|
return [NSArray arrayWithObjects: NSUnderlineStyleAttributeName, nil];
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSAttributedString *)attributedSubstringForProposedRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "attributedSubstringForProposedRange");
|
2020-04-23 23:36:46 +00:00
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(BOOL)hasMarkedText
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "hasMarkedText");
|
2020-04-23 23:36:46 +00:00
|
|
|
return markedRange.location != NSNotFound && markedRange.length != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSRange)markedRange
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "markedRange");
|
2020-04-23 23:36:46 +00:00
|
|
|
return markedRange;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(NSRange)selectedRange
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "selectedRange");
|
2020-04-23 23:36:46 +00:00
|
|
|
return selectedRange;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)unmarkText
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "unmarkText");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
selectedRange = NSMakeRange (0, 0);
|
|
|
|
markedRange = NSMakeRange (NSNotFound, 0);
|
|
|
|
|
|
|
|
g_object_set_data_full (G_OBJECT ([self gdkSurface]), TIC_MARKED_TEXT, NULL, g_free);
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)setMarkedText:(id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
|
|
|
|
{
|
|
|
|
const char *str;
|
|
|
|
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "setMarkedText");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
if (replacementRange.location == NSNotFound)
|
|
|
|
{
|
|
|
|
markedRange = NSMakeRange (newSelection.location, [aString length]);
|
|
|
|
selectedRange = NSMakeRange (newSelection.location, newSelection.length);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
markedRange = NSMakeRange (replacementRange.location, [aString length]);
|
|
|
|
selectedRange = NSMakeRange (replacementRange.location + newSelection.location, newSelection.length);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ([aString isKindOfClass: [NSAttributedString class]])
|
|
|
|
str = [[aString string] UTF8String];
|
|
|
|
else
|
|
|
|
str = [aString UTF8String];
|
|
|
|
|
|
|
|
g_object_set_data_full (G_OBJECT ([self gdkSurface]), TIC_MARKED_TEXT, g_strdup (str), g_free);
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
TIC_SELECTED_POS,
|
|
|
|
GUINT_TO_POINTER (selectedRange.location));
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
TIC_SELECTED_LEN,
|
|
|
|
GUINT_TO_POINTER (selectedRange.length));
|
|
|
|
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "setMarkedText: set %s (%p, nsview %p): %s",
|
|
|
|
TIC_MARKED_TEXT, [self gdkSurface], self,
|
|
|
|
str ? str : "(empty)");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
/* handle text input changes by mouse events */
|
|
|
|
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT ([self gdkSurface]), TIC_IN_KEY_DOWN)))
|
|
|
|
_gdk_macos_surface_synthesize_null_key ([self gdkSurface]);
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)doCommandBySelector:(SEL)aSelector
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "doCommandBySelector");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
if ([self respondsToSelector: aSelector])
|
|
|
|
[self performSelector: aSelector];
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)insertText:(id)aString replacementRange: (NSRange)replacementRange
|
|
|
|
{
|
|
|
|
const char *str;
|
|
|
|
NSString *string;
|
|
|
|
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "insertText");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
if ([self hasMarkedText])
|
|
|
|
[self unmarkText];
|
|
|
|
|
|
|
|
if ([aString isKindOfClass: [NSAttributedString class]])
|
|
|
|
string = [aString string];
|
|
|
|
else
|
|
|
|
string = aString;
|
|
|
|
|
|
|
|
NSCharacterSet *ctrlChars = [NSCharacterSet controlCharacterSet];
|
|
|
|
NSCharacterSet *wsnlChars = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
|
|
|
if ([string rangeOfCharacterFromSet:ctrlChars].length &&
|
|
|
|
[string rangeOfCharacterFromSet:wsnlChars].length == 0)
|
|
|
|
{
|
|
|
|
/* discard invalid text input with Chinese input methods */
|
|
|
|
str = "";
|
|
|
|
[self unmarkText];
|
|
|
|
[[NSTextInputContext currentInputContext] discardMarkedText];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
str = [string UTF8String];
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_set_data_full (G_OBJECT ([self gdkSurface]), TIC_INSERT_TEXT, g_strdup (str), g_free);
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "insertText: set %s (%p, nsview %p): %s",
|
|
|
|
TIC_INSERT_TEXT, [self gdkSurface], self,
|
|
|
|
str ? str : "(empty)");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
|
|
|
|
|
|
|
|
/* handle text input changes by mouse events */
|
|
|
|
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT ([self gdkSurface]), TIC_IN_KEY_DOWN)))
|
|
|
|
_gdk_macos_surface_synthesize_null_key ([self gdkSurface]);
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteBackward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteBackward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteForward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteForward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteToBeginningOfLine:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteToBeginningOfLine");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteToEndOfLine:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteToEndOfLine");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteWordBackward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteWordBackward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)deleteWordForward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "deleteWordForward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)insertBacktab:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "insertBacktab");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)insertNewline:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "insertNewline");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)insertTab:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "insertTab");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveBackward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveBackward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveBackwardAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveBackwardAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveDown:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveDown");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveDownAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveDownAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveForward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveForward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveForwardAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveForwardAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveLeft:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveLeft");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveLeftAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveLeftAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveRight:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveRight");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveRightAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveRightAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToBeginningOfDocument:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToBeginningOfDocument");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToBeginningOfDocumentAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToBeginningOfDocumentAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToBeginningOfLine:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToBeginningOfLine");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToBeginningOfLineAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToBeginningOfLineAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToEndOfDocument:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToEndOfDocument");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToEndOfDocumentAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToEndOfDocumentAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToEndOfLine:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToEndOfLine");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveToEndOfLineAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveToEndOfLineAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveUp:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveUp");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveUpAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveUpAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordBackward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordBackward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordBackwardAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordBackwardAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordForward:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordForward");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordForwardAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordForwardAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordLeft:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordLeft");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordLeftAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordLeftAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordRight:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordRight");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)moveWordRightAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "moveWordRightAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)pageDown:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "pageDown");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)pageDownAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "pageDownAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)pageUp:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "pageUp");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)pageUpAndModifySelection:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "pageUpAndModifySelection");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)selectAll:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "selectAll");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)selectLine:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "selectLine");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)selectWord:(id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "selectWord");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)noop: (id)sender
|
|
|
|
{
|
2022-09-23 01:32:54 +00:00
|
|
|
GDK_DEBUG (EVENTS, "noop");
|
2020-04-23 23:36:46 +00:00
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT ([self gdkSurface]),
|
|
|
|
GIC_FILTER_KEY,
|
|
|
|
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|