5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 19:39:59 +08:00
wails/v2/internal/ffenestri/contextmenus_darwin.h
2021-01-12 21:20:08 +11:00

32 lines
869 B
C

////
//// Created by Lea Anthony on 6/1/21.
////
//
#ifndef CONTEXTMENU_DARWIN_H
#define CONTEXTMENU_DARWIN_H
#include "json.h"
#include "menu_darwin.h"
#include "contextmenustore_darwin.h"
typedef struct {
const char* ID;
id nsmenu;
Menu* menu;
// The optional data that may be passed with a context menu selection
const char* contextMenuData;
} ContextMenu;
ContextMenu* NewContextMenu(JsonNode* menuData, ContextMenuStore* store);
ContextMenu* GetContextMenuByID( ContextMenuStore* store, const char *contextMenuID);
void DeleteContextMenu(ContextMenu* contextMenu);
int freeContextMenu(void *const context, struct hashmap_element_s *const e);
void ProcessContextMenus( ContextMenuStore* store);
void ShowContextMenu(ContextMenuStore* store, id mainWindow, const char *contextMenuID, const char *contextMenuData);
#endif //CONTEXTMENU_DARWIN_H