示例#1
0
  /**
   * @see <a href="XGetWMHints.html">XGetWMHints</a>
   * @see #property(bool, Atom, Atom, int, int)
   */
  public WMHints wm_hints () {
    PropertyReply pi = property (false, Atom.WM_HINTS, Atom.WM_HINTS, 0, 8);
    
    if (pi.format () != 32 || pi.type_id () != Atom.WM_HINTS.id
      || pi.Length() != 8) return null;

    return new WMHints (pi);
  }
示例#2
0
  /**
   * @see <a href="XGetWMName.html">XGetWMName</a>
   * @see #property(bool, Atom, Atom, int, int)
   */
  public String wm_name () {
    PropertyReply pi = property (false, Atom.WM_NAME, 
      Atom.STRING, 0, MAX_WM_LENGTH); // support other types?

    if (pi.format () != 8 || pi.type_id () != Atom.STRING.id) 
      return null;

    return pi.read_string (32, pi.Length());
  }
示例#3
0
  /**
   * @see <a href="XGetClassHint.html">XGetClassHint</a>
   * @see #property(bool, Atom, Atom, int, int)
   */
  public WMClassHint wm_class_hint () {
    PropertyReply pi = property (false, Atom.WM_CLASS, 
      Atom.STRING, 0, MAX_WM_LENGTH); // support other types?

    if (pi.format () != 8 || pi.type_id () != Atom.STRING.id)
      return null;

    return new WMClassHint (pi);
  }
示例#4
0
  /** 
   * @see #property(bool, Atom, Atom, int, int)
   */
  public WMState wm_state () {
    Atom wm_state = (Atom) Atom.intern (display, "WM_STATE");    
    PropertyReply pi = property (false, wm_state, wm_state, 0, 2);

    if (pi.format () != 32 
      || pi.type_id () != wm_state.id
      || pi.Length() != 2) return null;

    return new WMState (display, pi);
  }
示例#5
0
  /**
   * @see <a href="XGetWMNormalHints.html">XGetWMNormalHints</a>
   * @see #property(bool, Atom, Atom, int, int)
   */
  public WMSizeHints wm_normal_hints () {
    PropertyReply pi = property (false, Atom.WM_NORMAL_HINTS,
      Atom.WM_SIZE_HINTS, 0, 18);

    if (pi.format () != 32 
      || pi.type_id () != Atom.WM_SIZE_HINTS.id
      || pi.Length() != 18) return null;
   
    return new WMSizeHints (pi);
  }