gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/gui aqua.cpp


From: Markus Gothe
Subject: [Gnash-commit] gnash/gui aqua.cpp
Date: Tue, 24 Jul 2007 13:41:34 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  07/07/24 13:41:34

Modified files:
        gui            : aqua.cpp 

Log message:
        Fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua.cpp?cvsroot=gnash&r1=1.19&r2=1.20

Patches:
Index: aqua.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/aqua.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- aqua.cpp    24 Jul 2007 13:04:42 -0000      1.19
+++ aqua.cpp    24 Jul 2007 13:41:34 -0000      1.20
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: aqua.cpp,v 1.19 2007/07/24 13:04:42 nihilus Exp $ */
+/* $Id: aqua.cpp,v 1.20 2007/07/24 13:41:34 nihilus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -42,11 +42,9 @@
 
 #include <Carbon/Carbon.h>
 
-ToolboxObjectClassRef customWindow;
 WindowRef myWindow;
-WindowDefSpec myCustomWindowSpec;
 EventHandlerUPP myCustomWindowUPP;
-Rect theBounds = {200,200,400,400};
+Rect theBounds;
  
 EventTypeSpec eventList[] = {{kEventClassWindow, kEventWindowDrawFrame},
                             {kEventClassWindow, kEventWindowHitTest}};
@@ -67,7 +65,7 @@
     Rect windBounds;
  
     whatHappened = GetEventKind (theEvent);
- 
+       GNASH_REPORT_FUNCTION; 
     switch (whatHappened)
     {
         case kEventWindowInit:
@@ -127,6 +125,12 @@
 bool AquaGui::run()
 {
        GNASH_REPORT_FUNCTION;
+       CreateNewWindow (kDocumentWindowClass,
+                        kWindowStandardDocumentAttributes 
+                       | kWindowStandardHandlerAttribute
+                       | kWindowInWindowMenuAttribute,
+                       &theBounds,
+                       &myWindow);
     ShowWindow(myWindow);
     RunApplicationEventLoop();
     return true;
@@ -152,19 +156,6 @@
   
        GNASH_REPORT_FUNCTION;
        
-       myCustomWindowUPP = NewEventHandlerUPP(MyCustomWindowEventHandler);
- 
-       RegisterToolboxObjectClass(CFSTR("com.myCompany.myApp.customWindow"),   
// 2
-                                                               NULL, 
GetEventTypeCount(eventList), eventList,
-                                       myCustomWindowUPP, NULL, &customWindow);
- 
-       myCustomWindowSpec.defType = kWindowDefObjectClass; // 3
-       myCustomWindowSpec.u.classRef = customWindow; // 4
- 
-       CreateCustomWindow (&myCustomWindowSpec,kMovableModalWindowClass,       
// 5
-                       kWindowStandardHandlerAttribute,
-                       &theBounds,
-                       &myWindow);
 #if 0                    
        _glue.init(argc, argv);
 
@@ -205,8 +196,8 @@
 bool AquaGui::createWindow(const char* title, int width, int height)
 {
        GNASH_REPORT_FUNCTION;
-       theBounds.top = height;
-       theBounds.right = width;
+
+       SetRect(&theBounds, 0, 0, width, height);
        _glue.prepDrawingArea(_width, _height);
     set_render_handler(_renderer);
     return true;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]