Example #1
0
        public static IList <string> GetUrlListFromEventRef(IntPtr eventRef)
        {
            AEDesc list = GetEventParameter <AEDesc> (eventRef, CarbonEventParameterName.DirectObject, CarbonEventParameterType.AEList);

            try {
                return(AppleEvent.GetUtf8StringListFromAEDesc(ref list, true));
            } finally {
                Carbon.CheckReturn((int)AppleEvent.AEDisposeDesc(ref list));
            }
        }
Example #2
0
 static CarbonEventHandlerStatus HandleOpenUrls(IntPtr callRef, IntPtr eventRef, IntPtr user_data)
 {
     try {
         var urls = Carbon.GetUrlListFromEventRef(eventRef);
         var args = new ApplicationUrlEventArgs(urls);
         openUrls(null, args);
         return(args.HandledStatus);
     } catch (Exception ex) {
         System.Console.WriteLine(ex);
         return(CarbonEventHandlerStatus.NotHandled);
     }
 }
Example #3
0
 public OSType(string fourcc)
 {
     value = Carbon.ConvertCharCode(fourcc);
 }