/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Common class for all XEmbed protocol participating classes.
* Contains constant definitions and helper routines.
*/
public class XEmbedHelper {
/* XEMBED messages */
/* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
// A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
/* Details for XEMBED_FOCUS_IN: */
// Modifiers bits
XEmbedHelper() {
if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbed.toString());
}
if (XEmbedInfo == null) {
if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
}
}
}
try {
if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg));
}
finally {
}
}
switch (msg_id) {
case XEMBED_EMBEDDED_NOTIFY:
return "XEMBED_EMBEDDED_NOTIFY";
case XEMBED_WINDOW_ACTIVATE:
return "XEMBED_WINDOW_ACTIVATE";
case XEMBED_WINDOW_DEACTIVATE:
return "XEMBED_WINDOW_DEACTIVATE";
case XEMBED_FOCUS_IN:
return "XEMBED_FOCUS_IN";
case XEMBED_FOCUS_OUT:
return "XEMBED_FOCUS_OUT";
case XEMBED_REQUEST_FOCUS:
return "XEMBED_REQUEST_FOCUS";
case XEMBED_FOCUS_NEXT:
return "XEMBED_FOCUS_NEXT";
case XEMBED_FOCUS_PREV:
return "XEMBED_FOCUS_PREV";
case XEMBED_MODALITY_ON:
return "XEMBED_MODALITY_ON";
case XEMBED_MODALITY_OFF:
return "XEMBED_MODALITY_OFF";
return "XEMBED_REGISTER_ACCELERATOR";
return "XEMBED_UNREGISTER_ACCELERATOR";
return "XEMBED_ACTIVATE_ACCELERATOR";
case XEMBED_GRAB_KEY:
return "XEMBED_GRAB_KEY";
case XEMBED_UNGRAB_KEY:
return "XEMBED_UNGRAB_KEY";
return "NON_STANDARD_XEMBED_GTK_UNGRAB_KEY";
return "NON_STANDARD_XEMBED_GTK_GRAB_KEY";
return "KeyPress";
return "MapNotify";
return "PropertyNotify";
default:
return "unknown XEMBED id " + msg_id;
}
}
switch(focus_id) {
case XEMBED_FOCUS_CURRENT:
return "XEMBED_FOCUS_CURRENT";
case XEMBED_FOCUS_FIRST:
return "XEMBED_FOCUS_FIRST";
case XEMBED_FOCUS_LAST:
return "XEMBED_FOCUS_LAST";
default:
return "unknown focus id " + focus_id;
}
}
return ("XEmbed message to " + Long.toHexString(msg.get_window()) + ": " + msgidToString((int)msg.get_data(1)) +
}
/**
* Converts XEMBED modifiers mask into AWT InputEvent mask
*/
int mods = 0;
}
}
}
// FIXME: Experiments show that SUPER is ALT. So what is Alt then?
}
// if ((state & XEMBED_MODIFIER_HYPER) != 0) {
// mods |= InputEvent.DOWN_MASK;
// }
return mods;
}
// Shouldn't be called on Toolkit thread.
int keycode;
try {
}else{
}
} finally {
}
}
}