12 #include <gwenhywfar/gwenhywfar.h>
13 #include <gwenhywfar/gui.h>
14 #include <gwenhywfar/dialog.h>
15 #include <gwenhywfar/debug.h>
20 #import <Foundation/Foundation.h>
21 #import <AppKit/AppKit.h>
27 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
45 - (void)windowWillClose:(NSNotification *)notification {
49 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
53 NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 200.0, 200.0) styleMask:NSTitledWindowMask|NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES];
54 [window setDelegate:self];
55 [window makeKeyAndOrderFront:nil];
66 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
80 NSLog(
@"GWEN Gui initialized");
91 NSLog(
@"Cocoa Gui set");
95 fprintf(stderr,
"Could not create dialog.\n");
102 fprintf(stderr,
"Result: %d\n", rv);
205 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
207 NSLog(
@"Cocoa-Test");
208 NSString *cocoa_string =
@"Das ist ein Cocoa String";
218 int main(
int argc,
char **argv) {
219 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
220 NSApplication *app = [NSApplication sharedApplication];
222 NSMenu *menu = [[NSMenu alloc] initWithTitle:@"Testprogramm"];
223 [menu addItemWithTitle:@"Quit" action:@selector(windowWillClose:) keyEquivalent:@"Q"];
224 [app setDelegate:app_delegate];
225 [app setMainMenu:menu];