Esempio n. 1
0
        public static void Finalize(IntPtr measurePtr)
        {
            RainmeterSkinHandler skinHandler = RainmeterSkinHandler.GetSkinHandlerByMeasurePtr(measurePtr);

            skinHandler.M_Finalize(measurePtr);

            if (measurePtr != IntPtr.Zero)
            {
                GCHandle.FromIntPtr(measurePtr).Free();
            }

            RainmeterSkinHandler.RemoveMeasurePtr(measurePtr);

            if (StringBuffer != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(StringBuffer);
                StringBuffer = IntPtr.Zero;
            }
        }
Esempio n. 2
0
        public static IntPtr GetString(IntPtr measurePtr)
        {
            RainmeterSkinHandler skinHandler = RainmeterSkinHandler.GetSkinHandlerByMeasurePtr(measurePtr);

            if (StringBuffer != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(StringBuffer);
                StringBuffer = IntPtr.Zero;
            }

            string stringValue = skinHandler.M_GetString(measurePtr);

            if (stringValue != null)
            {
                StringBuffer = Marshal.StringToHGlobalUni(stringValue);
            }

            return(StringBuffer);
        }
Esempio n. 3
0
        public static void ExecuteBang(IntPtr measurePtr, IntPtr argsPtr)
        {
            RainmeterSkinHandler skinHandler = RainmeterSkinHandler.GetSkinHandlerByMeasurePtr(measurePtr);

            skinHandler.M_ExecuteBang(measurePtr, Marshal.PtrToStringUni(argsPtr));
        }
Esempio n. 4
0
        public static double Update(IntPtr measurePtr)
        {
            RainmeterSkinHandler skinHandler = RainmeterSkinHandler.GetSkinHandlerByMeasurePtr(measurePtr);

            return(skinHandler.M_GetNumeric(measurePtr));
        }
Esempio n. 5
0
        public static void Reload(IntPtr measurePtr, IntPtr apiPtr, ref double maxValue)
        {
            RainmeterSkinHandler skinHandler = RainmeterSkinHandler.GetSkinHandlerByMeasurePtr(measurePtr);

            skinHandler.M_Reload(measurePtr, new RainmeterAPI(apiPtr), ref maxValue);
        }