• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Interop.cef_string_t类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Cef3.Interop.cef_string_t的典型用法代码示例。如果您正苦于以下问题:C# cef_string_t类的具体用法?C# cef_string_t怎么用?C# cef_string_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



cef_string_t类属于Cef3.Interop命名空间,在下文中一共展示了cef_string_t类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Copy

 public static void Copy(string value, cef_string_t* str)
 {
     fixed (char* value_ptr = value)
     {
         libcef.string_set(value_ptr, value != null ? (UIntPtr)value.Length : UIntPtr.Zero, str, 1); // FIXME: do not ignore result
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:7,代码来源:cef_string_t.cs


示例2: get

        private int get(cef_v8accessor_t* self, cef_string_t* name, cef_v8value_t* @object, cef_v8value_t** retval, cef_string_t* exception)
        {
            CheckSelf(self);

            var m_name = cef_string_t.ToString(name);
            var m_obj = CefV8Value.FromNative(@object);
            CefV8Value m_returnValue;
            string mException;

            var handled = Get(m_name, m_obj, out m_returnValue, out mException);

            if (handled)
            {
                if (mException != null)
                {
                    cef_string_t.Copy(mException, exception);
                }
                else if (m_returnValue != null)
                {
                    *retval = m_returnValue.ToNative();
                }
            }

            return handled ? 1 : 0;
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:25,代码来源:CefV8Accessor.cs


示例3: is_unstable

        private void is_unstable(cef_web_plugin_unstable_callback_t* self, cef_string_t* path, int unstable)
        {
            CheckSelf(self);

            var m_path = cef_string_t.ToString(path);
            IsUnstable(m_path, unstable != 0);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:7,代码来源:CefWebPluginUnstableCallback.cs


示例4: on_before_popup

        private int on_before_popup(cef_life_span_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_string_t* target_url, cef_string_t* target_frame_name, cef_popup_features_t* popupFeatures, cef_window_info_t* windowInfo, cef_client_t** client, cef_browser_settings_t* settings, int* no_javascript_access)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_frame = CefFrame.FromNative(frame);
            var m_targetUrl = cef_string_t.ToString(target_url);
            var m_targetFrameName = cef_string_t.ToString(target_frame_name);
            var m_popupFeatures = new CefPopupFeatures(popupFeatures);
            var m_windowInfo = CefWindowInfo.FromNative(windowInfo);
            var m_client = CefClient.FromNative(*client);
            var m_settings = new CefBrowserSettings(settings);
            var m_noJavascriptAccess = (*no_javascript_access) != 0;

            var o_client = m_client;
            var result = OnBeforePopup(m_browser, m_frame, m_targetUrl, m_targetFrameName, m_popupFeatures, m_windowInfo, ref m_client, m_settings, ref m_noJavascriptAccess);

            if ((object)o_client != m_client && m_client != null)
            {
                *client = m_client.ToNative();
            }

            *no_javascript_access = m_noJavascriptAccess ? 1 : 0;

            m_popupFeatures.Dispose();
            m_windowInfo.Dispose();
            m_settings.Dispose();

            return result ? 1 : 0;
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:30,代码来源:CefLifeSpanHandler.cs


示例5: AddCheckItem

 /// <summary>
 /// Add a check item to the menu. Returns true on success.
 /// </summary>
 public bool AddCheckItem(int commandId, string label)
 {
     fixed (char* label_str = label)
     {
         var n_label = new cef_string_t(label_str, label.Length);
         return cef_menu_model_t.add_check_item(_self, commandId, &n_label) != 0;
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:11,代码来源:CefMenuModel.cs


示例6: AddRadioItem

 /// <summary>
 /// Add a radio item to the menu. Only a single item with the specified
 /// |group_id| can be checked at a time. Returns true on success.
 /// </summary>
 public bool AddRadioItem(int commandId, string label, int groupId)
 {
     fixed (char* label_str = label)
     {
         var n_label = new cef_string_t(label_str, label.Length);
         return cef_menu_model_t.add_radio_item(_self, commandId, &n_label, groupId) != 0;
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:12,代码来源:CefMenuModel.cs


示例7: Continue

 /// <summary>
 /// Call to continue the download. Set |download_path| to the full file path
 /// for the download including the file name or leave blank to use the
 /// suggested name and the default temp directory. Set |show_dialog| to true
 /// if you do wish to show the default "Save As" dialog.
 /// </summary>
 public void Continue(string downloadPath, bool showDialog)
 {
     fixed (char* downloadPath_ptr = downloadPath)
     {
         var n_downloadPath = new cef_string_t(downloadPath_ptr, downloadPath != null ? downloadPath.Length : 0);
         cef_before_download_callback_t.cont(_self, &n_downloadPath, showDialog ? 1 : 0);
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:14,代码来源:CefBeforeDownloadCallback.cs


示例8: on_title_change

        private void on_title_change(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* title)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mTitle = cef_string_t.ToString(title);

            OnTitleChange(mBrowser, mTitle);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:9,代码来源:CefDisplayHandler.cs


示例9: MoveToFile

        /// <summary>
        /// Moves the cursor to the specified file in the archive. If |caseSensitive|
        /// is true then the search will be case sensitive. Returns true if the cursor
        /// position was set successfully.
        /// </summary>
        public bool MoveToFile(string fileName, bool caseSensitive)
        {
            fixed (char* fileName_str = fileName)
            {
                var n_fileName = new cef_string_t(fileName_str, fileName != null ? fileName.Length : 0);

                return cef_zip_reader_t.move_to_file(_self, &n_fileName, caseSensitive ? 1 : 0) != 0;
            }
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:14,代码来源:CefZipReader.cs


示例10: on_tooltip

        private int on_tooltip(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* text)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mText = cef_string_t.ToString(text);

            return OnTooltip(mBrowser, mText) ? 1 : 0;
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:9,代码来源:CefDisplayHandler.cs


示例11: HasKey

        /// <summary>
        /// Returns true if the current dictionary has a value for the given key.
        /// </summary>
        public bool HasKey(string key)
        {
            fixed (char* key_str = key)
            {
                var n_key = new cef_string_t(key_str, key != null ? key.Length : 0);

                return cef_dictionary_value_t.has_key(_self, &n_key) != 0;
            }
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:12,代码来源:CefDictionaryValue.cs


示例12: on_status_message

        private void on_status_message(cef_display_handler_t* self, cef_browser_t* browser, cef_string_t* value)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mValue = cef_string_t.ToString(value);

            OnStatusMessage(mBrowser, mValue);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:9,代码来源:CefDisplayHandler.cs


示例13: on_cancel_geolocation_permission

        private void on_cancel_geolocation_permission(cef_geolocation_handler_t* self, cef_browser_t* browser, cef_string_t* requesting_url, int request_id)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_requesting_url = cef_string_t.ToString(requesting_url);

            OnCancelGeolocationPermission(m_browser, m_requesting_url, request_id);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:9,代码来源:CefGeolocationHandler.cs


示例14: Continue

        /// <summary>
        /// Continue the JS dialog request. Set |success| to true if the OK button was
        /// pressed. The |user_input| value should be specified for prompt dialogs.
        /// </summary>
        public void Continue(bool success, string userInput)
        {
            fixed (char* userInput_str = userInput)
            {
                var n_userInput = new cef_string_t(userInput_str, userInput != null ? userInput.Length : 0);

                cef_jsdialog_callback_t.cont(_self, success ? 1 : 0, &n_userInput);
            }
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:13,代码来源:CefJSDialogCallback.cs


示例15: AddSubMenu

 /// <summary>
 /// Add a sub-menu to the menu. The new sub-menu is returned.
 /// </summary>
 public CefMenuModel AddSubMenu(int commandId, string label)
 {
     fixed (char* label_str = label)
     {
         var n_label = new cef_string_t(label_str, label.Length);
         return CefMenuModel.FromNative(
             cef_menu_model_t.add_sub_menu(_self, commandId, &n_label)
             );
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:13,代码来源:CefMenuModel.cs


示例16: on_request_geolocation_permission

        private void on_request_geolocation_permission(cef_geolocation_handler_t* self, cef_browser_t* browser, cef_string_t* requesting_url, int request_id, cef_geolocation_callback_t* callback)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_requesting_url = cef_string_t.ToString(requesting_url);
            var m_callback = CefGeolocationCallback.FromNative(callback);

            OnRequestGeolocationPermission(m_browser, m_requesting_url, request_id, m_callback);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:10,代码来源:CefGeolocationHandler.cs


示例17: Create

 /// <summary>
 /// Create a new CefProcessMessage object with the specified name.
 /// </summary>
 public static CefProcessMessage Create(string name)
 {
     fixed (char* name_str = name)
     {
         var n_name = new cef_string_t(name_str, name != null ? name.Length : 0);
         return CefProcessMessage.FromNative(
             cef_process_message_t.create(&n_name)
             );
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:13,代码来源:CefProcessMessage.cs


示例18: GetElementById

 /// <summary>
 /// Returns the document element with the specified ID value.
 /// </summary>
 public CefDomNode GetElementById(string id)
 {
     fixed (char* id_str = id)
     {
         var n_id = new cef_string_t(id_str, id.Length);
         return CefDomNode.FromNativeOrNull(
             cef_domdocument_t.get_element_by_id(_self, &n_id)
             );
     }
 }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:13,代码来源:CefDomDocument.cs


示例19: on_address_change

        private void on_address_change(cef_display_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_string_t* url)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mFrame = CefFrame.FromNative(frame);
            var mUrl = cef_string_t.ToString(url);

            OnAddressChange(mBrowser, mFrame, mUrl);
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:10,代码来源:CefDisplayHandler.cs


示例20: on_before_unload_dialog

        private int on_before_unload_dialog(cef_jsdialog_handler_t* self, cef_browser_t* browser, cef_string_t* message_text, int is_reload, cef_jsdialog_callback_t* callback)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_message_text = cef_string_t.ToString(message_text);
            var m_callback = CefJSDialogCallback.FromNative(callback);

            return OnBeforeUnloadDialog(m_browser, m_message_text, is_reload != 0, m_callback) ? 1 : 0;
        }
开发者ID:lukeandshuo,项目名称:HydataBrowser,代码行数:10,代码来源:CefJSDialogHandler.cs



注:本文中的Cef3.Interop.cef_string_t类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Hosting.JavaScriptValue类代码示例发布时间:2022-05-24
下一篇:
C# Definitions.IProcessDefinition类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap