Skip to content

Commit

Permalink
hpopupmenu()
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Aug 15, 2024
1 parent a465da4 commit 4d3902e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/items/submenu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl Submenu {

impl ContextMenu for Submenu {
#[cfg(target_os = "windows")]
fn hpopupmenu(&self) -> windows_sys::Win32::UI::WindowsAndMessaging::HMENU {
fn hpopupmenu(&self) -> isize {
self.inner.borrow().hpopupmenu()
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ pub trait ContextMenu {
///
/// [`HMENU`]: windows_sys::Win32::UI::WindowsAndMessaging::HMENU
#[cfg(target_os = "windows")]
fn hpopupmenu(&self) -> windows_sys::Win32::UI::WindowsAndMessaging::HMENU;
fn hpopupmenu(&self) -> isize;

/// Shows this menu as a context menu inside a win32 window.
///
Expand Down
2 changes: 1 addition & 1 deletion src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl Menu {

impl ContextMenu for Menu {
#[cfg(target_os = "windows")]
fn hpopupmenu(&self) -> windows_sys::Win32::UI::WindowsAndMessaging::HMENU {
fn hpopupmenu(&self) -> isize {
self.inner.borrow().hpopupmenu()
}

Expand Down
8 changes: 4 additions & 4 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ impl Menu {
self.haccel_store.borrow().0 as _
}

pub fn hpopupmenu(&self) -> HMENU {
self.hpopupmenu
pub fn hpopupmenu(&self) -> isize {
self.hpopupmenu as _
}

pub fn init_for_hwnd_with_theme(&mut self, hwnd: isize, theme: MenuTheme) -> crate::Result<()> {
Expand Down Expand Up @@ -782,8 +782,8 @@ impl MenuChild {

/// Submenu methods
impl MenuChild {
pub fn hpopupmenu(&self) -> HMENU {
self.hpopupmenu
pub fn hpopupmenu(&self) -> isize {
self.hpopupmenu as _
}

pub fn add_menu_item(&mut self, item: &dyn IsMenuItem, op: AddOp) -> crate::Result<()> {
Expand Down

0 comments on commit 4d3902e

Please sign in to comment.