|
MoSync 3.3
|
The set of functions available for the Widget API.
| MAWidgetHandle maWidgetCreate | ( | const char * | widgetType | ) |
Creates a new widget of the specified type.
| widgetType | A String representing the type of the widget to create. |
References maIOCtl().
| int maWidgetDestroy | ( | MAWidgetHandle | widget | ) |
Frees the memory and resources held by the given widget. Destryoing a widget with children will also cause its children to be destroyed. Once a handle has been destroyed it cannot be referenced by the maWidget* functions.
| widget | A handle to the widget to be destroyed. |
References maIOCtl().
| int maWidgetAddChild | ( | MAWidgetHandle | parent, |
| MAWidgetHandle | child | ||
| ) |
Adds a widget to the given parent as a child. Letting the parent widget layout the child.
| parent | The widget layout to which the child will be added. |
| child | The widget that will be added to the parent. |
References maIOCtl().
| int maWidgetInsertChild | ( | MAWidgetHandle | parent, |
| MAWidgetHandle | child, | ||
| int | index | ||
| ) |
Inserts a widget to the given parent as a child at an index. Letting the parent widget layout the child.
| parent | The widget layout in which the child will be inserted. |
| child | The widget that will be added to the parent. |
| index | The index where the widget should be inserted (-1 means last) |
References maIOCtl().
| int maWidgetRemoveChild | ( | MAWidgetHandle | child | ) |
Removes a child widget from its parent (but does not destroy it). Removing a currently visible top-level widget causes the MoSync view to become visible.
References maIOCtl().
| int maWidgetModalDialogShow | ( | MAWidgetHandle | dialogHandle | ) |
Shows a dialog widget.
| dialogHandle | The handle of the dialog that will be shown. |
References maIOCtl().
| int maWidgetModalDialogHide | ( | MAWidgetHandle | dialogHandle | ) |
Hides/Dismisses a currently displayed dialog.
| dialogHandle | The handle of the dialog that will be hidden. |
References maIOCtl().
| int maWidgetScreenShow | ( | MAWidgetHandle | screenHandle | ) |
Shows a screen. If native UI hasn't been initialized, it is also initialized and disables regular MoSync drawing.
| screenHandle | The handle to the screen. |
References maIOCtl().
| int maWidgetScreenShowWithTransition | ( | MAWidgetHandle | screenHandle, |
| MAWScreenTransitionType | screenTransitionType, | ||
| int | screenTransitionDuration | ||
| ) |
Shows a screen with a transition. If native UI hasn't been initialized, it is also initialized and disables regular MoSync drawing.
| screenHandle | The handle to the screen. |
| screenTransitionType | The transition of the screen. See available screen transitions types here . |
| screenTransitionDuration | The duration of the transition in milliseconds. This argument is not used on the Windows Phone platform due to the constant duration of the WP screen transitions. |
References maIOCtl().
| int maWidgetStackScreenPush | ( | MAWidgetHandle | stackScreen, |
| MAWidgetHandle | newScreen | ||
| ) |
Pushes a screen to the given screen stack, hides the current screen and shows the pushed screen it. Pushing it to the stack will make it automatically go back to the previous screen when popped.
| stackScreen | A handle to a MAW_STACK_SCREEN. |
| newScreen | A handle to either a MAW_SCREEN or a MAW_TAB_SCREEN. The handle cannot exist in the stack already. |
References maIOCtl().
| int maWidgetStackScreenPop | ( | MAWidgetHandle | stackScreen | ) |
Pops a screen from a screen stack, hides the current screen and shows the popped screen before the If there is no previous screen in the screen stack, an empty screen will be shown.
| stackScreen | A handle to a MAW_STACK_SCREEN to pop from. |
References maIOCtl().
| int maWidgetSetProperty | ( | MAWidgetHandle | widget, |
| const char * | property, | ||
| const char * | value | ||
| ) |
Sets a specified property on the given widget.
| widget | Handle to the widget. |
| property | A string representing which property to set. |
| value | The value which will be assigned to the property. |
References maIOCtl().
| int maWidgetGetProperty | ( | MAWidgetHandle | widget, |
| const char * | property, | ||
| char * | value, | ||
| int | bufSize | ||
| ) |
Retrieves a specified property from the given widget.
| widget | Handle to the widget. |
| property | A string representing which property to set. |
| value | A buffer that will hold the value of the property, represented as a string. |
| bufSize | Size of the buffer. |
References maIOCtl().
| int maWidgetScreenAddOptionsMenuItem | ( | MAWidgetHandle | widget, |
| const char * | title, | ||
| const char * | iconPath, | ||
| int | iconPredefined | ||
| ) |
Add an item to the Options Menu associated to a screen. Available on Android and WP7. The options menu is where you should include actions and other options that are relevant to the current activity context, such as "Search," "Compose email," or "Settings". When opened, the first visible portion is the icon menu, which holds up to six menu items. If your menu includes more than six items, Android places the sixth item and the rest into the overflow menu, which the user can open by selecting More. Those items do not display icons.
| widget | Handle to the screen widget. |
| title | The title associated for the new item. Can be left null. |
| iconPath | The path to an image or a predefined icon, one of the MAW_OPTIONS_MENU_ICON_CONSTANT_ADD constants. Note that for Windows phone 7 the option menu icons must be added under the following folder structure "/ApplicationBarIcons/". The function is called with the name of the icon file. e.g. maWidgetScreenAddOptionsMenuItem(ScreenHandle, "test", "optionsMenuItemIcon.png", 0); where the file optionsMenuItemIcon.png is found in the folder "/ApplicationBarIcons". Can be left null. On windows phone 7 a null icon means that the item will be a part of the extendable menu item list from the native Application Bar. Specifies if the icon is a project resource, or one of the predefined Android icons. By default it's value is 0. |
References maIOCtl().