Avoid potential negative array index access to cached text.
[LibreOffice.git] / vcl / inc / osx / vclnsapp.h
blobe3329f554c7e50a607aa493aa5fd140a7cc627fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <config_features.h>
24 #include <premac.h>
25 #include <Cocoa/Cocoa.h>
26 #include <postmac.h>
28 class AquaSalFrame;
30 @interface CocoaThreadEnabler : NSObject
33 -(void)enableCocoaThreads:(id)param;
34 @end
36 // our very own application
37 @interface VCL_NSApplication : NSApplication
40 -(void)applicationDidFinishLaunching:(NSNotification*)pNotification;
41 -(void)sendEvent:(NSEvent*)pEvent;
42 -(void)sendSuperEvent:(NSEvent*)pEvent;
43 -(NSMenu*)applicationDockMenu:(NSApplication *)sender;
44 -(BOOL)application: (NSApplication*) app openFile: (NSString*)file;
45 -(void)application: (NSApplication*) app openFiles: (NSArray*)files;
46 -(BOOL)application: (NSApplication*) app printFile: (NSString*)file;
47 -(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels;
48 -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app;
49 -(void)applicationWillTerminate: (NSNotification *) aNotification;
50 -(void)observeValueForKeyPath: (NSString*) keyPath ofObject:(id)object
51 change: (NSDictionary<NSKeyValueChangeKey, id>*)change
52 context: (void*)context;
53 -(void)systemColorsChanged: (NSNotification*) pNotification;
54 -(void)screenParametersChanged: (NSNotification*) pNotification;
55 -(void)scrollbarVariantChanged: (NSNotification*) pNotification;
56 -(void)scrollbarSettingsChanged: (NSNotification*) pNotification;
57 -(void)addFallbackMenuItem: (NSMenuItem*)pNewItem;
58 -(void)removeFallbackMenuItem: (NSMenuItem*)pOldItem;
59 -(void)addDockMenuItem: (NSMenuItem*)pNewItem;
60 #if !HAVE_FEATURE_MACOSX_SANDBOX
61 -(void)applicationWillBecomeActive: (NSNotification *)pNotification;
62 -(void)applicationWillResignActive: (NSNotification *)pNotification;
63 #endif
64 -(BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL)bWinVisible;
65 -(void)setDockIconClickHandler: (NSObject*)pHandler;
66 @end
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */