InfoPopper


Adding Support For InfoPopper

 

General use

The normal end-user of InfoPopper doesn't have to do anything, more or less. Once InfoPopper is started, other apps send messages to it that are displayed. Depending on the type of message, clicking it can do various things. The sending app decides what should happen when a message is clicked.

 

Settings

There are some settings you can adjust to make InfoPopper look the way you want. The settings file if located at /boot/home/config/settings/BeClan/InfoPopper/settings.

Name Type Description
windowWidth float Width of window.
displayTime int32 Default display duration.
titlePosition int16

You can select one of two layout schemes, described below.

Value Description
0 Title above icon
1 All text right of icon
iconSize int16 Size of icon.

Developer info

To display a message, you send a message to the InfoPopper. The message needs to contain a number of fields, and can optionally contain more to specify more of how the message should be displayed and associate actions with it. Listed below you'll find a list of all the available fields.

The message should have a what value of InfoPopper::AddMessage (defined in libim/InfoPopper.h), or you could send scripting messages. The property is 'message'.

InfoPopper app-sig: application/x-vnd.beclan.InfoPopper

You can also use hey to add messages:

hey InfoPopper create message with app="MyApp" and title="Woot" and content="Hejsan"
hey InfoPopper create message with title="Ze title" and content="This iz a message." 
   and iconRef="file(/boot/home/config/settings/im_kit/icons/Available)" and app="My app"

Message fields

NameTypeDescription
app string Required. The name of the application. Will be displayed above the rest of the message. Not guaranteed to be shown for each message, several messages could be grouped under a single 'app' header.
title string Required. Message header.
content string Required. The actual message
type int8 Optional. Describes the type of message, which in turns decides how it will look.
ValueDescription
0Information
1Important
2Error
3Progress - don't forget to add the progress field.
messageID string Optional. If a messageID is present, any old message with the same messageID is removed before adding the new one. Used to update progress messages.
progress float Optional. A value between 0.0 and 1.0 describing the progress. Only valid for messages of type 'progress'.
icon BMessage Optional. An archived BBitmap to be used as icon. You can get the current icon size setting by sending an InfoPopper::GetIconSize (defined in libim/InfoPopper.h) message to the InfoPopper. Don't add both icon and iconRef+IconType.
iconRef entry_ref Optional. entry_ref pointing to a file with the icon you want with your message.. Requires the iconType field. Don't add both icon and iconRef+IconType.
iconType int8 Optional. Tells the InfoPopper where to look for icon data, in the file specified by iconRef or in it's attributes.
ValueMeaning
0Attribute (icon displyed by Tracker)
1Contents
overlayIcon BMessage Optional. An archived BBitmap to be used as overlay icon. You can get the current icon size setting by sending an InfoPopper::GetIconSize (defined in libim/InfoPopper.h) message to the InfoPopper. Don't add both overlayIcon and overlayIconRef+overlayIconType.
overlayIconRef entry_ref Optional. entry_ref pointing to file with icon to overlay over the normal one. Requires overlayIconType. Don't add both overlayIcon and overlayIconRef+overlayIconType.
overlayIconType int8 Optional. Like iconType
onClickApp string Optional. MIME string of application to launch when clicked. Don't add both onClickApp and onClickFile.
onClickFile entry_ref Optional. File to launch when clicked. Don't add both onClickApp and onClickFile.
onClickArgv string Optional. String to be passed to the application as an argv (may be multiple)
onClickRef entry_ref Optional, entry_ref to be passed to launched app (may be multiple)
onClickMsg BMessage Optional. Message to be sent on click (may be multiple)
timeout int32 Optional. Specifies how many seconds the message should be displayed. 0 means "until clicked". Default is 10 seconds.