summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-05 12:43:58 +0200
committerSven Weidauer <sven@5sw.de>2017-06-05 12:43:58 +0200
commit7a3976a120e33a9a56590388e5ed077a0c766e14 (patch)
treeb5accdebdecea0ba26cd14b5e2d2cfc2f7b82d1b
parente51c739bfc8e0c50161172952c99b8796703c6fe (diff)
downloadnetsurf-7a3976a120e33a9a56590388e5ed077a0c766e14.tar.gz
netsurf-7a3976a120e33a9a56590388e5ed077a0c766e14.tar.bz2
Reformat headers as well.
-rw-r--r--frontends/cocoa/ArrowBox.h22
-rw-r--r--frontends/cocoa/ArrowWindow.h15
-rw-r--r--frontends/cocoa/BlackScroller.h6
-rw-r--r--frontends/cocoa/BookmarksController.h14
-rw-r--r--frontends/cocoa/BrowserView.h36
-rw-r--r--frontends/cocoa/BrowserViewController.h51
-rw-r--r--frontends/cocoa/BrowserWindow.h1
-rw-r--r--frontends/cocoa/BrowserWindowController.h10
-rw-r--r--frontends/cocoa/DownloadWindowController.h30
-rw-r--r--frontends/cocoa/HistoryView.h8
-rw-r--r--frontends/cocoa/LocalHistoryController.h10
-rw-r--r--frontends/cocoa/PSMTabBarControl/NSBezierPath_AMShading.h5
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.h13
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.h1
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMRolloverButton.h6
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabBarCell.h47
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabBarControl.h168
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabBarController.h14
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabDragAssistant.h44
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabDragView.h6
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabDragWindow.h2
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMTabDragWindowController.h14
-rw-r--r--frontends/cocoa/PSMTabBarControl/PSMUnifiedTabStyle.h24
-rw-r--r--frontends/cocoa/PreferencesWindowController.h6
-rw-r--r--frontends/cocoa/apple_image.h1
-rw-r--r--frontends/cocoa/bitmap.h2
-rw-r--r--frontends/cocoa/coordinates.h83
-rw-r--r--frontends/cocoa/desktop-tree.h43
-rw-r--r--frontends/cocoa/font.h2
-rw-r--r--frontends/cocoa/gui.h16
-rw-r--r--frontends/cocoa/plotter.h6
31 files changed, 344 insertions, 362 deletions
diff --git a/frontends/cocoa/ArrowBox.h b/frontends/cocoa/ArrowBox.h
index c49fcb6e7..c3f7a44cc 100644
--- a/frontends/cocoa/ArrowBox.h
+++ b/frontends/cocoa/ArrowBox.h
@@ -6,24 +6,22 @@
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
#import <Cocoa/Cocoa.h>
typedef enum {
- ArrowNone,
- ArrowTopEdge,
- ArrowBottomEdge,
- ArrowLeftEdge,
- ArrowRightEdge
+ ArrowNone,
+ ArrowTopEdge,
+ ArrowBottomEdge,
+ ArrowLeftEdge,
+ ArrowRightEdge
} ArrowEdge;
-
@interface ArrowBox : NSView {
- CGFloat arrowPosition;
- CGFloat arrowSize;
- ArrowEdge arrowEdge;
- CGFloat cornerRadius;
- BOOL updateShadow;
+ CGFloat arrowPosition;
+ CGFloat arrowSize;
+ ArrowEdge arrowEdge;
+ CGFloat cornerRadius;
+ BOOL updateShadow;
}
@property (readwrite, assign, nonatomic) CGFloat arrowPosition;
diff --git a/frontends/cocoa/ArrowWindow.h b/frontends/cocoa/ArrowWindow.h
index 79f422f3e..94b49fbb6 100644
--- a/frontends/cocoa/ArrowWindow.h
+++ b/frontends/cocoa/ArrowWindow.h
@@ -6,16 +6,15 @@
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
#import <Cocoa/Cocoa.h>
#import "ArrowBox.h"
@interface ArrowWindow : NSWindow {
- ArrowBox *box;
- NSView *content;
- BOOL acceptsKey;
- NSWindow *attachedWindow;
+ ArrowBox *box;
+ NSView *content;
+ BOOL acceptsKey;
+ NSWindow *attachedWindow;
}
@property (readwrite, assign, nonatomic) BOOL acceptsKey;
@@ -25,8 +24,8 @@
@property (readwrite, assign, nonatomic) ArrowEdge arrowEdge;
@property (readwrite, assign, nonatomic) CGFloat cornerRadius;
-- (void) moveToPoint: (NSPoint) screenPoint;
-- (void) attachToView: (NSView *) view;
-- (void) detach;
+- (void)moveToPoint:(NSPoint)screenPoint;
+- (void)attachToView:(NSView *)view;
+- (void)detach;
@end
diff --git a/frontends/cocoa/BlackScroller.h b/frontends/cocoa/BlackScroller.h
index 34110b035..3efe66277 100644
--- a/frontends/cocoa/BlackScroller.h
+++ b/frontends/cocoa/BlackScroller.h
@@ -6,13 +6,11 @@
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
#import <Cocoa/Cocoa.h>
-
@interface BlackScroller : NSScroller {
- BOOL drawTrack;
- NSTrackingRectTag tag;
+ BOOL drawTrack;
+ NSTrackingRectTag tag;
}
@property (readonly, getter=isHorizontal) BOOL horizontal;
diff --git a/frontends/cocoa/BookmarksController.h b/frontends/cocoa/BookmarksController.h
index 4c90424e7..476d86c29 100644
--- a/frontends/cocoa/BookmarksController.h
+++ b/frontends/cocoa/BookmarksController.h
@@ -22,18 +22,18 @@
@class TreeView;
@interface BookmarksController : NSWindowController {
- Tree *tree;
- NSMapTable *nodeForMenu;
+ Tree *tree;
+ NSMapTable *nodeForMenu;
}
@property (readwrite, assign, nonatomic) IBOutlet NSMenu *defaultMenu;
@property (readwrite, assign, nonatomic) IBOutlet TreeView *view;
-- (IBAction) openBookmarkURL: (id) sender;
-- (IBAction) addBookmark: (id) sender;
+- (IBAction)openBookmarkURL:(id)sender;
+- (IBAction)addBookmark:(id)sender;
-- (IBAction) editSelected: (id) sender;
-- (IBAction) deleteSelected: (id) sender;
-- (IBAction) addFolder: (id) sender;
+- (IBAction)editSelected:(id)sender;
+- (IBAction)deleteSelected:(id)sender;
+- (IBAction)addFolder:(id)sender;
@end
diff --git a/frontends/cocoa/BrowserView.h b/frontends/cocoa/BrowserView.h
index 1d02fb02b..596100f09 100644
--- a/frontends/cocoa/BrowserView.h
+++ b/frontends/cocoa/BrowserView.h
@@ -23,30 +23,30 @@
@class LocalHistoryController;
@interface BrowserView : ScrollableView <NSTextInput> {
- struct browser_window *browser;
-
- NSPoint caretPoint;
- CGFloat caretHeight;
- BOOL caretVisible;
- BOOL hasCaret;
- NSTimer *caretTimer;
-
- BOOL isDragging;
- NSPoint dragStart;
-
- BOOL historyVisible;
- LocalHistoryController *history;
-
- NSString *markedText;
+ struct browser_window *browser;
+
+ NSPoint caretPoint;
+ CGFloat caretHeight;
+ BOOL caretVisible;
+ BOOL hasCaret;
+ NSTimer *caretTimer;
+
+ BOOL isDragging;
+ NSPoint dragStart;
+
+ BOOL historyVisible;
+ LocalHistoryController *history;
+
+ NSString *markedText;
}
@property (readwrite, assign, nonatomic) struct browser_window *browser;
@property (readwrite, retain, nonatomic) NSTimer *caretTimer;
@property (readwrite, assign, nonatomic, getter=isHistoryVisible) BOOL historyVisible;
-- (void) removeCaret;
-- (void) addCaretAt: (NSPoint) point height: (CGFloat) height;
+- (void)removeCaret;
+- (void)addCaretAt:(NSPoint)point height:(CGFloat)height;
-- (void) updateHistory;
+- (void)updateHistory;
@end
diff --git a/frontends/cocoa/BrowserViewController.h b/frontends/cocoa/BrowserViewController.h
index a37081013..f499c05b3 100644
--- a/frontends/cocoa/BrowserViewController.h
+++ b/frontends/cocoa/BrowserViewController.h
@@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#import <Cocoa/Cocoa.h>
struct browser_window;
@@ -24,15 +23,15 @@ struct browser_window;
@class BrowserWindowController;
@interface BrowserViewController : NSViewController {
- struct browser_window *browser;
- NSString *url;
- BrowserWindowController *windowController;
- NSString *title;
- NSString *status;
- BOOL isProcessing;
- NSImage *favicon;
- BOOL canGoBack;
- BOOL canGoForward;
+ struct browser_window *browser;
+ NSString *url;
+ BrowserWindowController *windowController;
+ NSString *title;
+ NSString *status;
+ BOOL isProcessing;
+ NSImage *favicon;
+ BOOL canGoBack;
+ BOOL canGoForward;
}
@property (readwrite, assign, nonatomic) struct browser_window *browser;
@@ -46,29 +45,29 @@ struct browser_window;
@property (readwrite, assign, nonatomic) BOOL canGoBack;
@property (readwrite, assign, nonatomic) BOOL canGoForward;
-- (id) initWithBrowser: (struct browser_window *) bw;
+- (id)initWithBrowser:(struct browser_window *)bw;
-- (void) contentUpdated;
-- (void) updateBackForward;
+- (void)contentUpdated;
+- (void)updateBackForward;
-- (IBAction) navigate: (id) sender;
+- (IBAction)navigate:(id)sender;
-- (IBAction) backForwardSelected: (id) sender;
+- (IBAction)backForwardSelected:(id)sender;
-- (IBAction) goHome: (id) sender;
+- (IBAction)goHome:(id)sender;
-- (IBAction) goBack: (id) sender;
-- (IBAction) goForward: (id) sender;
-- (IBAction) reloadPage: (id) sender;
-- (IBAction) stopLoading: (id) sender;
+- (IBAction)goBack:(id)sender;
+- (IBAction)goForward:(id)sender;
+- (IBAction)reloadPage:(id)sender;
+- (IBAction)stopLoading:(id)sender;
-- (IBAction) zoomIn: (id) sender;
-- (IBAction) zoomOut: (id) sender;
-- (IBAction) zoomOriginal: (id) sender;
+- (IBAction)zoomIn:(id)sender;
+- (IBAction)zoomOut:(id)sender;
+- (IBAction)zoomOriginal:(id)sender;
-- (IBAction) viewSource: (id) sender;
+- (IBAction)viewSource:(id)sender;
-- (void) buildBackMenu: (NSMenu *)menu;
-- (void) buildForwardMenu: (NSMenu *)menu;
+- (void)buildBackMenu:(NSMenu *)menu;
+- (void)buildForwardMenu:(NSMenu *)menu;
@end
diff --git a/frontends/cocoa/BrowserWindow.h b/frontends/cocoa/BrowserWindow.h
index 44f23f699..b0810c79f 100644
--- a/frontends/cocoa/BrowserWindow.h
+++ b/frontends/cocoa/BrowserWindow.h
@@ -18,6 +18,5 @@
#import <Cocoa/Cocoa.h>
-
@interface BrowserWindow : NSWindow
@end
diff --git a/frontends/cocoa/BrowserWindowController.h b/frontends/cocoa/BrowserWindowController.h
index 1b40ca8b0..4cbe02f21 100644
--- a/frontends/cocoa/BrowserWindowController.h
+++ b/frontends/cocoa/BrowserWindowController.h
@@ -22,7 +22,7 @@
@class BrowserViewController;
@class URLFieldCell;
-@interface BrowserWindowController : NSWindowController
+@interface BrowserWindowController : NSWindowController
@property (readwrite, assign, nonatomic) IBOutlet PSMTabBarControl *tabBar;
@property (readwrite, assign, nonatomic) IBOutlet NSTabView *tabView;
@@ -38,10 +38,10 @@
@property (readwrite, assign, nonatomic) BOOL canGoBack;
@property (readwrite, assign, nonatomic) BOOL canGoForward;
-- (IBAction) newTab: (id) sender;
-- (IBAction) closeCurrentTab: (id) sender;
+- (IBAction)newTab:(id)sender;
+- (IBAction)closeCurrentTab:(id)sender;
-- (void) addTab: (BrowserViewController *)browser;
-- (void) removeTab: (BrowserViewController *)browser;
+- (void)addTab:(BrowserViewController *)browser;
+- (void)removeTab:(BrowserViewController *)browser;
@end
diff --git a/frontends/cocoa/DownloadWindowController.h b/frontends/cocoa/DownloadWindowController.h
index 47a05be39..2cc36ed19 100644
--- a/frontends/cocoa/DownloadWindowController.h
+++ b/frontends/cocoa/DownloadWindowController.h
@@ -21,19 +21,19 @@
struct gui_download_table *cocoa_download_table;
@interface DownloadWindowController : NSWindowController {
- struct download_context *context;
- unsigned long totalSize;
- unsigned long receivedSize;
-
- NSURL *url;
- NSString *mimeType;
- NSURL *saveURL;
- NSFileHandle *outputFile;
- NSMutableData *savedData;
- NSDate *startDate;
-
- BOOL canClose;
- BOOL shouldClose;
+ struct download_context *context;
+ unsigned long totalSize;
+ unsigned long receivedSize;
+
+ NSURL *url;
+ NSString *mimeType;
+ NSURL *saveURL;
+ NSFileHandle *outputFile;
+ NSMutableData *savedData;
+ NSDate *startDate;
+
+ BOOL canClose;
+ BOOL shouldClose;
}
@property (readwrite, copy, nonatomic) NSURL *URL;
@@ -46,8 +46,8 @@ struct gui_download_table *cocoa_download_table;
@property (readonly, nonatomic) NSImage *icon;
@property (readonly, nonatomic) NSString *statusText;
-- (id)initWithContext: (struct download_context *)ctx;
+- (id)initWithContext:(struct download_context *)ctx;
-- (void) abort;
+- (void)abort;
@end
diff --git a/frontends/cocoa/HistoryView.h b/frontends/cocoa/HistoryView.h
index 5e4b45447..42e73dd76 100644
--- a/frontends/cocoa/HistoryView.h
+++ b/frontends/cocoa/HistoryView.h
@@ -22,13 +22,13 @@
@class BrowserView;
@interface HistoryView : NSView {
- struct browser_window *browser;
- NSMutableArray *toolTips;
+ struct browser_window *browser;
+ NSMutableArray *toolTips;
}
@property (readwrite, retain, nonatomic) BrowserView *browser;
-- (void) updateHistory;
-- (NSSize) size;
+- (void)updateHistory;
+- (NSSize)size;
@end
diff --git a/frontends/cocoa/LocalHistoryController.h b/frontends/cocoa/LocalHistoryController.h
index 22a79c6ec..d7609238e 100644
--- a/frontends/cocoa/LocalHistoryController.h
+++ b/frontends/cocoa/LocalHistoryController.h
@@ -26,12 +26,12 @@
@property (readwrite, nonatomic) BrowserView *browser;
@property (readwrite, nonatomic) IBOutlet HistoryView *history;
-- (id)initWithBrowser: (BrowserView *) bw;
+- (id)initWithBrowser:(BrowserView *)bw;
-- (void) attachToView: (NSView *) view;
-- (void) detach;
-- (void) redraw;
+- (void)attachToView:(NSView *)view;
+- (void)detach;
+- (void)redraw;
-- (void) keyDown: (NSEvent *)theEvent;
+- (void)keyDown:(NSEvent *)theEvent;
@end
diff --git a/frontends/cocoa/PSMTabBarControl/NSBezierPath_AMShading.h b/frontends/cocoa/PSMTabBarControl/NSBezierPath_AMShading.h
index fd2c2dde4..9aa17a905 100644
--- a/frontends/cocoa/PSMTabBarControl/NSBezierPath_AMShading.h
+++ b/frontends/cocoa/PSMTabBarControl/NSBezierPath_AMShading.h
@@ -7,13 +7,12 @@
//
// based on http://www.cocoadev.com/index.pl?GradientFill
-
#import <Cocoa/Cocoa.h>
@interface NSBezierPath (AMShading)
-- (void)customHorizontalFillWithCallbacks:(CGFunctionCallbacks) functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor;
-- (void)customVerticalFillWithCallbacks:(CGFunctionCallbacks) functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor;
+- (void)customHorizontalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor;
+- (void)customVerticalFillWithCallbacks:(CGFunctionCallbacks)functionCallbacks firstColor:(NSColor *)firstColor secondColor:(NSColor *)secondColor;
- (void)linearGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor;
- (void)linearVerticalGradientFillWithStartColor:(NSColor *)startColor endColor:(NSColor *)endColor;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.h b/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.h
index decda5be4..0c39f32e0 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.h
@@ -8,14 +8,13 @@
#import <Cocoa/Cocoa.h>
-
@interface PSMOverflowPopUpButton : NSPopUpButton {
- NSImage *_PSMTabBarOverflowPopUpImage;
- NSImage *_PSMTabBarOverflowDownPopUpImage;
- BOOL _down;
- BOOL _animatingAlternateImage;
- NSTimer *_animationTimer;
- CGFloat _animationValue;
+ NSImage *_PSMTabBarOverflowPopUpImage;
+ NSImage *_PSMTabBarOverflowDownPopUpImage;
+ BOOL _down;
+ BOOL _animatingAlternateImage;
+ NSTimer *_animationTimer;
+ CGFloat _animationValue;
}
//alternate image display
diff --git a/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.h b/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.h
index ffce06926..75c81d33c 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.h
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
-
@interface PSMProgressIndicator : NSProgressIndicator {
}
diff --git a/frontends/cocoa/PSMTabBarControl/PSMRolloverButton.h b/frontends/cocoa/PSMTabBarControl/PSMRolloverButton.h
index 62fce23e0..6f2afdb09 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMRolloverButton.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMRolloverButton.h
@@ -9,9 +9,9 @@
#import <Cocoa/Cocoa.h>
@interface PSMRolloverButton : NSButton {
- NSImage *_rolloverImage;
- NSImage *_usualImage;
- NSTrackingRectTag _myTrackingRectTag;
+ NSImage *_rolloverImage;
+ NSImage *_usualImage;
+ NSTrackingRectTag _myTrackingRectTag;
}
// the regular image
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabBarCell.h b/frontends/cocoa/PSMTabBarControl/PSMTabBarCell.h
index c8f6cecdd..f5c51b495 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabBarCell.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabBarCell.h
@@ -10,34 +10,33 @@
#import "PSMTabBarControl.h"
#import "PSMProgressIndicator.h"
-
@interface PSMTabBarCell : NSActionCell {
- // sizing
- NSRect _frame;
- NSSize _stringSize;
- NSInteger _currentStep;
- BOOL _isPlaceholder;
-
- // state
- NSInteger _tabState;
- NSTrackingRectTag _closeButtonTrackingTag; // left side tracking, if dragging
- NSTrackingRectTag _cellTrackingTag; // right side tracking, if dragging
- BOOL _closeButtonOver;
- BOOL _closeButtonPressed;
- PSMProgressIndicator *_indicator;
- BOOL _isInOverflowMenu;
- BOOL _hasCloseButton;
- BOOL _isCloseButtonSuppressed;
- BOOL _hasIcon;
- BOOL _hasLargeImage;
- NSInteger _count;
- NSColor *_countColor;
- BOOL _isEdited;
+ // sizing
+ NSRect _frame;
+ NSSize _stringSize;
+ NSInteger _currentStep;
+ BOOL _isPlaceholder;
+
+ // state
+ NSInteger _tabState;
+ NSTrackingRectTag _closeButtonTrackingTag; // left side tracking, if dragging
+ NSTrackingRectTag _cellTrackingTag; // right side tracking, if dragging
+ BOOL _closeButtonOver;
+ BOOL _closeButtonPressed;
+ PSMProgressIndicator *_indicator;
+ BOOL _isInOverflowMenu;
+ BOOL _hasCloseButton;
+ BOOL _isCloseButtonSuppressed;
+ BOOL _hasIcon;
+ BOOL _hasLargeImage;
+ NSInteger _count;
+ NSColor *_countColor;
+ BOOL _isEdited;
}
// creation/destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView;
-- (id)initPlaceholderWithFrame:(NSRect) frame expanded:(BOOL) value inControlView:(PSMTabBarControl *)controlView;
+- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView;
- (void)dealloc;
// accessors
@@ -88,7 +87,7 @@
- (CGFloat)desiredWidthOfCell;
// drawing
-- (void)drawWithFrame:(NSRect) cellFrame inView:(NSView *)controlView;
+- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
// tracking the mouse
- (void)mouseEntered:(NSEvent *)theEvent;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabBarControl.h b/frontends/cocoa/PSMTabBarControl/PSMTabBarControl.h
index 980c43d38..26f11de7a 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabBarControl.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabBarControl.h
@@ -12,26 +12,26 @@
#import <Cocoa/Cocoa.h>
-#define PSMTabDragDidEndNotification @ "PSMTabDragDidEndNotification"
-#define PSMTabDragDidBeginNotification @ "PSMTabDragDidBeginNotification"
+#define PSMTabDragDidEndNotification @"PSMTabDragDidEndNotification"
+#define PSMTabDragDidBeginNotification @"PSMTabDragDidBeginNotification"
-#define kPSMTabBarControlHeight 22
+#define kPSMTabBarControlHeight 22
// internal cell border
-#define MARGIN_X 6
-#define MARGIN_Y 3
+#define MARGIN_X 6
+#define MARGIN_Y 3
// padding between objects
-#define kPSMTabBarCellPadding 4
+#define kPSMTabBarCellPadding 4
// fixed size objects
-#define kPSMMinimumTitleWidth 30
-#define kPSMTabBarIndicatorWidth 16.0
-#define kPSMTabBarIconWidth 16.0
-#define kPSMHideAnimationSteps 3.0
+#define kPSMMinimumTitleWidth 30
+#define kPSMTabBarIndicatorWidth 16.0
+#define kPSMTabBarIconWidth 16.0
+#define kPSMHideAnimationSteps 3.0
// Value used in _currentStep to indicate that resizing operation is not in progress
-#define kPSMIsNotBeingResized -1
+#define kPSMIsNotBeingResized -1
// Value used in _currentStep when a resizing operation has just been started
-#define kPSMStartResizeAnimation 0
+#define kPSMStartResizeAnimation 0
@class PSMOverflowPopUpButton;
@class PSMRolloverButton;
@@ -40,82 +40,82 @@
@protocol PSMTabStyle;
typedef enum {
- PSMTabBarHorizontalOrientation,
- PSMTabBarVerticalOrientation
+ PSMTabBarHorizontalOrientation,
+ PSMTabBarVerticalOrientation
} PSMTabBarOrientation;
typedef enum {
- PSMTabBarTearOffAlphaWindow,
- PSMTabBarTearOffMiniwindow
+ PSMTabBarTearOffAlphaWindow,
+ PSMTabBarTearOffMiniwindow
} PSMTabBarTearOffStyle;
enum {
- PSMTab_SelectedMask = 1 << 1,
- PSMTab_LeftIsSelectedMask = 1 << 2,
- PSMTab_RightIsSelectedMask = 1 << 3,
- PSMTab_PositionLeftMask = 1 << 4,
- PSMTab_PositionMiddleMask = 1 << 5,
- PSMTab_PositionRightMask = 1 << 6,
- PSMTab_PositionSingleMask = 1 << 7,
+ PSMTab_SelectedMask = 1 << 1,
+ PSMTab_LeftIsSelectedMask = 1 << 2,
+ PSMTab_RightIsSelectedMask = 1 << 3,
+ PSMTab_PositionLeftMask = 1 << 4,
+ PSMTab_PositionMiddleMask = 1 << 5,
+ PSMTab_PositionRightMask = 1 << 6,
+ PSMTab_PositionSingleMask = 1 << 7,
};
@interface PSMTabBarControl : NSControl {
-
- // control basics
- NSMutableArray *_cells; // the cells that draw the tabs
- IBOutlet NSTabView *tabView; // the tab view being navigated
- PSMOverflowPopUpButton *_overflowPopUpButton; // for too many tabs
- PSMRolloverButton *_addTabButton;
- PSMTabBarController *_controller;
-
- // Spring-loading.
- NSTimer *_springTimer;
- NSTabViewItem *_tabViewItemWithSpring;
-
- // drawing style
- id<PSMTabStyle> style;
- BOOL _canCloseOnlyTab;
- BOOL _disableTabClose;
- BOOL _hideForSingleTab;
- BOOL _showAddTabButton;
- BOOL _sizeCellsToFit;
- BOOL _useOverflowMenu;
- BOOL _alwaysShowActiveTab;
- BOOL _allowsScrubbing;
- NSInteger _resizeAreaCompensation;
- PSMTabBarOrientation _orientation;
- BOOL _automaticallyAnimates;
- NSTimer *_animationTimer;
- PSMTabBarTearOffStyle _tearOffStyle;
-
- // behavior
- BOOL _allowsBackgroundTabClosing;
- BOOL _selectsTabsOnMouseDown;
-
- // vertical tab resizing
- BOOL _allowsResizing;
- BOOL _resizing;
-
- // cell width
- NSInteger _cellMinWidth;
- NSInteger _cellMaxWidth;
- NSInteger _cellOptimumWidth;
-
- // animation for hide/show
- NSInteger _currentStep;
- BOOL _isHidden;
- IBOutlet id partnerView; // gets resized when hide/show
- BOOL _awakenedFromNib;
- NSInteger _tabBarWidth;
- NSTimer *_showHideAnimationTimer;
-
- // drag and drop
- NSEvent *_lastMouseDownEvent; // keep this for dragging reference
- BOOL _didDrag;
- BOOL _closeClicked;
-
- // MVC help
- IBOutlet id delegate;
+
+ // control basics
+ NSMutableArray *_cells; // the cells that draw the tabs
+ IBOutlet NSTabView *tabView; // the tab view being navigated
+ PSMOverflowPopUpButton *_overflowPopUpButton; // for too many tabs
+ PSMRolloverButton *_addTabButton;
+ PSMTabBarController *_controller;
+
+ // Spring-loading.
+ NSTimer *_springTimer;
+ NSTabViewItem *_tabViewItemWithSpring;
+
+ // drawing style
+ id<PSMTabStyle> style;
+ BOOL _canCloseOnlyTab;
+ BOOL _disableTabClose;
+ BOOL _hideForSingleTab;
+ BOOL _showAddTabButton;
+ BOOL _sizeCellsToFit;
+ BOOL _useOverflowMenu;
+ BOOL _alwaysShowActiveTab;
+ BOOL _allowsScrubbing;
+ NSInteger _resizeAreaCompensation;
+ PSMTabBarOrientation _orientation;
+ BOOL _automaticallyAnimates;
+ NSTimer *_animationTimer;
+ PSMTabBarTearOffStyle _tearOffStyle;
+
+ // behavior
+ BOOL _allowsBackgroundTabClosing;
+ BOOL _selectsTabsOnMouseDown;
+
+ // vertical tab resizing
+ BOOL _allowsResizing;
+ BOOL _resizing;
+
+ // cell width
+ NSInteger _cellMinWidth;
+ NSInteger _cellMaxWidth;
+ NSInteger _cellOptimumWidth;
+
+ // animation for hide/show
+ NSInteger _currentStep;
+ BOOL _isHidden;
+ IBOutlet id partnerView; // gets resized when hide/show
+ BOOL _awakenedFromNib;
+ NSInteger _tabBarWidth;
+ NSTimer *_showHideAnimationTimer;
+
+ // drag and drop
+ NSEvent *_lastMouseDownEvent; // keep this for dragging reference
+ BOOL _didDrag;
+ BOOL _closeClicked;
+
+ // MVC help
+ IBOutlet id delegate;
}
// control characteristics
@@ -131,7 +131,7 @@ enum {
- (BOOL)disableTabClose;
- (void)setDisableTabClose:(BOOL)value;
- (id<PSMTabStyle>)style;
-- (void)setStyle:(id <PSMTabStyle>)newStyle;
+- (void)setStyle:(id<PSMTabStyle>)newStyle;
- (NSString *)styleName;
- (void)setStyleNamed:(NSString *)name;
- (BOOL)hideForSingleTab;
@@ -184,7 +184,7 @@ enum {
- (PSMTabBarCell *)lastVisibleTab;
// special effects
-- (void)hideTabBar:(BOOL) hide animate:(BOOL)animate;
+- (void)hideTabBar:(BOOL)hide animate:(BOOL)animate;
- (BOOL)isTabBarHidden;
- (BOOL)isAnimating;
@@ -194,7 +194,6 @@ enum {
@end
-
@interface NSObject (TabBarControlDelegateMethods)
//Standard NSTabView methods
@@ -203,7 +202,7 @@ enum {
//"Spring-loaded" tabs methods
- (NSArray *)allowedDraggedTypesForTabView:(NSTabView *)aTabView;
-- (void)tabView:(NSTabView *)aTabView acceptedDraggingInfo:(id <NSDraggingInfo>) draggingInfo onTabViewItem:(NSTabViewItem *)tabViewItem;
+- (void)tabView:(NSTabView *)aTabView acceptedDraggingInfo:(id<NSDraggingInfo>)draggingInfo onTabViewItem:(NSTabViewItem *)tabViewItem;
//Contextual menu method
- (NSMenu *)tabView:(NSTabView *)aTabView menuForTabViewItem:(NSTabViewItem *)tabViewItem;
@@ -212,8 +211,7 @@ enum {
- (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl;
- (BOOL)tabView:(NSTabView *)aTabView shouldDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;
- (BOOL)tabView:(NSTabView *)aTabView shouldAllowTabViewItem:(NSTabViewItem *)tabViewItem toLeaveTabBar:(PSMTabBarControl *)tabBarControl;
-- (void)tabView:(NSTabView*)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;
-
+- (void)tabView:(NSTabView *)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;
//Tear-off tabs methods
- (NSImage *)tabView:(NSTabView *)aTabView imageForTabViewItem:(NSTabViewItem *)tabViewItem offset:(NSSize *)offset styleMask:(NSUInteger *)styleMask;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabBarController.h b/frontends/cocoa/PSMTabBarControl/PSMTabBarController.h
index a73a04f1f..80c94df4f 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabBarController.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabBarController.h
@@ -12,15 +12,15 @@
@interface PSMTabBarController : NSObject
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- <NSMenuDelegate>
+ <NSMenuDelegate>
#endif
{
- PSMTabBarControl *_control;
- NSMutableArray *_cellTrackingRects;
- NSMutableArray *_closeButtonTrackingRects;
- NSMutableArray *_cellFrames;
- NSRect _addButtonRect;
- NSMenu *_overflowMenu;
+ PSMTabBarControl *_control;
+ NSMutableArray *_cellTrackingRects;
+ NSMutableArray *_closeButtonTrackingRects;
+ NSMutableArray *_cellFrames;
+ NSRect _addButtonRect;
+ NSMenu *_overflowMenu;
}
- (id)initWithTabBarControl:(PSMTabBarControl *)control;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabDragAssistant.h b/frontends/cocoa/PSMTabBarControl/PSMTabDragAssistant.h
index 2632e11a0..a3a80982a 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabDragAssistant.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabDragAssistant.h
@@ -18,26 +18,26 @@
@class PSMTabBarCell, PSMTabDragWindowController;
@interface PSMTabDragAssistant : NSObject {
- PSMTabBarControl *_sourceTabBar;
- PSMTabBarControl *_destinationTabBar;
- NSMutableSet *_participatingTabBars;
- PSMTabBarCell *_draggedCell;
- NSUInteger _draggedCellIndex; // for snap back
- BOOL _isDragging;
-
- // Support for dragging into new windows
- PSMTabDragWindowController *_draggedTab;
- PSMTabDragWindowController *_draggedView;
- NSSize _dragWindowOffset;
- NSTimer *_fadeTimer;
- BOOL _centersDragWindows;
- PSMTabBarTearOffStyle _currentTearOffStyle;
-
- // Animation
- NSTimer *_animationTimer;
- NSMutableArray *_sineCurveWidths;
- NSPoint _currentMouseLoc;
- PSMTabBarCell *_targetCell;
+ PSMTabBarControl *_sourceTabBar;
+ PSMTabBarControl *_destinationTabBar;
+ NSMutableSet *_participatingTabBars;
+ PSMTabBarCell *_draggedCell;
+ NSUInteger _draggedCellIndex; // for snap back
+ BOOL _isDragging;
+
+ // Support for dragging into new windows
+ PSMTabDragWindowController *_draggedTab;
+ PSMTabDragWindowController *_draggedView;
+ NSSize _dragWindowOffset;
+ NSTimer *_fadeTimer;
+ BOOL _centersDragWindows;
+ PSMTabBarTearOffStyle _currentTearOffStyle;
+
+ // Animation
+ NSTimer *_animationTimer;
+ NSMutableArray *_sineCurveWidths;
+ NSPoint _currentMouseLoc;
+ PSMTabBarCell *_targetCell;
}
// Creation/destruction
@@ -65,7 +65,7 @@
- (void)draggingUpdatedInTabBar:(PSMTabBarControl *)control atPoint:(NSPoint)mouseLoc;
- (void)draggingExitedTabBar:(PSMTabBarControl *)control;
- (void)performDragOperation;
-- (void)draggedImageEndedAt:(NSPoint) aPoint operation:(NSDragOperation)operation;
+- (void)draggedImageEndedAt:(NSPoint)aPoint operation:(NSDragOperation)operation;
- (void)finishDrag;
- (void)draggingBeganAt:(NSPoint)aPoint;
@@ -87,7 +87,7 @@
- (id<PSMTabStyle>)style;
- (NSMutableArray *)cells;
- (void)setControlView:(id)view;
-- (id)cellForPoint:(NSPoint) point cellFrame:(NSRectPointer)outFrame;
+- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame;
- (PSMTabBarCell *)lastVisibleTab;
- (NSInteger)numberOfVisibleTabs;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabDragView.h b/frontends/cocoa/PSMTabBarControl/PSMTabDragView.h
index f8018d290..d106f5106 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabDragView.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabDragView.h
@@ -9,9 +9,9 @@
#import <Cocoa/Cocoa.h>
@interface PSMTabDragView : NSView {
- NSImage *_image;
- NSImage *_alternateImage;
- CGFloat _alpha;
+ NSImage *_image;
+ NSImage *_alternateImage;
+ CGFloat _alpha;
}
- (void)setFadeValue:(CGFloat)value;
- (NSImage *)image;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabDragWindow.h b/frontends/cocoa/PSMTabBarControl/PSMTabDragWindow.h
index 04cde248c..15d066236 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabDragWindow.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabDragWindow.h
@@ -11,7 +11,7 @@
@class PSMTabDragView;
@interface PSMTabDragWindow : NSWindow {
- PSMTabDragView *_dragView;
+ PSMTabDragView *_dragView;
}
+ (PSMTabDragWindow *)dragWindowWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMTabDragWindowController.h b/frontends/cocoa/PSMTabBarControl/PSMTabDragWindowController.h
index 5948207f2..bc67622e7 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMTabDragWindowController.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMTabDragWindowController.h
@@ -15,15 +15,15 @@
@class PSMTabDragView;
@interface PSMTabDragWindowController : NSWindowController {
- PSMTabBarTearOffStyle _tearOffStyle;
- PSMTabDragView *_view;
- NSAnimation *_animation;
- NSTimer *_timer;
+ PSMTabBarTearOffStyle _tearOffStyle;
+ PSMTabDragView *_view;
+ NSAnimation *_animation;
+ NSTimer *_timer;
- BOOL _showingAlternate;
- NSRect _originalWindowFrame;
+ BOOL _showingAlternate;
+ NSRect _originalWindowFrame;
}
-- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger) styleMask tearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle;
+- (id)initWithImage:(NSImage *)image styleMask:(NSUInteger)styleMask tearOffStyle:(PSMTabBarTearOffStyle)tearOffStyle;
- (NSImage *)image;
- (NSImage *)alternateImage;
diff --git a/frontends/cocoa/PSMTabBarControl/PSMUnifiedTabStyle.h b/frontends/cocoa/PSMTabBarControl/PSMUnifiedTabStyle.h
index 20202536a..319fd729d 100644
--- a/frontends/cocoa/PSMTabBarControl/PSMUnifiedTabStyle.h
+++ b/frontends/cocoa/PSMTabBarControl/PSMUnifiedTabStyle.h
@@ -10,20 +10,20 @@
#import "PSMTabStyle.h"
@interface PSMUnifiedTabStyle : NSObject <PSMTabStyle> {
- NSImage *unifiedCloseButton;
- NSImage *unifiedCloseButtonDown;
- NSImage *unifiedCloseButtonOver;
- NSImage *unifiedCloseDirtyButton;
- NSImage *unifiedCloseDirtyButtonDown;
- NSImage *unifiedCloseDirtyButtonOver;
- NSImage *_addTabButtonImage;
- NSImage *_addTabButtonPressedImage;
- NSImage *_addTabButtonRolloverImage;
+ NSImage *unifiedCloseButton;
+ NSImage *unifiedCloseButtonDown;
+ NSImage *unifiedCloseButtonOver;
+ NSImage *unifiedCloseDirtyButton;
+ NSImage *unifiedCloseDirtyButtonDown;
+ NSImage *unifiedCloseDirtyButtonOver;
+ NSImage *_addTabButtonImage;
+ NSImage *_addTabButtonPressedImage;
+ NSImage *_addTabButtonRolloverImage;
- NSDictionary *_objectCountStringAttributes;
+ NSDictionary *_objectCountStringAttributes;
- CGFloat leftMargin;
- PSMTabBarControl *tabBar;
+ CGFloat leftMargin;
+ PSMTabBarControl *tabBar;
}
- (void)setLeftMarginForTabBarControl:(CGFloat)margin;
@end
diff --git a/frontends/cocoa/PreferencesWindowController.h b/frontends/cocoa/PreferencesWindowController.h
index 8f72907a3..02fb530a0 100644
--- a/frontends/cocoa/PreferencesWindowController.h
+++ b/frontends/cocoa/PreferencesWindowController.h
@@ -16,14 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#import <Cocoa/Cocoa.h>
-
-@interface PreferencesWindowController : NSWindowController
+@interface PreferencesWindowController : NSWindowController
@property (readwrite, copy, nonatomic) NSString *homepageURL;
-- (IBAction) useCurrentPageAsHomepage: (id) sender;
+- (IBAction)useCurrentPageAsHomepage:(id)sender;
@end
diff --git a/frontends/cocoa/apple_image.h b/frontends/cocoa/apple_image.h
index 11248a6fb..4f3b54593 100644
--- a/frontends/cocoa/apple_image.h
+++ b/frontends/cocoa/apple_image.h
@@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#ifndef _NETSURF_COCOA_APPLE_IMAGE_H_
#define _NETSURF_COCOA_APPLE_IMAGE_H_
diff --git a/frontends/cocoa/bitmap.h b/frontends/cocoa/bitmap.h
index 1eeed1767..ebc6a20f4 100644
--- a/frontends/cocoa/bitmap.h
+++ b/frontends/cocoa/bitmap.h
@@ -19,7 +19,7 @@
#ifndef COCOA_BITMAP_H
#define COCOA_BITMAP_H
-CGImageRef cocoa_get_cgimage( void *bitmap );
+CGImageRef cocoa_get_cgimage(void *bitmap);
void cocoa_bitmap_modified(void *bitmap);
diff --git a/frontends/cocoa/coordinates.h b/frontends/cocoa/coordinates.h
index a9614389b..516df437b 100644
--- a/frontends/cocoa/coordinates.h
+++ b/frontends/cocoa/coordinates.h
@@ -21,85 +21,84 @@
extern CGFloat cocoa_scale_factor;
-static inline CGFloat cocoa_px_to_pt( int location ) __attribute__((always_inline,pure));
-static inline CGFloat cocoa_px_to_pt_f( CGFloat location ) __attribute__((always_inline,pure));
+static inline CGFloat cocoa_px_to_pt(int location) __attribute__((always_inline, pure));
+static inline CGFloat cocoa_px_to_pt_f(CGFloat location) __attribute__((always_inline, pure));
-static inline int cocoa_pt_to_px( CGFloat location ) __attribute__((always_inline,pure));
+static inline int cocoa_pt_to_px(CGFloat location) __attribute__((always_inline, pure));
-static inline NSPoint cocoa_point( int x, int y ) __attribute__((always_inline,pure));
-static inline NSPoint cocoa_scaled_point( CGFloat scale, int x, int y ) __attribute__((always_inline,pure));
+static inline NSPoint cocoa_point(int x, int y) __attribute__((always_inline, pure));
+static inline NSPoint cocoa_scaled_point(CGFloat scale, int x, int y) __attribute__((always_inline, pure));
-static inline NSSize cocoa_size( int w, int h ) __attribute__((always_inline,pure));
-static inline NSSize cocoa_scaled_size( CGFloat scale, int w, int h ) __attribute__((always_inline,pure));
+static inline NSSize cocoa_size(int w, int h) __attribute__((always_inline, pure));
+static inline NSSize cocoa_scaled_size(CGFloat scale, int w, int h) __attribute__((always_inline, pure));
-static inline NSRect cocoa_rect( int x0, int y0, int x1, int y1 ) __attribute__((always_inline,pure));
-static inline NSRect cocoa_rect_wh( int x, int y, int w, int h ) __attribute__((always_inline,pure));
+static inline NSRect cocoa_rect(int x0, int y0, int x1, int y1) __attribute__((always_inline, pure));
+static inline NSRect cocoa_rect_wh(int x, int y, int w, int h) __attribute__((always_inline, pure));
-static inline NSRect cocoa_scaled_rect( CGFloat scale, int x0, int y0, int x1, int y1 ) __attribute__((always_inline,pure));
-static inline NSRect cocoa_scaled_rect_wh( CGFloat scale, int x, int y, int w, int h ) __attribute__((always_inline,pure));
+static inline NSRect cocoa_scaled_rect(CGFloat scale, int x0, int y0, int x1, int y1) __attribute__((always_inline, pure));
+static inline NSRect cocoa_scaled_rect_wh(CGFloat scale, int x, int y, int w, int h) __attribute__((always_inline, pure));
-static inline CGFloat cocoa_px_to_pt( int location )
+static inline CGFloat cocoa_px_to_pt(int location)
{
- return (CGFloat)location * cocoa_scale_factor;
+ return (CGFloat)location * cocoa_scale_factor;
}
-static inline CGFloat cocoa_px_to_pt_f( CGFloat location )
+static inline CGFloat cocoa_px_to_pt_f(CGFloat location)
{
- return floor( location ) * cocoa_scale_factor;
+ return floor(location) * cocoa_scale_factor;
}
-static inline int cocoa_pt_to_px( CGFloat location )
+static inline int cocoa_pt_to_px(CGFloat location)
{
- return location / cocoa_scale_factor;
+ return location / cocoa_scale_factor;
}
-static inline NSPoint cocoa_point( int x, int y )
+static inline NSPoint cocoa_point(int x, int y)
{
- return NSMakePoint( cocoa_px_to_pt( x ), cocoa_px_to_pt( y ) );
+ return NSMakePoint(cocoa_px_to_pt(x), cocoa_px_to_pt(y));
}
-static inline NSPoint cocoa_scaled_point( CGFloat scale, int x, int y )
+static inline NSPoint cocoa_scaled_point(CGFloat scale, int x, int y)
{
- return NSMakePoint( cocoa_px_to_pt_f( scale * x ), cocoa_px_to_pt_f( scale * y ) );
+ return NSMakePoint(cocoa_px_to_pt_f(scale * x), cocoa_px_to_pt_f(scale * y));
}
-static inline NSSize cocoa_size( int w, int h )
+static inline NSSize cocoa_size(int w, int h)
{
- return NSMakeSize( cocoa_px_to_pt( w ), cocoa_px_to_pt( h ) );
+ return NSMakeSize(cocoa_px_to_pt(w), cocoa_px_to_pt(h));
}
-static inline NSSize cocoa_scaled_size( CGFloat scale, int w, int h )
+static inline NSSize cocoa_scaled_size(CGFloat scale, int w, int h)
{
- return NSMakeSize( cocoa_px_to_pt_f( scale * w ), cocoa_px_to_pt_f( scale * h ) );
+ return NSMakeSize(cocoa_px_to_pt_f(scale * w), cocoa_px_to_pt_f(scale * h));
}
-static inline NSRect cocoa_rect( int x0, int y0, int x1, int y1 )
+static inline NSRect cocoa_rect(int x0, int y0, int x1, int y1)
{
- return cocoa_rect_wh( x0, y0, x1 - x0, y1 - y0 );
+ return cocoa_rect_wh(x0, y0, x1 - x0, y1 - y0);
}
-static inline NSRect cocoa_rect_wh( int x, int y, int w, int h )
+static inline NSRect cocoa_rect_wh(int x, int y, int w, int h)
{
- const NSRect result = {
- .origin = cocoa_point( x, y ),
- .size = cocoa_size( w, h )
- };
- return result;
+ const NSRect result = {
+ .origin = cocoa_point(x, y),
+ .size = cocoa_size(w, h)
+ };
+ return result;
}
-static inline NSRect cocoa_scaled_rect_wh( CGFloat scale, int x, int y, int w, int h )
+static inline NSRect cocoa_scaled_rect_wh(CGFloat scale, int x, int y, int w, int h)
{
- const NSRect result = {
- .origin = cocoa_scaled_point( scale, x, y ),
- .size = cocoa_scaled_size( scale, w, h )
- };
- return result;
+ const NSRect result = {
+ .origin = cocoa_scaled_point(scale, x, y),
+ .size = cocoa_scaled_size(scale, w, h)
+ };
+ return result;
}
-static inline NSRect cocoa_scaled_rect( CGFloat scale, int x0, int y0, int x1, int y1 )
+static inline NSRect cocoa_scaled_rect(CGFloat scale, int x0, int y0, int x1, int y1)
{
- return cocoa_scaled_rect_wh( scale, x0, y0, x1 - x0, y1 - y0 );
+ return cocoa_scaled_rect_wh(scale, x0, y0, x1 - x0, y1 - y0);
}
-
#endif
diff --git a/frontends/cocoa/desktop-tree.h b/frontends/cocoa/desktop-tree.h
index f8864e167..3a6fee306 100644
--- a/frontends/cocoa/desktop-tree.h
+++ b/frontends/cocoa/desktop-tree.h
@@ -44,45 +44,44 @@ extern const char *tree_hotlist_path;
/* Tree flags */
enum tree_flags {
- TREE_HISTORY,
- TREE_COOKIES,
- TREE_SSLCERT,
- TREE_HOTLIST
+ TREE_HISTORY,
+ TREE_COOKIES,
+ TREE_SSLCERT,
+ TREE_HOTLIST
};
typedef enum {
- TREE_NO_DRAG = 0,
- TREE_SELECT_DRAG,
- TREE_MOVE_DRAG,
- TREE_TEXTAREA_DRAG, /** < A drag that is passed to a textarea */
- TREE_UNKNOWN_DRAG /** < A drag the tree itself won't handle */
+ TREE_NO_DRAG = 0,
+ TREE_SELECT_DRAG,
+ TREE_MOVE_DRAG,
+ TREE_TEXTAREA_DRAG, /** < A drag that is passed to a textarea */
+ TREE_UNKNOWN_DRAG /** < A drag the tree itself won't handle */
} tree_drag_type;
/** callbacks to perform necessary operations on treeview. */
struct treeview_table {
- void (*redraw_request)(int x, int y, int width, int height,
- void *data); /**< request a redraw. */
- void (*resized)(struct tree *tree, int width, int height,
- void *data); /**< resize treeview area. */
- void (*scroll_visible)(int y, int height, void *data); /**< scroll visible treeview area. */
- void (*get_window_dimensions)(int *width, int *height, void *data); /**< get dimensions of window */
+ void (*redraw_request)(int x, int y, int width, int height,
+ void *data); /**< request a redraw. */
+ void (*resized)(struct tree *tree, int width, int height,
+ void *data); /**< resize treeview area. */
+ void (*scroll_visible)(int y, int height, void *data); /**< scroll visible treeview area. */
+ void (*get_window_dimensions)(int *width, int *height, void *data); /**< get dimensions of window */
};
struct tree *tree_create(unsigned int flags,
- const struct treeview_table *callbacks,
- void *client_data);
+ const struct treeview_table *callbacks,
+ void *client_data);
/** deprecated compatibility layer for new treeview modules. Do not use. */
void tree_delete(struct tree *tree);
tree_drag_type tree_drag_status(struct tree *tree);
void tree_draw(struct tree *tree, int x, int y,
- int clip_x, int clip_y, int clip_width, int clip_height,
- const struct redraw_context *ctx);
+ int clip_x, int clip_y, int clip_width, int clip_height,
+ const struct redraw_context *ctx);
bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse,
- int x, int y);
+ int x, int y);
void tree_drag_end(struct tree *tree, browser_mouse_state mouse, int x0, int y0,
- int x1, int y1);
+ int x1, int y1);
bool tree_keypress(struct tree *tree, uint32_t key);
-
#endif
diff --git a/frontends/cocoa/font.h b/frontends/cocoa/font.h
index ed0479765..221b885a1 100644
--- a/frontends/cocoa/font.h
+++ b/frontends/cocoa/font.h
@@ -21,7 +21,7 @@
#import "netsurf/plot_style.h"
-void cocoa_draw_string( CGFloat x, CGFloat y, const char *bytes, size_t length, const struct plot_font_style *style );
+void cocoa_draw_string(CGFloat x, CGFloat y, const char *bytes, size_t length, const struct plot_font_style *style);
struct gui_layout_table *cocoa_layout_table;
diff --git a/frontends/cocoa/gui.h b/frontends/cocoa/gui.h
index b34e9b702..3d0009194 100644
--- a/frontends/cocoa/gui.h
+++ b/frontends/cocoa/gui.h
@@ -22,14 +22,14 @@ extern struct gui_window_table *cocoa_window_table;
extern struct gui_clipboard_table *cocoa_clipboard_table;
extern struct gui_misc_table *cocoa_misc_table;
-extern NSString * const kCookiesFileOption;
-extern NSString * const kURLsFileOption;
-extern NSString * const kHotlistFileOption;
-extern NSString * const kHomepageURLOption;
-extern NSString * const kOptionsFileOption;
-extern NSString * const kAlwaysCancelDownload;
-extern NSString * const kAlwaysCloseMultipleTabs;
+extern NSString *const kCookiesFileOption;
+extern NSString *const kURLsFileOption;
+extern NSString *const kHotlistFileOption;
+extern NSString *const kHomepageURLOption;
+extern NSString *const kOptionsFileOption;
+extern NSString *const kAlwaysCancelDownload;
+extern NSString *const kAlwaysCloseMultipleTabs;
-void cocoa_autorelease( void );
+void cocoa_autorelease(void);
nserror cocoa_warning(const char *warning, const char *detail);
diff --git a/frontends/cocoa/plotter.h b/frontends/cocoa/plotter.h
index ce4865336..be76d0acf 100644
--- a/frontends/cocoa/plotter.h
+++ b/frontends/cocoa/plotter.h
@@ -24,10 +24,10 @@
extern const struct plotter_table cocoa_plotters;
-NSColor *cocoa_convert_colour( colour clr );
+NSColor *cocoa_convert_colour(colour clr);
-void cocoa_update_scale_factor( void );
+void cocoa_update_scale_factor(void);
-void cocoa_set_clip( NSRect rect );
+void cocoa_set_clip(NSRect rect);
#endif