Ejemplo n.º 1
0
 internal WidgetApplication(WidgetApplication widgetApplication) : this(NDalicManualPINVOKE.new_WidgetApplication__SWIG_1(WidgetApplication.getCPtr(widgetApplication)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 2
0
 internal WidgetApplication(WidgetApplication widgetApplication) : this(Interop.WidgetApplication.NewWidgetApplication(WidgetApplication.getCPtr(widgetApplication)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 3
0
        internal WidgetApplication Assign(WidgetApplication widgetApplication)
        {
            WidgetApplication ret = new WidgetApplication(Interop.WidgetApplication.Assign(SwigCPtr, WidgetApplication.getCPtr(widgetApplication)), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 4
0
        internal static WidgetApplication GetWidgetApplicationFromPtr(global::System.IntPtr cPtr)
        {
            WidgetApplication ret = new WidgetApplication(cPtr, false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 5
0
        public static WidgetApplication NewWidgetApplication(string[] args, string stylesheet)
        {
            WidgetApplication ret = New(args, stylesheet);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            instance = ret;
            return(ret);
        }
Ejemplo n.º 6
0
        public static WidgetApplication New(string[] args, string stylesheet)
        {
            int    argc    = args.Length;
            string argvStr = string.Join(" ", args);

            WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_New(argc, argvStr, stylesheet), true);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 7
0
        private void OnMemoryLow(IntPtr widgetApplication)
        {
            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();

            if (widgetApplication != null)
            {
                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
            }

            if (_memoryLowEventHandler != null)
            {
                _memoryLowEventHandler(this, e);
            }
        }
Ejemplo n.º 8
0
        private void OnRegionChanged(IntPtr widgetApplication)
        {
            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();

            if (widgetApplication != null)
            {
                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
            }

            if (_regionChangedEventHandler != null)
            {
                _regionChangedEventHandler(this, e);
            }
        }
Ejemplo n.º 9
0
        private void OnTerminate(IntPtr widgetApplication)
        {
            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();

            if (widgetApplication != null)
            {
                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
            }

            if (_terminateEventHandler != null)
            {
                _terminateEventHandler(this, e);
            }
        }
Ejemplo n.º 10
0
        public static WidgetApplication New(string[] args, string stylesheet)
        {
            int    argc    = args.Length;
            string argvStr = string.Join(" ", args);

            IntPtr widgetIntPtr = Interop.WidgetApplication.New(argc, argvStr, stylesheet);

            WidgetApplication ret = new WidgetApplication(widgetIntPtr, false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }

            return(ret);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Run Application.
        /// </summary>
        /// <param name="args">Arguments from commandline.</param>
        public void Run(string[] args)
        {
            args[0]      = Tizen.Applications.Application.Current.ApplicationInfo.ExecutablePath;
            _application = WidgetApplication.NewWidgetApplication(args, _stylesheet);

            TizenSynchronizationContext.Initialize();
            _application.BatteryLow      += OnBatteryLow;
            _application.LanguageChanged += OnLanguageChanged;
            _application.MemoryLow       += OnMemoryLow;
            _application.RegionChanged   += OnRegionChanged;;

            _application.Init      += OnInit;
            _application.Terminate += OnTerminate;

            _application.MainLoop();
        }
Ejemplo n.º 12
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplication obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr);
 }