aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Hiller2013-04-09 13:56:24 (EDT)
committerGrant Gayed2013-04-15 11:00:30 (EDT)
commit90234dedb0caabf101c48075bed963f6aca9aa1c (patch)
treebc19cb2e94436666e9a2e4225da2105b2007520e
parent1dab71d3c9b9692b7d49dfc49fe6f287b236fb15 (diff)
downloadeclipse.platform.swt-90234dedb0caabf101c48075bed963f6aca9aa1c.zip
eclipse.platform.swt-90234dedb0caabf101c48075bed963f6aca9aa1c.tar.gz
eclipse.platform.swt-90234dedb0caabf101c48075bed963f6aca9aa1c.tar.bz2
Adding context menus.
The context menu handler now defers to CEF.java to see whether a context menu has been provided by the browser. If the browser has set a context menu that is displayed instead of the CEF one. Caveats: * I am defering to CEF.java using syncExec so that I can get find out whether the Browser has a menu then use this information back in the handler. I am doing this because the documentation explicitly requests that I do not hold a reference to the menu model or menu parameters outside of the handler method.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.c62
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.c11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.h11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.c257
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.h24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFClient.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFContextMenuHandler.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEF3.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFContextMenuParams.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFMenuModel.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_context_menu_params_t.java55
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_menu_model_t.java150
14 files changed, 663 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.c b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.c
index ebd1df6..1984b38 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.c
@@ -434,6 +434,18 @@ JNIEXPORT jint JNICALL CEF3_NATIVE(cef_1build_1revision)
}
#endif
+#ifndef NO_cef_1context_1menu_1params_1t_1sizeof
+JNIEXPORT jint JNICALL CEF3_NATIVE(cef_1context_1menu_1params_1t_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ CEF3_NATIVE_ENTER(env, that, cef_1context_1menu_1params_1t_1sizeof_FUNC);
+ rc = (jint)cef_context_menu_params_t_sizeof();
+ CEF3_NATIVE_EXIT(env, that, cef_1context_1menu_1params_1t_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_cef_1download_1item_1callback_1t_1sizeof
JNIEXPORT jint JNICALL CEF3_NATIVE(cef_1download_1item_1callback_1t_1sizeof)
(JNIEnv *env, jclass that)
@@ -698,6 +710,31 @@ fail:
}
#endif
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+ cef_context_menu_params_t _arg0, *lparg0=NULL;
+#ifndef JNI64
+ CEF3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II_FUNC);
+#else
+ CEF3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ_FUNC);
+#endif
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setcef_context_menu_params_tFields(env, arg0, lparg0);
+#ifndef JNI64
+ CEF3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II_FUNC);
+#else
+ CEF3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ_FUNC);
+#endif
+}
+#endif
+
#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2JJ) && defined(JNI64))
#ifndef JNI64
JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
@@ -798,6 +835,31 @@ fail:
}
#endif
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+ cef_menu_model_t _arg0, *lparg0=NULL;
+#ifndef JNI64
+ CEF3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II_FUNC);
+#else
+ CEF3_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ_FUNC);
+#endif
+ if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+ memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+ if (arg0 && lparg0) setcef_menu_model_tFields(env, arg0, lparg0);
+#ifndef JNI64
+ CEF3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II_FUNC);
+#else
+ CEF3_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ_FUNC);
+#endif
+}
+#endif
+
#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2JJ) && defined(JNI64))
#ifndef JNI64
JNIEXPORT void JNICALL CEF3_NATIVE(memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.h b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.h
index a5477c0..3793dce 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3.h
@@ -20,10 +20,12 @@ typedef enum cef_state_t cef_state_t;
#include <cef_app_capi.h>
#include <cef_browser_capi.h>
+#include <cef_context_menu_handler_capi.h>
#include <cef_download_handler_capi.h>
#include <cef_download_item_capi.h>
#include <cef_frame_capi.h>
#include <cef_version.h>
+#include <cef_menu_model_capi.h>
#include <cef_process_message_capi.h>
#include <cef_values_capi.h>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.c b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.c
index 6930f97..cdde2c7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.c
@@ -88,6 +88,7 @@ char * CEF3_nativeFunctionNames[] = {
"cef_1browser_1settings_1t_1sizeof",
"cef_1browser_1t_1sizeof",
"cef_1build_1revision",
+ "cef_1context_1menu_1params_1t_1sizeof",
"cef_1download_1item_1callback_1t_1sizeof",
"cef_1download_1item_1t_1sizeof",
"cef_1execute_1process",
@@ -121,6 +122,11 @@ char * CEF3_nativeFunctionNames[] = {
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1browser_1t_2JJ",
#endif
#ifndef JNI64
+ "memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II",
+#else
+ "memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ",
+#endif
+#ifndef JNI64
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2II",
#else
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2JJ",
@@ -141,6 +147,11 @@ char * CEF3_nativeFunctionNames[] = {
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1list_1value_1t_2JJ",
#endif
#ifndef JNI64
+ "memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II",
+#else
+ "memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ",
+#endif
+#ifndef JNI64
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2II",
#else
"memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2JJ",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.h b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.h
index a46af4a..d57d89d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_stats.h
@@ -98,6 +98,7 @@ typedef enum {
cef_1browser_1settings_1t_1sizeof_FUNC,
cef_1browser_1t_1sizeof_FUNC,
cef_1build_1revision_FUNC,
+ cef_1context_1menu_1params_1t_1sizeof_FUNC,
cef_1download_1item_1callback_1t_1sizeof_FUNC,
cef_1download_1item_1t_1sizeof_FUNC,
cef_1execute_1process_FUNC,
@@ -131,6 +132,11 @@ typedef enum {
memmove__Lorg_eclipse_swt_internal_cef3_cef_1browser_1t_2JJ_FUNC,
#endif
#ifndef JNI64
+ memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2II_FUNC,
+#else
+ memmove__Lorg_eclipse_swt_internal_cef3_cef_1context_1menu_1params_1t_2JJ_FUNC,
+#endif
+#ifndef JNI64
memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2II_FUNC,
#else
memmove__Lorg_eclipse_swt_internal_cef3_cef_1download_1item_1callback_1t_2JJ_FUNC,
@@ -151,6 +157,11 @@ typedef enum {
memmove__Lorg_eclipse_swt_internal_cef3_cef_1list_1value_1t_2JJ_FUNC,
#endif
#ifndef JNI64
+ memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2II_FUNC,
+#else
+ memmove__Lorg_eclipse_swt_internal_cef3_cef_1menu_1model_1t_2JJ_FUNC,
+#endif
+#ifndef JNI64
memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2II_FUNC,
#else
memmove__Lorg_eclipse_swt_internal_cef3_cef_1process_1message_1t_2JJ_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.c b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.c
index c87228c..07da12c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.c
@@ -431,6 +431,85 @@ void setcef_browser_tFields(JNIEnv *env, jobject lpObject, cef_browser_t *lpStru
}
#endif
+#ifndef NO_cef_context_menu_params_t
+typedef struct cef_context_menu_params_t_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID get_xcoord, get_ycoord, get_type_flags, get_link_url, get_unfiltered_link_url, get_source_url, is_image_blocked, get_page_url, get_frame_url, get_frame_charset, get_media_type, get_media_state_flags, get_selection_text, is_editable, is_speech_input_enabled, get_edit_state_flags;
+} cef_context_menu_params_t_FID_CACHE;
+
+cef_context_menu_params_t_FID_CACHE cef_context_menu_params_tFc;
+
+void cachecef_context_menu_params_tFields(JNIEnv *env, jobject lpObject)
+{
+ if (cef_context_menu_params_tFc.cached) return;
+ cachecef_base_tFields(env, lpObject);
+ cef_context_menu_params_tFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ cef_context_menu_params_tFc.get_xcoord = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_xcoord", I_J);
+ cef_context_menu_params_tFc.get_ycoord = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_ycoord", I_J);
+ cef_context_menu_params_tFc.get_type_flags = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_type_flags", I_J);
+ cef_context_menu_params_tFc.get_link_url = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_link_url", I_J);
+ cef_context_menu_params_tFc.get_unfiltered_link_url = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_unfiltered_link_url", I_J);
+ cef_context_menu_params_tFc.get_source_url = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_source_url", I_J);
+ cef_context_menu_params_tFc.is_image_blocked = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "is_image_blocked", I_J);
+ cef_context_menu_params_tFc.get_page_url = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_page_url", I_J);
+ cef_context_menu_params_tFc.get_frame_url = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_frame_url", I_J);
+ cef_context_menu_params_tFc.get_frame_charset = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_frame_charset", I_J);
+ cef_context_menu_params_tFc.get_media_type = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_media_type", I_J);
+ cef_context_menu_params_tFc.get_media_state_flags = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_media_state_flags", I_J);
+ cef_context_menu_params_tFc.get_selection_text = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_selection_text", I_J);
+ cef_context_menu_params_tFc.is_editable = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "is_editable", I_J);
+ cef_context_menu_params_tFc.is_speech_input_enabled = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "is_speech_input_enabled", I_J);
+ cef_context_menu_params_tFc.get_edit_state_flags = (*env)->GetFieldID(env, cef_context_menu_params_tFc.clazz, "get_edit_state_flags", I_J);
+ cef_context_menu_params_tFc.cached = 1;
+}
+
+cef_context_menu_params_t *getcef_context_menu_params_tFields(JNIEnv *env, jobject lpObject, cef_context_menu_params_t *lpStruct)
+{
+ if (!cef_context_menu_params_tFc.cached) cachecef_context_menu_params_tFields(env, lpObject);
+ getcef_base_tFields(env, lpObject, (cef_base_t *)lpStruct);
+ lpStruct->get_xcoord = (int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_xcoord);
+ lpStruct->get_ycoord = (int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_ycoord);
+ lpStruct->get_type_flags = (enum cef_context_menu_type_flags_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_type_flags);
+ lpStruct->get_link_url = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_link_url);
+ lpStruct->get_unfiltered_link_url = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_unfiltered_link_url);
+ lpStruct->get_source_url = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_source_url);
+ lpStruct->is_image_blocked = (int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_image_blocked);
+ lpStruct->get_page_url = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_page_url);
+ lpStruct->get_frame_url = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_frame_url);
+ lpStruct->get_frame_charset = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_frame_charset);
+ lpStruct->get_media_type = (enum cef_context_menu_media_type_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_media_type);
+ lpStruct->get_media_state_flags = (enum cef_context_menu_media_state_flags_t ( CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_media_state_flags);
+ lpStruct->get_selection_text = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_selection_text);
+ lpStruct->is_editable = (int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_editable);
+ lpStruct->is_speech_input_enabled = (int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_speech_input_enabled);
+ lpStruct->get_edit_state_flags = (enum cef_context_menu_edit_state_flags_t (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))(*env)->GetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_edit_state_flags);
+ return lpStruct;
+}
+
+void setcef_context_menu_params_tFields(JNIEnv *env, jobject lpObject, cef_context_menu_params_t *lpStruct)
+{
+ if (!cef_context_menu_params_tFc.cached) cachecef_context_menu_params_tFields(env, lpObject);
+ setcef_base_tFields(env, lpObject, (cef_base_t *)lpStruct);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_xcoord, (jintLong)lpStruct->get_xcoord);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_ycoord, (jintLong)lpStruct->get_ycoord);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_type_flags, (jintLong)lpStruct->get_type_flags);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_link_url, (jintLong)lpStruct->get_link_url);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_unfiltered_link_url, (jintLong)lpStruct->get_unfiltered_link_url);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_source_url, (jintLong)lpStruct->get_source_url);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_image_blocked, (jintLong)lpStruct->is_image_blocked);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_page_url, (jintLong)lpStruct->get_page_url);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_frame_url, (jintLong)lpStruct->get_frame_url);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_frame_charset, (jintLong)lpStruct->get_frame_charset);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_media_type, (jintLong)lpStruct->get_media_type);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_media_state_flags, (jintLong)lpStruct->get_media_state_flags);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_selection_text, (jintLong)lpStruct->get_selection_text);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_editable, (jintLong)lpStruct->is_editable);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.is_speech_input_enabled, (jintLong)lpStruct->is_speech_input_enabled);
+ (*env)->SetIntLongField(env, lpObject, cef_context_menu_params_tFc.get_edit_state_flags, (jintLong)lpStruct->get_edit_state_flags);
+}
+#endif
+
#ifndef NO_cef_download_item_callback_t
typedef struct cef_download_item_callback_t_FID_CACHE {
int cached;
@@ -781,6 +860,184 @@ void setcef_main_args_tFields(JNIEnv *env, jobject lpObject, cef_main_args_t *lp
}
#endif
+#ifndef NO_cef_menu_model_t
+typedef struct cef_menu_model_t_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID clear, get_count, add_separator, add_item, add_check_item, add_radio_item, add_sub_menu, insert_separator_at, insert_item_at, insert_check_item_at, insert_radio_item_at, insert_sub_menu_at, remove, remove_at, get_index_of, get_command_id_at, set_command_id_at, get_label, get_label_at, set_label, set_label_at, get_type, get_type_at, get_group_id, get_group_id_at, set_group_id, set_group_id_at, get_sub_menu, get_sub_menu_at, is_visible, is_visible_at, set_visible, set_visible_at, is_enabled, is_enabled_at, set_enabled, set_enabled_at, is_checked, is_checked_at, set_checked, set_checked_at, has_accelerator, has_accelerator_at, set_accelerator, set_accelerator_at, remove_accelerator, remove_accelerator_at, get_accelerator, get_accelerator_at;
+} cef_menu_model_t_FID_CACHE;
+
+cef_menu_model_t_FID_CACHE cef_menu_model_tFc;
+
+void cachecef_menu_model_tFields(JNIEnv *env, jobject lpObject)
+{
+ if (cef_menu_model_tFc.cached) return;
+ cachecef_base_tFields(env, lpObject);
+ cef_menu_model_tFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ cef_menu_model_tFc.clear = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "clear", I_J);
+ cef_menu_model_tFc.get_count = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_count", I_J);
+ cef_menu_model_tFc.add_separator = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "add_separator", I_J);
+ cef_menu_model_tFc.add_item = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "add_item", I_J);
+ cef_menu_model_tFc.add_check_item = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "add_check_item", I_J);
+ cef_menu_model_tFc.add_radio_item = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "add_radio_item", I_J);
+ cef_menu_model_tFc.add_sub_menu = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "add_sub_menu", I_J);
+ cef_menu_model_tFc.insert_separator_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "insert_separator_at", I_J);
+ cef_menu_model_tFc.insert_item_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "insert_item_at", I_J);
+ cef_menu_model_tFc.insert_check_item_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "insert_check_item_at", I_J);
+ cef_menu_model_tFc.insert_radio_item_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "insert_radio_item_at", I_J);
+ cef_menu_model_tFc.insert_sub_menu_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "insert_sub_menu_at", I_J);
+ cef_menu_model_tFc.remove = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "remove", I_J);
+ cef_menu_model_tFc.remove_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "remove_at", I_J);
+ cef_menu_model_tFc.get_index_of = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_index_of", I_J);
+ cef_menu_model_tFc.get_command_id_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_command_id_at", I_J);
+ cef_menu_model_tFc.set_command_id_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_command_id_at", I_J);
+ cef_menu_model_tFc.get_label = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_label", I_J);
+ cef_menu_model_tFc.get_label_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_label_at", I_J);
+ cef_menu_model_tFc.set_label = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_label", I_J);
+ cef_menu_model_tFc.set_label_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_label_at", I_J);
+ cef_menu_model_tFc.get_type = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_type", I_J);
+ cef_menu_model_tFc.get_type_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_type_at", I_J);
+ cef_menu_model_tFc.get_group_id = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_group_id", I_J);
+ cef_menu_model_tFc.get_group_id_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_group_id_at", I_J);
+ cef_menu_model_tFc.set_group_id = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_group_id", I_J);
+ cef_menu_model_tFc.set_group_id_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_group_id_at", I_J);
+ cef_menu_model_tFc.get_sub_menu = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_sub_menu", I_J);
+ cef_menu_model_tFc.get_sub_menu_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_sub_menu_at", I_J);
+ cef_menu_model_tFc.is_visible = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_visible", I_J);
+ cef_menu_model_tFc.is_visible_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_visible_at", I_J);
+ cef_menu_model_tFc.set_visible = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_visible", I_J);
+ cef_menu_model_tFc.set_visible_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_visible_at", I_J);
+ cef_menu_model_tFc.is_enabled = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_enabled", I_J);
+ cef_menu_model_tFc.is_enabled_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_enabled_at", I_J);
+ cef_menu_model_tFc.set_enabled = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_enabled", I_J);
+ cef_menu_model_tFc.set_enabled_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_enabled_at", I_J);
+ cef_menu_model_tFc.is_checked = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_checked", I_J);
+ cef_menu_model_tFc.is_checked_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "is_checked_at", I_J);
+ cef_menu_model_tFc.set_checked = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_checked", I_J);
+ cef_menu_model_tFc.set_checked_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_checked_at", I_J);
+ cef_menu_model_tFc.has_accelerator = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "has_accelerator", I_J);
+ cef_menu_model_tFc.has_accelerator_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "has_accelerator_at", I_J);
+ cef_menu_model_tFc.set_accelerator = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_accelerator", I_J);
+ cef_menu_model_tFc.set_accelerator_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "set_accelerator_at", I_J);
+ cef_menu_model_tFc.remove_accelerator = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "remove_accelerator", I_J);
+ cef_menu_model_tFc.remove_accelerator_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "remove_accelerator_at", I_J);
+ cef_menu_model_tFc.get_accelerator = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_accelerator", I_J);
+ cef_menu_model_tFc.get_accelerator_at = (*env)->GetFieldID(env, cef_menu_model_tFc.clazz, "get_accelerator_at", I_J);
+ cef_menu_model_tFc.cached = 1;
+}
+
+cef_menu_model_t *getcef_menu_model_tFields(JNIEnv *env, jobject lpObject, cef_menu_model_t *lpStruct)
+{
+ if (!cef_menu_model_tFc.cached) cachecef_menu_model_tFields(env, lpObject);
+ getcef_base_tFields(env, lpObject, (cef_base_t *)lpStruct);
+ lpStruct->clear = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.clear);
+ lpStruct->get_count = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_count);
+ lpStruct->add_separator = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.add_separator);
+ lpStruct->add_item = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.add_item);
+ lpStruct->add_check_item = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.add_check_item);
+ lpStruct->add_radio_item = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label, int group_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.add_radio_item);
+ lpStruct->add_sub_menu = (struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.add_sub_menu);
+ lpStruct->insert_separator_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.insert_separator_at);
+ lpStruct->insert_item_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.insert_item_at);
+ lpStruct->insert_check_item_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.insert_check_item_at);
+ lpStruct->insert_radio_item_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label, int group_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.insert_radio_item_at);
+ lpStruct->insert_sub_menu_at = (struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.insert_sub_menu_at);
+ lpStruct->remove = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.remove);
+ lpStruct->remove_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.remove_at);
+ lpStruct->get_index_of = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_index_of);
+ lpStruct->get_command_id_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_command_id_at);
+ lpStruct->set_command_id_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_command_id_at);
+ lpStruct->get_label = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_label);
+ lpStruct->get_label_at = (cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_label_at);
+ lpStruct->set_label = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_label);
+ lpStruct->set_label_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, const cef_string_t* label))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_label_at);
+ lpStruct->get_type = (enum cef_menu_item_type_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_type);
+ lpStruct->get_type_at = (enum cef_menu_item_type_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_type_at);
+ lpStruct->get_group_id = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_group_id);
+ lpStruct->get_group_id_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_group_id_at);
+ lpStruct->set_group_id = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int group_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_group_id);
+ lpStruct->set_group_id_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int group_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_group_id_at);
+ lpStruct->get_sub_menu = (struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_sub_menu);
+ lpStruct->get_sub_menu_at = (struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_sub_menu_at);
+ lpStruct->is_visible = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_visible);
+ lpStruct->is_visible_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_visible_at);
+ lpStruct->set_visible = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int visible))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_visible);
+ lpStruct->set_visible_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int visible))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_visible_at);
+ lpStruct->is_enabled = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_enabled);
+ lpStruct->is_enabled_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_enabled_at);
+ lpStruct->set_enabled = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int enabled))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_enabled);
+ lpStruct->set_enabled_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int enabled))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_enabled_at);
+ lpStruct->is_checked = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_checked);
+ lpStruct->is_checked_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.is_checked_at);
+ lpStruct->set_checked = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int checked))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_checked);
+ lpStruct->set_checked_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int checked))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_checked_at);
+ lpStruct->has_accelerator = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.has_accelerator);
+ lpStruct->has_accelerator_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.has_accelerator_at);
+ lpStruct->set_accelerator = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_accelerator);
+ lpStruct->set_accelerator_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.set_accelerator_at);
+ lpStruct->remove_accelerator = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.remove_accelerator);
+ lpStruct->remove_accelerator_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.remove_accelerator_at);
+ lpStruct->get_accelerator = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed, int* alt_pressed))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_accelerator);
+ lpStruct->get_accelerator_at = (int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int* key_code, int* shift_pressed, int* ctrl_pressed, int* alt_pressed))(*env)->GetIntLongField(env, lpObject, cef_menu_model_tFc.get_accelerator_at);
+ return lpStruct;
+}
+
+void setcef_menu_model_tFields(JNIEnv *env, jobject lpObject, cef_menu_model_t *lpStruct)
+{
+ if (!cef_menu_model_tFc.cached) cachecef_menu_model_tFields(env, lpObject);
+ setcef_base_tFields(env, lpObject, (cef_base_t *)lpStruct);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.clear, (jintLong)lpStruct->clear);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_count, (jintLong)lpStruct->get_count);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.add_separator, (jintLong)lpStruct->add_separator);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.add_item, (jintLong)lpStruct->add_item);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.add_check_item, (jintLong)lpStruct->add_check_item);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.add_radio_item, (jintLong)lpStruct->add_radio_item);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.add_sub_menu, (jintLong)lpStruct->add_sub_menu);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.insert_separator_at, (jintLong)lpStruct->insert_separator_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.insert_item_at, (jintLong)lpStruct->insert_item_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.insert_check_item_at, (jintLong)lpStruct->insert_check_item_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.insert_radio_item_at, (jintLong)lpStruct->insert_radio_item_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.insert_sub_menu_at, (jintLong)lpStruct->insert_sub_menu_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.remove, (jintLong)lpStruct->remove);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.remove_at, (jintLong)lpStruct->remove_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_index_of, (jintLong)lpStruct->get_index_of);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_command_id_at, (jintLong)lpStruct->get_command_id_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_command_id_at, (jintLong)lpStruct->set_command_id_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_label, (jintLong)lpStruct->get_label);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_label_at, (jintLong)lpStruct->get_label_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_label, (jintLong)lpStruct->set_label);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_label_at, (jintLong)lpStruct->set_label_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_type, (jintLong)lpStruct->get_type);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_type_at, (jintLong)lpStruct->get_type_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_group_id, (jintLong)lpStruct->get_group_id);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_group_id_at, (jintLong)lpStruct->get_group_id_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_group_id, (jintLong)lpStruct->set_group_id);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_group_id_at, (jintLong)lpStruct->set_group_id_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_sub_menu, (jintLong)lpStruct->get_sub_menu);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_sub_menu_at, (jintLong)lpStruct->get_sub_menu_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_visible, (jintLong)lpStruct->is_visible);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_visible_at, (jintLong)lpStruct->is_visible_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_visible, (jintLong)lpStruct->set_visible);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_visible_at, (jintLong)lpStruct->set_visible_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_enabled, (jintLong)lpStruct->is_enabled);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_enabled_at, (jintLong)lpStruct->is_enabled_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_enabled, (jintLong)lpStruct->set_enabled);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_enabled_at, (jintLong)lpStruct->set_enabled_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_checked, (jintLong)lpStruct->is_checked);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.is_checked_at, (jintLong)lpStruct->is_checked_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_checked, (jintLong)lpStruct->set_checked);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_checked_at, (jintLong)lpStruct->set_checked_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.has_accelerator, (jintLong)lpStruct->has_accelerator);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.has_accelerator_at, (jintLong)lpStruct->has_accelerator_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_accelerator, (jintLong)lpStruct->set_accelerator);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.set_accelerator_at, (jintLong)lpStruct->set_accelerator_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.remove_accelerator, (jintLong)lpStruct->remove_accelerator);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.remove_accelerator_at, (jintLong)lpStruct->remove_accelerator_at);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_accelerator, (jintLong)lpStruct->get_accelerator);
+ (*env)->SetIntLongField(env, lpObject, cef_menu_model_tFc.get_accelerator_at, (jintLong)lpStruct->get_accelerator_at);
+}
+#endif
+
#ifndef NO_cef_process_message_t
typedef struct cef_process_message_t_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.h b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.h
index 2110923..e67bc32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/library/cef3_structs.h
@@ -71,6 +71,18 @@ void setcef_browser_tFields(JNIEnv *env, jobject lpObject, cef_browser_t *lpStru
#define cef_browser_t_sizeof() 0
#endif
+#ifndef NO_cef_context_menu_params_t
+void cachecef_context_menu_params_tFields(JNIEnv *env, jobject lpObject);
+cef_context_menu_params_t *getcef_context_menu_params_tFields(JNIEnv *env, jobject lpObject, cef_context_menu_params_t *lpStruct);
+void setcef_context_menu_params_tFields(JNIEnv *env, jobject lpObject, cef_context_menu_params_t *lpStruct);
+#define cef_context_menu_params_t_sizeof() sizeof(cef_context_menu_params_t)
+#else
+#define cachecef_context_menu_params_tFields(a,b)
+#define getcef_context_menu_params_tFields(a,b,c) NULL
+#define setcef_context_menu_params_tFields(a,b,c)
+#define cef_context_menu_params_t_sizeof() 0
+#endif
+
#ifndef NO_cef_download_item_callback_t
void cachecef_download_item_callback_tFields(JNIEnv *env, jobject lpObject);
cef_download_item_callback_t *getcef_download_item_callback_tFields(JNIEnv *env, jobject lpObject, cef_download_item_callback_t *lpStruct);
@@ -131,6 +143,18 @@ void setcef_main_args_tFields(JNIEnv *env, jobject lpObject, cef_main_args_t *lp
#define cef_main_args_t_sizeof() 0
#endif
+#ifndef NO_cef_menu_model_t
+void cachecef_menu_model_tFields(JNIEnv *env, jobject lpObject);
+cef_menu_model_t *getcef_menu_model_tFields(JNIEnv *env, jobject lpObject, cef_menu_model_t *lpStruct);
+void setcef_menu_model_tFields(JNIEnv *env, jobject lpObject, cef_menu_model_t *lpStruct);
+#define cef_menu_model_t_sizeof() sizeof(cef_menu_model_t)
+#else
+#define cachecef_menu_model_tFields(a,b)
+#define getcef_menu_model_tFields(a,b,c) NULL
+#define setcef_menu_model_tFields(a,b,c)
+#define cef_menu_model_t_sizeof() 0
+#endif
+
#ifndef NO_cef_process_message_t
void cachecef_process_message_tFields(JNIEnv *env, jobject lpObject);
cef_process_message_t *getcef_process_message_tFields(JNIEnv *env, jobject lpObject, cef_process_message_t *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
index 774420c..8dcd959 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
@@ -386,6 +386,26 @@ public boolean isForwardEnabled() {
return cefBrowser != null && cefBrowser.can_go_forward() != 0;
}
+int onContextMenu(int xCoord, int yCoord) {
+ Event event = new Event();
+ event.x = xCoord;
+ event.y = yCoord;
+ browser.notifyListeners (SWT.MenuDetect, event);
+ if (event.doit) {
+ Menu menu = browser.getMenu();
+ if (menu != null && !menu.isDisposed()) {
+ if (event.x != xCoord || event.y != yCoord) {
+ menu.setLocation(event.x, event.y);
+ }
+ menu.setVisible(true);
+ }
+ else {
+ return 0;
+ }
+ }
+ return 1;
+}
+
void onDispose(Event e) {
htmlText = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFClient.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFClient.java
index 57bbd2f..97dad6d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFClient.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFClient.java
@@ -107,7 +107,7 @@ synchronized int release() {
long /*int*/ get_context_menu_handler() {
if (Device.DEBUG) System.out.println("get_context_menu_handler (impl)");
if (contextMenuHandler == null) {
- contextMenuHandler = new CEFContextMenuHandler();
+ contextMenuHandler = new CEFContextMenuHandler(host);
}
contextMenuHandler.add_ref();
return contextMenuHandler.getAddress();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFContextMenuHandler.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFContextMenuHandler.java
index 73ca805..2f735e4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFContextMenuHandler.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFContextMenuHandler.java
@@ -16,8 +16,10 @@ import org.eclipse.swt.internal.cef3.*;
public class CEFContextMenuHandler {
CEF3Object object;
int refCount = 1;
+ CEF host;
-public CEFContextMenuHandler() {
+public CEFContextMenuHandler(CEF host) {
+ this.host = host;
object = new CEF3Object (new int[] {0, 0, 0, 4, 5, 2}) {
public long /*int*/ method0(long /*int*/[] args) {return add_ref();}
public long /*int*/ method1(long /*int*/[] args) {return CEFContextMenuHandler.this.release();}
@@ -56,12 +58,26 @@ synchronized int release() {
/* cef_context_menu_handler_t */
-long /*int*/ on_before_context_menu(long /*int*/ browser, long /*int*/ frame, long /*int*/ params, long /*int*/ model) {
- if (Device.DEBUG) System.out.println("on_before_context_menu (TODO)");
+long /*int*/ on_before_context_menu(long /*int*/ browser, long /*int*/ frame, long /*int*/ pParams, long /*int*/ pModel) {
+ if (Device.DEBUG) System.out.println("on_before_context_menu (impl)");
+ CEFContextMenuParams params = new CEFContextMenuParams(pParams);
+ final int xCoord = params.getXCoord();
+ final int yCoord = params.getYCoord();
+ final int result[] = new int[1];
+ host.browser.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ if (host.browser.isDisposed()) return;
+ result[0] = host.onContextMenu(xCoord, yCoord);
+ }
+ });
+ CEFMenuModel model = new CEFMenuModel(pModel);
+ if (result[0] == 1) {
+ model.clear();
+ }
+ model.release();
new CEFBase(browser).release();
new CEFBase(frame).release();
- new CEFBase(params).release();
- new CEFBase(model).release();
+ params.release();
return 0;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEF3.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEF3.java
index 39d667e..a0a8f9c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEF3.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEF3.java
@@ -76,6 +76,13 @@ public static final native void memmove(cef_before_download_callback_t dest, lon
* @param src cast=(const void *)
* @param size cast=(size_t)
*/
+public static final native void memmove(cef_context_menu_params_t dest, long /*int*/ src, long /*int*/ size);
+
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
public static final native void memmove(cef_download_item_t dest, long /*int*/ src, long /*int*/ size);
/**
@@ -103,6 +110,13 @@ public static final native void memmove(cef_list_value_t dest, long /*int*/ src,
* @param src cast=(const void *)
* @param size cast=(size_t)
*/
+public static final native void memmove(cef_menu_model_t dest, long /*int*/ src, long /*int*/ size);
+
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
public static final native void memmove(cef_process_message_t dest, long /*int*/ src, long /*int*/ size);
/**
@@ -152,6 +166,7 @@ public static final native int cef_browser_t_sizeof();
public static final native int cef_browser_host_t_sizeof();
public static final native int cef_browser_settings_t_sizeof();
public static final native int cef_before_download_callback_t_sizeof();
+public static final native int cef_context_menu_params_t_sizeof();
public static final native int cef_download_item_t_sizeof();
public static final native int cef_download_item_callback_t_sizeof();
public static final native int cef_frame_t_sizeof();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFContextMenuParams.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFContextMenuParams.java
new file mode 100644
index 0000000..41d49d5
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFContextMenuParams.java
@@ -0,0 +1,19 @@
+package org.eclipse.swt.internal.cef3;
+
+public class CEFContextMenuParams extends CEFBase {
+ cef_context_menu_params_t struct;
+
+ public CEFContextMenuParams(long /*int*/ address) {
+ super(address);
+ struct = new cef_context_menu_params_t();
+ CEF3.memmove(struct, address, cef_context_menu_params_t.sizeof);
+ }
+
+ public int getXCoord() {
+ return CEF3.callFuncInt(struct.get_xcoord, address);
+ }
+
+ public int getYCoord() {
+ return CEF3.callFuncInt(struct.get_ycoord, address);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFMenuModel.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFMenuModel.java
new file mode 100644
index 0000000..20f9773
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/CEFMenuModel.java
@@ -0,0 +1,15 @@
+package org.eclipse.swt.internal.cef3;
+
+public class CEFMenuModel extends CEFBase {
+ cef_menu_model_t struct;
+
+ public CEFMenuModel(long /*int*/ address) {
+ super(address);
+ struct = new cef_menu_model_t();
+ CEF3.memmove(struct, address, cef_context_menu_params_t.sizeof);
+ }
+
+ public int clear() {
+ return CEF3.callFuncInt(struct.clear, address);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_context_menu_params_t.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_context_menu_params_t.java
new file mode 100644
index 0000000..504f081
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_context_menu_params_t.java
@@ -0,0 +1,55 @@
+package org.eclipse.swt.internal.cef3;
+
+public class cef_context_menu_params_t extends cef_base_t {
+
+ /** @field cast="(int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_xcoord;
+
+ /** @field cast="(int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_ycoord;
+
+ /** @field cast="(enum cef_context_menu_type_flags_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_type_flags;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_link_url;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_unfiltered_link_url;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_source_url;
+
+ /** @field cast="(int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ is_image_blocked;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_page_url;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_frame_url;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_frame_charset;
+
+ /** @field cast="(enum cef_context_menu_media_type_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_media_type;
+
+ /** @field cast="(enum cef_context_menu_media_state_flags_t ( CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_media_state_flags;
+
+ /** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_selection_text;
+
+ /** @field cast="(int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ is_editable;
+
+ /** @field cast="(int (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ is_speech_input_enabled;
+
+ /** @field cast="(enum cef_context_menu_edit_state_flags_t (CEF_CALLBACK *)(struct _cef_context_menu_params_t* self))" */
+ public long /*int*/ get_edit_state_flags;
+
+ public static final int sizeof = CEF3.cef_context_menu_params_t_sizeof();
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_menu_model_t.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_menu_model_t.java
new file mode 100644
index 0000000..26bbbfc
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/internal/cef3/cef_menu_model_t.java
@@ -0,0 +1,150 @@
+package org.eclipse.swt.internal.cef3;
+
+public class cef_menu_model_t extends cef_base_t {
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))" */
+public long /*int*/ clear;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))" */
+public long /*int*/ get_count;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self))" */
+public long /*int*/ add_separator;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))" */
+public long /*int*/ add_item;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))" */
+public long /*int*/ add_check_item;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label, int group_id))" */
+public long /*int*/ add_radio_item;
+
+/** @field cast="(struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))" */
+public long /*int*/ add_sub_menu;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ insert_separator_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))" */
+public long /*int*/ insert_item_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))" */
+public long /*int*/ insert_check_item_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label, int group_id))" */
+public long /*int*/ insert_radio_item_at;
+
+/** @field cast="(struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index, int command_id, const cef_string_t* label))" */
+public long /*int*/ insert_sub_menu_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ remove;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ remove_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ get_index_of;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ get_command_id_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int command_id))" */
+public long /*int*/ set_command_id_at;
+
+/** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ get_label;
+
+/** @field cast="(cef_string_userfree_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ get_label_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, const cef_string_t* label))" */
+public long /*int*/ set_label;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, const cef_string_t* label))" */
+public long /*int*/ set_label_at;
+
+/** @field cast="(enum cef_menu_item_type_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ get_type;
+
+/** @field cast="(enum cef_menu_item_type_t (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ get_type_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ get_group_id;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ get_group_id_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int group_id))" */
+public long /*int*/ set_group_id;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int group_id))" */
+public long /*int*/ set_group_id_at;
+
+/** @field cast="(struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ get_sub_menu;
+
+/** @field cast="(struct _cef_menu_model_t* (CEF_CALLBACK *)( struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ get_sub_menu_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ is_visible;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ is_visible_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int visible))" */
+public long /*int*/ set_visible;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int visible))" */
+public long /*int*/ set_visible_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ is_enabled;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ is_enabled_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int enabled))" */
+public long /*int*/ set_enabled;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int enabled))" */
+public long /*int*/ set_enabled_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ is_checked;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ is_checked_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int checked))" */
+public long /*int*/ set_checked;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int checked))" */
+public long /*int*/ set_checked_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ has_accelerator;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ has_accelerator_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed))" */
+public long /*int*/ set_accelerator;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int key_code, int shift_pressed, int ctrl_pressed, int alt_pressed))" */
+public long /*int*/ set_accelerator_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id))" */
+public long /*int*/ remove_accelerator;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index))" */
+public long /*int*/ remove_accelerator_at;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed, int* alt_pressed))" */
+public long /*int*/ get_accelerator;
+
+/** @field cast="(int (CEF_CALLBACK *)(struct _cef_menu_model_t* self, int index, int* key_code, int* shift_pressed, int* ctrl_pressed, int* alt_pressed))" */
+public long /*int*/ get_accelerator_at;
+}