Plugin:MirLua/Module/m clist

From Miranda NG
Jump to: navigation, search
Other languages:
English

Allows you to work with menus of the contact list.

Include module: local clist = require('m_clist')

Main menu

AddMainMenuRoot

Creates a root menu item in the main menu.

Parameters

Parameter name Required Type Description
name Yes string Menu item name.
position No number Menu item position.
hIcon No light userdata Icon handle.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hRootMenuItem = m.AddMainMenuRoot('My root menu item')


AddMainMenuItem

Creates a menu item in the main menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddMainMenuItem({ Name ='My menu item' })

Contact menu

AddContactMenuRoot

Creates a root menu item in the contact menu.

Parameters

Parameter name Required Type Description
name Yes string Menu item name.
position No number Menu item position.
hIcon No light userdata Icon handle.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hRootMenuItem = m.AddContactMenuRoot('My contact menu item')


AddContactMenuItem

Creates a menu item in the contact menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.
protocol No string Name of the protocol (prefix for the service name)

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddContactMenuItem ({ Name ='My menu item' })

Tray menu

AddTrayMenuItem

Creates a menu item in the tray menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddTrayMenuItem ({ Name ='My menu item' })