Esempio n. 1
0
        // Call this function to determine if the parent skin is topmost
        public static bool ParentIsTopmost(Rainmeter.Settings.InstanceSettings Instance)
        {
            IntPtr     hwnd = (IntPtr)(UInt32.Parse(Rainmeter.PluginBridge("GetWindow", Rainmeter.PluginBridge("GetConfig", Instance.INI_File))));
            WINDOWINFO info = new WINDOWINFO(true);

            GetWindowInfo(hwnd, ref info);
            return((info.dwExStyle & 0x00000008L) > 0);
        }
Esempio n. 2
0
                public unsafe void Initialize(Settings _PluginSettings, char *iniFile, char *section, UInt32 id)
                {
                    this.PluginSettings = _PluginSettings;
                    this._ID            = id;
                    this._INI_File      = new string(iniFile);
                    this._Section       = new string(section);

                    this.ConfigName = Rainmeter.PluginBridge("GetConfig", this.INI_File);
                }
Esempio n. 3
0
        public static int ConfigWidth(string sSkin)
        {
            IntPtr hwnd = (IntPtr)(UInt32.Parse(Rainmeter.PluginBridge("GetWindow", sSkin)));
            RECT   rct;

            if (!GetWindowRect(hwnd, out rct))
            {
                Rainmeter.Log(LogLevel.Error, "Rainmeter told us the HWND for window '" + sSkin + "' is " + hwnd.ToInt32().ToString() + "L, but couldn't receive a proper RECT from it");
                return(0);
            }
            return(rct.Right - rct.Left);
        }
Esempio n. 4
0
        public static int ConfigY(Rainmeter.Settings.InstanceSettings Instance)
        {
            IntPtr hwnd = (IntPtr)(UInt32.Parse(Rainmeter.PluginBridge("GetWindow", Rainmeter.PluginBridge("GetConfig", Instance.INI_File))));
            RECT   rct;

            if (!GetWindowRect(hwnd, out rct))
            {
                Rainmeter.Log(LogLevel.Error, "Rainmeter told us the HWND for window '" + Rainmeter.PluginBridge("GetConfig", Instance.INI_File) + "' is " + hwnd.ToInt32().ToString() + "L, but couldn't receive a proper RECT from it");
                return(0);
            }
            return(rct.Top);
        }
Esempio n. 5
0
 public string SetVariable(string sVariable, object oData)
 {
     return(Rainmeter.PluginBridge("SetVariable", "\"" + this.ConfigName + "\" " + sVariable.Trim() + " \"" + oData.ToString().Trim() + "\""));
 }
Esempio n. 6
0
 public string GetVariable(string sVariable)
 {
     return(Rainmeter.PluginBridge("GetVariable", "\"" + this.ConfigName + "\" " + sVariable.Trim() + ""));
 }
Esempio n. 7
0
 public static IntPtr GetConfigWindow(Rainmeter.Settings.InstanceSettings Instance)
 {
     return((IntPtr)(UInt32.Parse(Rainmeter.PluginBridge("GetWindow", Rainmeter.PluginBridge("GetConfig", Instance.INI_File)))));
 }