2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2012-04-19 22:31:46 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-01-05 19:03:36 +01:00
|
|
|
// $hash=cc93b072d35c6276805f989c234299a83e313f65$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
|
|
#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#if !defined(WRAPPING_CEF_SHARED)
|
|
|
|
#error This file can be included wrapper-side only
|
|
|
|
#endif
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
#include "include/capi/cef_menu_model_capi.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "include/cef_menu_model.h"
|
2017-02-09 23:07:43 +01:00
|
|
|
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
// Wrap a C structure with a C++ class.
|
|
|
|
// This class may be instantiated and accessed wrapper-side only.
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefMenuModelCToCpp : public CefCToCppRefCounted<CefMenuModelCToCpp,
|
|
|
|
CefMenuModel,
|
|
|
|
cef_menu_model_t> {
|
2012-04-19 22:31:46 +02:00
|
|
|
public:
|
2015-04-26 20:40:01 +02:00
|
|
|
CefMenuModelCToCpp();
|
2019-01-23 16:42:12 +01:00
|
|
|
virtual ~CefMenuModelCToCpp();
|
2012-04-19 22:31:46 +02:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CefMenuModel methods.
|
2021-06-17 21:43:06 +02:00
|
|
|
bool IsSubMenu() override;
|
|
|
|
bool Clear() override;
|
2022-07-25 19:49:32 +02:00
|
|
|
size_t GetCount() override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool AddSeparator() override;
|
|
|
|
bool AddItem(int command_id, const CefString& label) override;
|
|
|
|
bool AddCheckItem(int command_id, const CefString& label) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool AddRadioItem(int command_id,
|
|
|
|
const CefString& label,
|
2021-06-17 21:43:06 +02:00
|
|
|
int group_id) override;
|
2015-04-26 20:40:01 +02:00
|
|
|
CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefString& label) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool InsertSeparatorAt(size_t index) override;
|
|
|
|
bool InsertItemAt(size_t index,
|
|
|
|
int command_id,
|
|
|
|
const CefString& label) override;
|
|
|
|
bool InsertCheckItemAt(size_t index,
|
2017-05-17 11:29:28 +02:00
|
|
|
int command_id,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefString& label) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool InsertRadioItemAt(size_t index,
|
2017-05-17 11:29:28 +02:00
|
|
|
int command_id,
|
|
|
|
const CefString& label,
|
2021-06-17 21:43:06 +02:00
|
|
|
int group_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
CefRefPtr<CefMenuModel> InsertSubMenuAt(size_t index,
|
2017-05-17 11:29:28 +02:00
|
|
|
int command_id,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefString& label) override;
|
|
|
|
bool Remove(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool RemoveAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
int GetIndexOf(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
int GetCommandIdAt(size_t index) override;
|
|
|
|
bool SetCommandIdAt(size_t index, int command_id) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
CefString GetLabel(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
CefString GetLabelAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool SetLabel(int command_id, const CefString& label) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetLabelAt(size_t index, const CefString& label) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
MenuItemType GetType(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
MenuItemType GetTypeAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
int GetGroupId(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
int GetGroupIdAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool SetGroupId(int command_id, int group_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetGroupIdAt(size_t index, int group_id) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefMenuModel> GetSubMenu(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
CefRefPtr<CefMenuModel> GetSubMenuAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool IsVisible(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool IsVisibleAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool SetVisible(int command_id, bool visible) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetVisibleAt(size_t index, bool visible) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool IsEnabled(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool IsEnabledAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool SetEnabled(int command_id, bool enabled) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetEnabledAt(size_t index, bool enabled) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool IsChecked(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool IsCheckedAt(size_t index) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool SetChecked(int command_id, bool checked) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetCheckedAt(size_t index, bool checked) override;
|
2021-06-17 21:43:06 +02:00
|
|
|
bool HasAccelerator(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool HasAcceleratorAt(size_t index) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool SetAccelerator(int command_id,
|
|
|
|
int key_code,
|
|
|
|
bool shift_pressed,
|
|
|
|
bool ctrl_pressed,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool alt_pressed) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool SetAcceleratorAt(size_t index,
|
2017-05-17 11:29:28 +02:00
|
|
|
int key_code,
|
|
|
|
bool shift_pressed,
|
|
|
|
bool ctrl_pressed,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool alt_pressed) override;
|
|
|
|
bool RemoveAccelerator(int command_id) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool RemoveAcceleratorAt(size_t index) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool GetAccelerator(int command_id,
|
|
|
|
int& key_code,
|
|
|
|
bool& shift_pressed,
|
|
|
|
bool& ctrl_pressed,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool& alt_pressed) override;
|
2022-07-25 19:49:32 +02:00
|
|
|
bool GetAcceleratorAt(size_t index,
|
2017-05-17 11:29:28 +02:00
|
|
|
int& key_code,
|
|
|
|
bool& shift_pressed,
|
|
|
|
bool& ctrl_pressed,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool& alt_pressed) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool SetColor(int command_id,
|
|
|
|
cef_menu_color_type_t color_type,
|
2021-06-17 21:43:06 +02:00
|
|
|
cef_color_t color) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool SetColorAt(int index,
|
|
|
|
cef_menu_color_type_t color_type,
|
2021-06-17 21:43:06 +02:00
|
|
|
cef_color_t color) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool GetColor(int command_id,
|
|
|
|
cef_menu_color_type_t color_type,
|
2021-06-17 21:43:06 +02:00
|
|
|
cef_color_t& color) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool GetColorAt(int index,
|
|
|
|
cef_menu_color_type_t color_type,
|
2021-06-17 21:43:06 +02:00
|
|
|
cef_color_t& color) override;
|
|
|
|
bool SetFontList(int command_id, const CefString& font_list) override;
|
|
|
|
bool SetFontListAt(int index, const CefString& font_list) override;
|
2012-04-19 22:31:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|