Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.h
changeset 765:4cd066048203
prev755:ab873907b00e
next770:429ff505c450
author nkeynes
date Wed Jul 23 11:11:30 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Cocoa preferences panel work-in-progress
file annotate diff log raw
nkeynes@681
     1
/**
nkeynes@681
     2
 * $Id$
nkeynes@681
     3
 *
nkeynes@681
     4
 * Core Cocoa-based user interface
nkeynes@681
     5
 *
nkeynes@681
     6
 * Copyright (c) 2008 Nathan Keynes.
nkeynes@681
     7
 *
nkeynes@681
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@681
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@681
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@681
    11
 * (at your option) any later version.
nkeynes@681
    12
 *
nkeynes@681
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@681
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@681
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@681
    16
 * GNU General Public License for more details.
nkeynes@681
    17
 */
nkeynes@681
    18
nkeynes@736
    19
#ifndef lxdream_cocoaui_H
nkeynes@736
    20
#define lxdream_cocoaui_H
nkeynes@736
    21
nkeynes@681
    22
#import <AppKit/AppKit.h>
nkeynes@755
    23
#include "lxdream.h"
nkeynes@755
    24
#include "gettext.h"
nkeynes@681
    25
nkeynes@736
    26
#ifdef __cplusplus
nkeynes@736
    27
extern "C" {
nkeynes@736
    28
#endif
nkeynes@736
    29
    
nkeynes@681
    30
#define NS_(x) [NSString stringWithUTF8String: _(x)]
nkeynes@681
    31
nkeynes@765
    32
/* Standard sizing */
nkeynes@765
    33
#define TEXT_HEIGHT 22
nkeynes@765
    34
#define LABEL_HEIGHT 17
nkeynes@765
    35
#define TEXT_GAP 10
nkeynes@765
    36
    
nkeynes@681
    37
NSWindow *cocoa_gui_create_main_window();
nkeynes@691
    38
NSMenu *cocoa_gdrom_menu_new();
nkeynes@681
    39
NSView *video_osx_create_drawable();
nkeynes@765
    40
void cocoa_gui_show_preferences();
nkeynes@681
    41
nkeynes@681
    42
@interface LxdreamMainWindow : NSWindow 
nkeynes@681
    43
{
nkeynes@681
    44
    NSView *video;
nkeynes@681
    45
    NSTextField *status;
nkeynes@681
    46
    BOOL isGrabbed;
nkeynes@681
    47
}
nkeynes@681
    48
- (id)initWithContentRect:(NSRect)contentRect;
nkeynes@681
    49
- (void)setStatusText:(const gchar *)text;
nkeynes@681
    50
- (void)setRunning:(BOOL)isRunning;
nkeynes@681
    51
- (BOOL)isGrabbed;
nkeynes@681
    52
- (void)setIsGrabbed:(BOOL)grab;
nkeynes@681
    53
@end
nkeynes@681
    54
nkeynes@765
    55
@interface LxdreamPrefsPane : NSView
nkeynes@765
    56
{
nkeynes@765
    57
    int headerHeight;
nkeynes@765
    58
}
nkeynes@765
    59
- (id)initWithFrame: (NSRect)frameRect title:(NSString *)title;
nkeynes@765
    60
/**
nkeynes@765
    61
 * Create a text label and add it to the pane
nkeynes@765
    62
 */
nkeynes@765
    63
- (NSTextField *)addLabel: (NSString *)text withFrame: (NSRect)frame;
nkeynes@765
    64
- (int)contentHeight;
nkeynes@765
    65
@end
nkeynes@765
    66
nkeynes@725
    67
@interface LxdreamPrefsPanel : NSPanel
nkeynes@725
    68
{
nkeynes@765
    69
    NSArray *toolbar_ids;
nkeynes@765
    70
    NSArray *toolbar_defaults;
nkeynes@765
    71
    NSDictionary *toolbar_items;
nkeynes@765
    72
    NSView *path_pane, *ctrl_pane;
nkeynes@725
    73
}
nkeynes@725
    74
- (id)initWithContentRect:(NSRect)contentRect;
nkeynes@725
    75
@end
nkeynes@681
    76
nkeynes@765
    77
@interface LxdreamPrefsPathPane: LxdreamPrefsPane 
nkeynes@765
    78
{
nkeynes@765
    79
}
nkeynes@765
    80
+ (LxdreamPrefsPathPane *)new;
nkeynes@765
    81
@end
nkeynes@765
    82
nkeynes@765
    83
@interface LxdreamPrefsControllerPane: LxdreamPrefsPane
nkeynes@765
    84
{
nkeynes@765
    85
    struct maple_device *save_controller[4];
nkeynes@765
    86
}
nkeynes@765
    87
+ (LxdreamPrefsControllerPane *)new;
nkeynes@765
    88
@end
nkeynes@765
    89
nkeynes@736
    90
#ifdef __cplusplus
nkeynes@736
    91
}
nkeynes@736
    92
#endif
nkeynes@736
    93
    
nkeynes@681
    94
#endif /* lxdream_cocoaui_H */
.