filename | src/cocoaui/cocoaui.h |
changeset | 770:429ff505c450 |
prev | 765:4cd066048203 |
next | 780:4e4ea322cb84 |
author | nkeynes |
date | Mon Jul 28 03:41:25 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Implement key-binding configuration pane for Cocoa UI Minor tweaks for consistency and static-correctness |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * Core Cocoa-based user interface
5 *
6 * Copyright (c) 2008 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 #ifndef lxdream_cocoaui_H
20 #define lxdream_cocoaui_H
22 #import <AppKit/AppKit.h>
23 #include "lxdream.h"
24 #include "gettext.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 #define NS_(x) [NSString stringWithUTF8String: _(x)]
32 /* Standard sizing */
33 #define TEXT_HEIGHT 22
34 #define LABEL_HEIGHT 17
35 #define TEXT_GAP 10
37 NSWindow *cocoa_gui_create_main_window();
38 NSMenu *cocoa_gdrom_menu_new();
39 NSView *video_osx_create_drawable();
40 void cocoa_gui_show_preferences();
41 NSView *cocoa_gui_create_prefs_controller_pane();
42 NSView *cocoa_gui_create_prefs_path_pane();
44 /**
45 * Convenience method to create a new text label in the specified parent.
46 */
47 NSTextField *cocoa_gui_add_label(NSView *parent, NSString *title, NSRect frame);
49 @interface LxdreamMainWindow : NSWindow
50 {
51 NSView *video;
52 NSTextField *status;
53 BOOL isGrabbed;
54 }
55 - (id)initWithContentRect:(NSRect)contentRect;
56 - (void)setStatusText:(const gchar *)text;
57 - (void)setRunning:(BOOL)isRunning;
58 - (BOOL)isGrabbed;
59 - (void)setIsGrabbed:(BOOL)grab;
60 @end
62 @interface LxdreamPrefsPane : NSView
63 {
64 int headerHeight;
65 }
66 - (id)initWithFrame: (NSRect)frameRect title:(NSString *)title;
67 - (int)contentHeight;
68 @end
70 @interface KeyBindingEditor: NSTextView
71 {
72 BOOL isPrimed;
73 NSString *lastValue;
74 }
75 @end
77 @interface KeyBindingField : NSTextField
78 {
79 }
80 @end
82 @interface LxdreamPrefsPanel : NSPanel
83 {
84 NSArray *toolbar_ids;
85 NSArray *toolbar_defaults;
86 NSDictionary *toolbar_items;
87 NSView *path_pane, *ctrl_pane;
88 KeyBindingEditor *binding_editor;
89 }
90 - (id)initWithContentRect:(NSRect)contentRect;
91 @end
93 #ifdef __cplusplus
94 }
95 #endif
97 #endif /* lxdream_cocoaui_H */
.