[Top][All Lists]
[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: |
Wed, 25 Jul 2007 00:32:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 07/07/25 00:32:03
Modified files:
gui : aqua.cpp
Log message:
Fixes
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua.cpp?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: aqua.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/aqua.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- aqua.cpp 24 Jul 2007 14:18:08 -0000 1.22
+++ aqua.cpp 25 Jul 2007 00:32:02 -0000 1.23
@@ -18,7 +18,7 @@
//
//
-/* $Id: aqua.cpp,v 1.22 2007/07/24 14:18:08 nihilus Exp $ */
+/* $Id: aqua.cpp,v 1.23 2007/07/25 00:32:02 nihilus Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -44,6 +44,12 @@
WindowRef myWindow;
+pascal OSStatus DoWindowClose (EventHandlerCallRef nextHandler,
+ EventRef theEvent,
+ void* userData){
+ exit(0);
+}
+
namespace gnash {
AquaGui::AquaGui(unsigned long xid, float scale, bool loop, unsigned int depth)
@@ -65,7 +71,7 @@
{
GNASH_REPORT_FUNCTION;
- RepositionWindow(myWindow, NULL, kWindowCascadeOnMainScreen);
+ RepositionWindow(myWindow, NULL, kWindowCenterOnMainScreen);
ShowWindow(myWindow);
RunApplicationEventLoop();
return true;
@@ -90,7 +96,7 @@
{
GNASH_REPORT_FUNCTION;
-
+ InitCursor();
#if 0
_glue.init(argc, argv);
@@ -133,6 +139,8 @@
CFStringRef windowTitle;
OSStatus result;
Rect theBounds;
+ EventTypeSpec eventType; // Specifier for event type
+ EventHandlerUPP handlerUPP; // Pointer to event
handler routine
GNASH_REPORT_FUNCTION;
@@ -140,6 +148,8 @@
CreateNewWindow (kDocumentWindowClass,
kWindowStandardDocumentAttributes
| kWindowStandardHandlerAttribute
+ | kWindowMetalAttribute
+ | kWindowCompositingAttribute
| kWindowInWindowMenuAttribute,
&theBounds,
&myWindow);
@@ -148,6 +158,14 @@
result = SetWindowTitleWithCFString(myWindow, windowTitle);
CFRelease (windowTitle);
+ createMenu();
+
+ eventType.eventClass = kEventClassWindow; // Set event class
+ eventType.eventKind = kEventWindowClose; // Set event kind
+ handlerUPP = NewEventHandlerUPP(DoWindowClose); // Point to handler
+ InstallWindowEventHandler (myWindow, handlerUPP, // Install handler
+ 1, &eventType,
+ NULL, NULL);
_glue.prepDrawingArea(_width, _height);
set_render_handler(_renderer);
return true;
@@ -155,11 +173,21 @@
bool AquaGui::createMenu()
{
+ MenuRef specialmenuRef;
+
+ GNASH_REPORT_FUNCTION;
+
+ CreateNewMenu(202, 0, &specialmenuRef); // 202 is an arbitrary ID
+ SetMenuTitleWithCFString(specialmenuRef, CFSTR("Special"));
+ InsertMenu(specialmenuRef, 0);
+
return true;
}
bool AquaGui::setupEvents()
{
+ GNASH_REPORT_FUNCTION;
+
return true;
}
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/23
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/24
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/24
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/24
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/24
- [Gnash-commit] gnash/gui aqua.cpp,
Markus Gothe <=
- [Gnash-commit] gnash/gui aqua.cpp, Markus Gothe, 2007/07/26