Skip to content

Commit 7a9f15c

Browse files
committed
Rename context menu functions for clarity
Renamed native_tray_icon_open_context_menu to native_tray_icon_open_context_menu_at for explicit coordinate-based opening, and native_tray_icon_open_context_menu_default to native_tray_icon_open_context_menu for default location. Improves API clarity and consistency.
1 parent 1f4ad93 commit 7a9f15c

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/capi/tray_icon_c.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ bool native_tray_icon_remove_listener(native_tray_icon_t tray_icon,
326326
}
327327
}
328328

329-
bool native_tray_icon_open_context_menu(native_tray_icon_t tray_icon,
330-
double x,
331-
double y) {
329+
bool native_tray_icon_open_context_menu_at(native_tray_icon_t tray_icon,
330+
double x,
331+
double y) {
332332
if (!tray_icon)
333333
return false;
334334

@@ -340,7 +340,7 @@ bool native_tray_icon_open_context_menu(native_tray_icon_t tray_icon,
340340
}
341341
}
342342

343-
bool native_tray_icon_open_context_menu_default(native_tray_icon_t tray_icon) {
343+
bool native_tray_icon_open_context_menu(native_tray_icon_t tray_icon) {
344344
if (!tray_icon)
345345
return false;
346346

src/capi/tray_icon_c.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,22 +225,23 @@ bool native_tray_icon_remove_listener(native_tray_icon_t tray_icon,
225225
* @return true if menu was opened successfully, false otherwise
226226
*/
227227
FFI_PLUGIN_EXPORT
228-
bool native_tray_icon_open_context_menu(native_tray_icon_t tray_icon,
229-
double x,
230-
double y);
228+
bool native_tray_icon_open_context_menu_at(native_tray_icon_t tray_icon,
229+
double x,
230+
double y);
231231

232232
/**
233233
* Open the context menu at default location
234234
* @param tray_icon The tray icon
235235
* @return true if menu was opened successfully, false otherwise
236236
*/
237237
FFI_PLUGIN_EXPORT
238-
bool native_tray_icon_open_context_menu_default(native_tray_icon_t tray_icon);
238+
bool native_tray_icon_open_context_menu(native_tray_icon_t tray_icon);
239239

240240
/**
241241
* Close the currently displayed context menu
242242
* @param tray_icon The tray icon
243-
* @return true if menu was closed successfully or wasn't visible, false on error
243+
* @return true if menu was closed successfully or wasn't visible, false on
244+
* error
244245
*/
245246
FFI_PLUGIN_EXPORT
246247
bool native_tray_icon_close_context_menu(native_tray_icon_t tray_icon);

0 commit comments

Comments
 (0)