Diff for /np2/macosx/toolwin.cpp between versions 1.10 and 1.12

version 1.10, 2003/11/12 19:06:33 version 1.12, 2003/11/21 16:01:41
Line 11 Line 11
 #include        "dialog.h"  #include        "dialog.h"
 #include        "soundmng.h"  #include        "soundmng.h"
 #include        "fdefine.h"  #include        "fdefine.h"
   #include        "mackbd.h"
   #include        "mousemng.h"
   #include        "pccore.h"
   #include        "iocore.h"
   
   
 enum {  enum {
Line 168  static PicHandle skinload(const char *pa Line 172  static PicHandle skinload(const char *pa
                         return(ret);                          return(ret);
                 }                  }
         }          }
         return(getBMPfromResource("np2tool", bounds, CFSTR("bmp")));          return(getBMPfromResource("np2tool.bmp", bounds));
 }  }
   
 // ----  // ----
Line 525  static pascal OSStatus cfWinproc(EventHa Line 529  static pascal OSStatus cfWinproc(EventHa
                         Draw1Control(sub);                          Draw1Control(sub);
                     }                      }
                 }                  }
                   err=noErr;
                 break;                  break;
                                   
             case kEventWindowFocusAcquired:              case kEventWindowFocusAcquired:
                 SelectWindow(hWndMain);                  BringToFront(hWndMain);
                   err = noErr;
                 break;                  break;
                                   
                                   
Line 536  static pascal OSStatus cfWinproc(EventHa Line 542  static pascal OSStatus cfWinproc(EventHa
                 break;                  break;
         }          }
     }      }
     else if (GetEventClass(event)==kEventClassKeyboard && GetEventKind(event)==kEventRawKeyDown) {      else if (GetEventClass(event)==kEventClassKeyboard) {
           static  UInt32  backup = 0;
           UInt32  whatHappened = GetEventKind(event);
           UInt32 key;
           GetEventParameter (event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &key);
         UInt32 modif;          UInt32 modif;
         GetEventParameter (event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modif);          GetEventParameter (event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modif);
         if (modif & cmdKey) {          switch (whatHappened)
             EventRecord eve;          {
             ConvertEventRefToEventRecord( event,&eve );              case kEventRawKeyUp:
             recieveCommand(MenuEvent(&eve));                  mackbd_keyup(key);
                   err = noErr;
                   break;
               case kEventRawKeyRepeat:
                   mackbd_keydown(key);
                   err = noErr;
                   break;
               case kEventRawKeyDown:
                   if (modif & cmdKey) {
                       EventRecord eve;
                       ConvertEventRefToEventRecord( event,&eve );
                       mousemng_disable(MOUSEPROC_MACUI);
                       recieveCommand(MenuEvent(&eve));
                       mousemng_enable(MOUSEPROC_MACUI);
                   }
                   else {
                       mackbd_keydown(key);
                   }
                   err = noErr;
                   break;
               case kEventRawKeyModifiersChanged:
                   if (modif & shiftKey) keystat_senddata(0x70);
                   else keystat_senddata(0x70 | 0x80);
                   if (modif & optionKey) keystat_senddata(0x73);
                   else keystat_senddata(0x73 | 0x80);
                   if (modif & controlKey) keystat_senddata(0x74);
                   else keystat_senddata(0x74 | 0x80);
                   if ((modif & alphaLock) != (backup & alphaLock)) {
                       keystat_senddata(0x71);
                       backup = modif;
                   }
                   err = noErr;
                   break;
               default: 
                   break;             
         }          }
     }      }
   
Line 757  static void openpopup(HIPoint location)  Line 801  static void openpopup(HIPoint location) 
     else {      else {
         switch (sel) {          switch (sel) {
             case 1:              case 1:
                 if(dialog_fileselect(fname, sizeof(fname), hWndMain)) {                  if(dialog_fileselect(fname, sizeof(fname), hWndMain, OPEN_INI)) {
                     if (file_getftype(fname)==FTYPE_TEXT) {                      if (file_getftype(fname)==FTYPE_TEXT) {
                         strcpy(np2tool.skin, fname);                          strcpy(np2tool.skin, fname);
                         skinchange(true);                          skinchange(true);

Removed from v.1.10  
changed lines
  Added in v.1.12


RetroPC.NET-CVS <cvs@retropc.net>