예제 #1
0
        private static CSWindow CreateWin32(Gdk.Window gdkWindow)
        {
            NativeGdkWin.Gdk_window_ensure_native(gdkWindow.Handle);
            IntPtr windowHandle = NativeGdkWin.GetWindowHandle(gdkWindow.Handle);
            int    width;
            int    height;

            gdkWindow.GetSize(out width, out height);
            return(new CSWindow(windowHandle.ToInt32(), width, height, WindowHelp.GetStartupPath()));
        }
예제 #2
0
 public static CSWindow CreateCSWindow(Gdk.Window gdkWindow)
 {
     if (Platform.IsMac)
     {
         return(WindowHelp.CreateMac(gdkWindow));
     }
     if (Platform.IsWindows)
     {
         return(WindowHelp.CreateWin32(gdkWindow));
     }
     throw new NotImplementedException();
 }
예제 #3
0
        private static CSWindow CreateMac(Gdk.Window window)
        {
            WindowHelp.gdkWindow = window;
            IntPtr windowHandle = NativeGdkMac.GetWindowHandle(WindowHelp.gdkWindow.Handle);
            IntPtr nsViewHandle = NativeGdkMac.GetNSViewHandle(WindowHelp.gdkWindow.Handle);
            int    width;
            int    height;

            WindowHelp.gdkWindow.GetSize(out width, out height);
            string startupPath = WindowHelp.GetStartupPath();

            return(new CSWindow(windowHandle, nsViewHandle, width, height, startupPath));
        }
예제 #4
0
        public static CSWindow CreateCSWindow(Gdk.Window gdkWindow)
        {
            CSWindow result;

            if (Platform.IsMac)
            {
                result = WindowHelp.CreateMac(gdkWindow);
            }
            else
            {
                if (!Platform.IsWindows)
                {
                    throw new NotImplementedException();
                }
                result = WindowHelp.CreateWin32(gdkWindow);
            }
            return(result);
        }
예제 #5
0
 public static CSWindow CreateCSWindow(IntPtr windowHandle, int width, int height)
 {
     return(new CSWindow(windowHandle.ToInt32(), width, height, WindowHelp.GetStartupPath()));
 }