Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.h
changeset 1036:af7b0c5905dd
prev1028:f99eeaf084c2
next1072:d82e04e6d497
author nkeynes
date Sun Jun 28 07:50:41 2009 +0000 (14 years ago)
permissions -rw-r--r--
last change Update debian changelog
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 "gui.h"
    25 #include "gettext.h"
    27 #ifdef __cplusplus
    28 extern "C" {
    29 #endif
    31 #define NS_(x) [NSString stringWithUTF8String: _(x)]
    33 /* Standard sizing */
    34 #define TEXT_HEIGHT 22
    35 #define LABEL_HEIGHT 17
    36 #define TEXT_GAP 10
    38 /**
    39  * Convenience method to create a new text label in the specified parent.
    40  */
    41 NSTextField *cocoa_gui_add_label(NSView *parent, NSString *title, NSRect frame);
    43 @interface LxdreamVideoView : NSView
    44 {
    45     BOOL isGrabbed;
    46     id delegate;
    47 }
    48 - (void) setDelegate: (id)other;
    49 - (id)delegate;
    50 - (void) setIsGrabbed: (BOOL)grabbed;
    51 @end
    53 @interface LxdreamMainWindow : NSWindow 
    54 {
    55     LxdreamVideoView *video;
    56     NSTextField *status;
    57     BOOL isGrabbed;
    58     BOOL useGrab;
    59     BOOL isFullscreen;
    60     NSRect savedFrame;
    61 }
    62 - (id)initWithContentRect:(NSRect)contentRect;
    63 - (void)setStatusText:(const gchar *)text;
    64 - (void)updateTitle;
    65 - (void)setRunning:(BOOL)isRunning;
    66 - (BOOL)isGrabbed;
    67 - (void)setIsGrabbed:(BOOL)grab;
    68 - (void)setUseGrab: (BOOL)grab;
    69 - (BOOL)isFullscreen;
    70 - (void)setFullscreen: (BOOL)fs;
    71 @end
    73 @interface LxdreamPrefsPane : NSView
    74 {
    75     int headerHeight;
    76 }
    77 - (id)initWithFrame: (NSRect)frameRect title:(NSString *)title;
    78 - (int)contentHeight;
    79 @end
    81 @interface KeyBindingEditor: NSTextView
    82 {
    83     BOOL isPrimed;
    84     NSString *lastValue;
    85 }
    86 @end
    88 @interface KeyBindingField : NSTextField
    89 {
    90 }
    91 @end
    93 @interface LxdreamPrefsPanel : NSPanel
    94 {
    95     NSArray *toolbar_ids;
    96     NSArray *toolbar_defaults;
    97     NSDictionary *toolbar_items;
    98     NSView *path_pane, *ctrl_pane;
    99     KeyBindingEditor *binding_editor;
   100 }
   101 - (id)initWithContentRect:(NSRect)contentRect;
   102 @end
   105 LxdreamMainWindow *cocoa_gui_create_main_window();
   106 NSMenu *cocoa_gdrom_menu_new();
   107 NSView *video_osx_create_drawable();
   108 void cocoa_gui_show_preferences();
   109 NSView *cocoa_gui_create_prefs_controller_pane();
   110 NSView *cocoa_gui_create_prefs_path_pane();
   113 #ifdef __cplusplus
   114 }
   115 #endif
   117 #endif /* lxdream_cocoaui_H */
.