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
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();
    42 @interface LxdreamMainWindow : NSWindow 
    43 {
    44     NSView *video;
    45     NSTextField *status;
    46     BOOL isGrabbed;
    47 }
    48 - (id)initWithContentRect:(NSRect)contentRect;
    49 - (void)setStatusText:(const gchar *)text;
    50 - (void)setRunning:(BOOL)isRunning;
    51 - (BOOL)isGrabbed;
    52 - (void)setIsGrabbed:(BOOL)grab;
    53 @end
    55 @interface LxdreamPrefsPane : NSView
    56 {
    57     int headerHeight;
    58 }
    59 - (id)initWithFrame: (NSRect)frameRect title:(NSString *)title;
    60 /**
    61  * Create a text label and add it to the pane
    62  */
    63 - (NSTextField *)addLabel: (NSString *)text withFrame: (NSRect)frame;
    64 - (int)contentHeight;
    65 @end
    67 @interface LxdreamPrefsPanel : NSPanel
    68 {
    69     NSArray *toolbar_ids;
    70     NSArray *toolbar_defaults;
    71     NSDictionary *toolbar_items;
    72     NSView *path_pane, *ctrl_pane;
    73 }
    74 - (id)initWithContentRect:(NSRect)contentRect;
    75 @end
    77 @interface LxdreamPrefsPathPane: LxdreamPrefsPane 
    78 {
    79 }
    80 + (LxdreamPrefsPathPane *)new;
    81 @end
    83 @interface LxdreamPrefsControllerPane: LxdreamPrefsPane
    84 {
    85     struct maple_device *save_controller[4];
    86 }
    87 + (LxdreamPrefsControllerPane *)new;
    88 @end
    90 #ifdef __cplusplus
    91 }
    92 #endif
    94 #endif /* lxdream_cocoaui_H */
.