コード例 #1
0
        public virtual bool focus(int id)
        {
            // check if that window is focusable
            XWindow window = getWindow(id);

            if (window == null)
            {
                throw new System.Exception("Tried to focus(" + id
                                           + ") a null window.");
            }

            if (!XUtils.isSet(window.flags,
                              XStandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE))
            {
                // remove focus from previously focused window
                if (sFocusedWindow != null)
                {
                    unfocus(sFocusedWindow);
                }

                return(window.onFocus(true));
            }

            return(false);
        }
コード例 #2
0
 public virtual bool unfocus(XWindow window)
 {
     if (window == null)
     {
         throw new System.Exception(
                   "Tried to unfocus a null window.");
     }
     return(window.onFocus(false));
 }
コード例 #3
0
 public virtual bool unfocus(XWindow window)
 {
     if (window == null)
     {
         throw new System.Exception(
                 "Tried to unfocus a null window.");
     }
     return window.onFocus(false);
 }