My favorites | English | Sign in

Google Desktop APIs (Labs)

Release Notes (5.1)

This page describes changes that affect developers of JavaScript desktop gadgets. For information about changes in other releases, see Release Notes. For more information about the Desktop Gadget API, see Creating a Gadget and the Gadget API Reference.

Summary of Changes

New UI Control: Scrollbar

Two forms of support for scrollbars have been added to the API:

autoscroll
A property supported by div and listbox. When autoscroll is true, a vertical scrollbar appears when the gadget is in floating or expanded mode and there's insufficient vertical space to display the entire div or listbox. No scrollbar appears when the gadget is in the Sidebar.
scrollbar
An element you can use if you want a scrollbar that's horizontal or that has a custom look or behavior.

The following XML code shows a typical way to use a div with autoscroll:

<div name="scrollarea" width="100%"
    background="#FF0000" x="0" y="55">
  <div name="viewport" autoscroll="true"
      background="#FFEC8B" x="0" y="0" width="100%" height="500">
    <img src="large.gif" width="190" height="500"
         x="0" y="0" />
  </div>
</div>

Back to top

New UI Control: Listbox

A listbox displays a series of list items that the user can select. Two elements have been added to support listboxes:

Note: As of 5.5, use item instead of listitem.

The following snapshot shows a listbox with five visible listitems. The listbox has a visible scrollbar because the listbox autoscroll property is set to true and the listbox is not tall enough to display all its items.

snapshot: listbox

Back to top

New Feature: XML-Specified Details View

The DetailsView class, which was previously undocumented, now supports creating a details view using an XML file to specify the view's content. The following example illustrates how you can use this new feature.

function button_onclick() {
  var details = new DetailsView();
  details.SetContent(undefined, undefined, "details_view.xml", false, 0);
  plugin.showDetailsView(details, "", 0, onDetailsViewFeedback);
}
function onDetailsViewFeedback() {
  //Optionally respond to details view's closure.
}

We plan to add documentation for DetailsView. Until then, you can find an example of using DetailsView by looking at the HtmlDetailsView SDK sample.

Back to top

Additions to view

The view object has one new method (clearTimeout()) and a few new events (ondock, onundock, onpopin).

Back to top

Additions to basicElement

Two focus-related methods — focus() and killFocus() — have been added to the basicElement object, and thus to all UI controls/elements. Another new method, removeAllElements(), is appropriate only for elements that contain other elements.

Note: This release doesn't have built-in support for specifying focus order or for changing the focus using Tab or Shift-Tab.

Back to top

Deprecated Feature: Send Content Item to Friend

The ability to send content items to friends is being phased out. As a result, the friend_name and time_received properties of the ContentItem object have been deprecated and are no longer documented. Associated flags (gddDetailsViewFlagShareWithButton gddContentItemFlagShared, and gddContentItemFlagShareable) have also been deprecated.

Note: Communication between gadgets is still supported. See the googleTalk object for details.

Back to top

Deprecated plugin Properties

The window_height and window_width properties of the plugin object have been deprecated. Please use the height and width properties of view or contentarea instead.

Back to top