Example #1
0
 /// <summary>
 /// <para>Construct a new clipboard, associated with a particular
 /// screen and selection name.</para>
 /// </summary>
 ///
 /// <param name="screen">
 /// <para>The screen to attach the clipboard to, or <see langword="null"/>
 /// to use the default screen.</para>
 /// </param>
 ///
 /// <param name="name">
 /// <para>The name of the selection to use for clipboard access.
 /// This is usually <c>PRIMARY</c> for the X selection or
 /// <c>CLIPBOARD</c> for the explicit copy/cut/paste clipboard.</para>
 /// </param>
 ///
 /// <exception cref="T:System.ArgumentNullException">
 /// <para>The <paramref name="name"/> parameter is
 /// <see langword="null"/>.</para>
 /// </exception>
 public Clipboard(Screen screen, String name)
     : base(TopLevelWindow.GetRoot(screen), -1, -1, 1, 1)
 {
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     try
     {
         IntPtr display = dpy.Lock();
         this.name = Xlib.XInternAtom
                         (display, name, XBool.False);
         this.targets = Xlib.XInternAtom
                            (display, "TARGETS", XBool.False);
     }
     finally
     {
         dpy.Unlock();
     }
 }
Example #2
0
 /// <summary>
 /// <para>Constructs a new <see cref="T:Xsharp.PopupWindow"/>
 /// instance.</para>
 /// </summary>
 ///
 /// <param name="screen">
 /// <para>The screen to display the window on, or <see langword="null"/>
 /// to use the default screen of the primary display.</para>
 /// </param>
 ///
 /// <param name="x">
 /// <para>The X position of the new window.</para>
 /// </param>
 ///
 /// <param name="y">
 /// <para>The Y position of the new window.</para>
 /// </param>
 ///
 /// <param name="width">
 /// <para>The width of the new window.</para>
 /// </param>
 ///
 /// <param name="height">
 /// <para>The height of the new window.</para>
 /// </param>
 ///
 /// <exception cref="T:Xsharp.XException">
 /// <para>Raised if any of the parameters are out of range.</para>
 /// </exception>
 public PopupWindow(Screen screen, int x, int y, int width, int height)
     : base(TopLevelWindow.GetRoot(screen), x, y, width, height)
 {
     // Nothing to do here.
 }
Example #3
0
 /// <summary>
 /// <para>Constructs a new <see cref="T:Xsharp.PopupWindow"/>
 /// instance.</para>
 /// </summary>
 ///
 /// <param name="x">
 /// <para>The X position of the new window.</para>
 /// </param>
 ///
 /// <param name="y">
 /// <para>The Y position of the new window.</para>
 /// </param>
 ///
 /// <param name="width">
 /// <para>The width of the new window.</para>
 /// </param>
 ///
 /// <param name="height">
 /// <para>The height of the new window.</para>
 /// </param>
 ///
 /// <exception cref="T:Xsharp.XException">
 /// <para>Raised if any of the parameters are out of range.</para>
 /// </exception>
 ///
 /// <summary>
 /// <para>This version of the constructor creates the window on
 /// the default screen of the primary display.</para>
 /// </summary>
 public PopupWindow(int x, int y, int width, int height)
     : base(TopLevelWindow.GetRoot(null), x, y, width, height)
 {
     // Nothing to do here.
 }