예제 #1
0
파일: App.cs 프로젝트: swgshaw/f-spot
        public Unique.Response SendMessage(Unique.Command command_id, Unique.MessageData message_data)
        {
            int raw_ret = unique_app_send_message(Handle, (int)command_id, message_data == null ? IntPtr.Zero : message_data.Handle);

            Unique.Response ret = (Unique.Response)raw_ret;
            return(ret);
        }
예제 #2
0
파일: App.cs 프로젝트: swgshaw/f-spot
 static int messagereceived_cb(IntPtr app, int command, IntPtr message_data, uint time_)
 {
     try {
         App             app_managed = GLib.Object.GetObject(app, false) as App;
         Unique.Response raw_ret     = app_managed.OnMessageReceived(command, message_data == IntPtr.Zero ? null : (Unique.MessageData)GLib.Opaque.GetOpaque(message_data, typeof(Unique.MessageData), false), time_);
         return((int)raw_ret);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call doesn't return
         throw e;
     }
 }
예제 #3
0
파일: App.cs 프로젝트: swgshaw/f-spot
 protected virtual Unique.Response OnMessageReceived(int command, Unique.MessageData message_data, uint time_)
 {
     GLib.Value      ret             = new GLib.Value(Unique.ResponseGType.GType);
     GLib.ValueArray inst_and_params = new GLib.ValueArray(4);
     GLib.Value[]    vals            = new GLib.Value [4];
     vals [0] = new GLib.Value(this);
     inst_and_params.Append(vals [0]);
     vals [1] = new GLib.Value(command);
     inst_and_params.Append(vals [1]);
     vals [2] = new GLib.Value(message_data);
     inst_and_params.Append(vals [2]);
     vals [3] = new GLib.Value(time_);
     inst_and_params.Append(vals [3]);
     g_signal_chain_from_overridden(inst_and_params.ArrayPtr, ref ret);
     foreach (GLib.Value v in vals)
     {
         v.Dispose();
     }
     Unique.Response result = (Unique.Response)(Enum) ret;
     ret.Dispose();
     return(result);
 }