Misc. UI APIs
[UI Utilities]


Defines

#define ALP_STATUS_MAX_BAD_PARAMETER   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00030000)
 An API parameter failed validation.
#define ALP_STATUS_REGISTER_CALLBACK_ERROR   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00020000)
#define ALP_STATUS_REGISTER_POPUP_ERROR   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00010000)

Typedefs

typedef void(* AlpLongPressCallback )(gpointer data, gint x, gint y, gint x_root, gint y_root)
typedef void(* AlpMaxWindowShownCallback )(gpointer data)

Enumerations

enum  AlpMaxActivationMethodType { ALP_MAX_ACTIVATE_DEFAULT = 0, ALP_MAX_ACTIVATE_BY_SINGLE, ALP_MAX_ACTIVATE_BY_DOUBLE }
 How to activate GtkTreeView and GtkIconView item by pointing devivce. More...

Functions

void alp_max_dialog_cancel_all (void)
 Cancel all active dialogs in the current process running via alp_max_dialog_run().
gint alp_max_dialog_run (GtkDialog *dialog)
 Runs a dialog using gtk_dialog_run, while tracking it for later cancellation.
void alp_max_gtk_init (void)
 Called by launchpads to initialize the UI-specific parts of GTK+.
void alp_max_set_window_shown_callback (GtkWindow *window, AlpMaxWindowShownCallback func, gpointer data)
 Register a handler to be called after a window is on-screen, to populate the window's contents.
alp_status_t alp_vol_set_strm_cls_vol_controlled (gchar *stream_type, gboolean vol_controlled)
 application use this interface to set which audio stream's volume expected to be controlled by "volume side key".
AlpMaxActivationMethodType alp_widget_get_activation_method (GtkWidget *widget)
 Get how to activate items.
alp_status_t alp_widget_register_long_press_callback (GtkWidget *widget, AlpLongPressCallback func, gpointer data)
 Register a generic callback function to be invoked whenever the user "long presses" on the specified widget. The function should be called once to register a callback that will be invoked whenever a long press occurs on the specified widget. The callback will be invoked anytime a long press occurs unless the function is called a second time with the func parameter set to NULL. Calling the function more than once with the func parameter set to a non-NULL value replaces the old callback function with a new one. The callback function is of type AlpLongPressCallback and receives two sets of coordinates, x and y, that provide the x and y location of the press event in the widget's window, and x_root and y_root, that provide the x and y location of the press event relative to the device's root window.
alp_status_t alp_widget_register_long_press_popup (GtkWidget *widget, GtkMenu *popup)
 Register a pop-up menu to be invoked whenever the user "long presses" on the specified widget. The function should be called once to register a pop-up menu that will be invoked whenever a long press occurs on the specified widget. The pop-up will be displayed anytime a long press occurs unless the function is called a second time with the menu parameter set to NULL. Calling the function more than once with the menu parameter set to a non-NULL value replaces the old pop-up menu with a new one.
void alp_widget_set_activation_method (GtkWidget *widget, AlpMaxActivationMethodType activation)
 Set how to activate items.


Define Documentation

#define ALP_STATUS_MAX_BAD_PARAMETER   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00030000)
 

An API parameter failed validation.

#define ALP_STATUS_REGISTER_CALLBACK_ERROR   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00020000)
 

#define ALP_STATUS_REGISTER_POPUP_ERROR   ((alp_status_t)ALP_CLASS_MAX_WIDGETS | 0x00010000)
 


Typedef Documentation

typedef void(* AlpLongPressCallback)(gpointer data, gint x, gint y, gint x_root, gint y_root)
 

typedef void(* AlpMaxWindowShownCallback)(gpointer data)
 


Enumeration Type Documentation

enum AlpMaxActivationMethodType
 

How to activate GtkTreeView and GtkIconView item by pointing devivce.

Enumerator:
ALP_MAX_ACTIVATE_DEFAULT  do not override its default
ALP_MAX_ACTIVATE_BY_SINGLE  first tap will activate
ALP_MAX_ACTIVATE_BY_DOUBLE  frist tap to select, second tap to activate


Function Documentation

void alp_max_dialog_cancel_all void   ) 
 

Cancel all active dialogs in the current process running via alp_max_dialog_run().

This routine calls gtk_dialog_response() on all dialogs currently running via calls to alp_max_dialog_run(). This will cause those calls to return with the GTK_RESPONSE_NONE response ID, and the application should perform safe default behavior.

gint alp_max_dialog_run GtkDialog *  dialog  ) 
 

Runs a dialog using gtk_dialog_run, while tracking it for later cancellation.

This routine calls through to gtk_dialog_run, but maintains a stack of active dialogs which can later be dismissed by calling alp_max_dialog_cancel_all(). This is especially useful when an application may call into libraries which display their own dialogs. Applications need to dismiss all dialogs when they receive an exit request or relaunch with ALP_APP_BACKGROUNDED, and this API provides the infrastructure for doing so.

Parameters:
[in] dialog The instance of the GtkDialog object to display & run.
Returns:
Yields a GtkResponseType indicating the result of running the dialog.

void alp_max_gtk_init void   ) 
 

Called by launchpads to initialize the UI-specific parts of GTK+.

This routine should not be called by applications.

It does a variety of things, including modifying some of the GTK+ class structures, and installing the default support for system key handling. It is generally used by launchpads (most notably the native 'bar:' launchpad) in order to properly modify the default GTK+ environment for the app before it is launched. It can also be called directly by GTK+ UI processes which are not launched using the native launchpad (i.e., system daemons). This ensures that they will still behave properly with regard to default key handling, etc.

void alp_max_set_window_shown_callback GtkWindow *  window,
AlpMaxWindowShownCallback  func,
gpointer  data
 

Register a handler to be called after a window is on-screen, to populate the window's contents.

This routine can be used to defer time-consuming operations until after the window has been displayed. This is useful in reducing the delay in first showing a window. func will not be called until after the window has been rendered to the screen.

Parameters:
[in] window Window object which will be populated
[in] func Handler function to be called once window is on-screen
[in] data Pointer to be passed back to func when it is invoked
Note:
Once set, the callback will be invoked every time the window is shown. Setting a new callback overwrites any previous callback. Specifying a NULL func cancels the callback.

alp_status_t alp_vol_set_strm_cls_vol_controlled gchar *  stream_type,
gboolean  vol_controlled
 

application use this interface to set which audio stream's volume expected to be controlled by "volume side key".

Note:
: if the same application calls this interface more than one time with "controlled = TRUE" and different value of stream_type, then only the last setting takes effect.
Parameters:
[in] stream_type - string specifying audio stream type.
[in] vol_controlled -
true - the volume of stream strm_cls_id should be controlled by "volume side key controller" if there is no other stream playing with higher priority; if there is a stream class B with higher priority being played, the volume of stream B is controlled instead;

false - clear previous setting;

Returns:
ALP_STATUS_OK setting succeed;

ALP_INVALID_PARAM param error;

ALP_STATUS_IPC_* error status from ALP IPC;

Note:
: alp_vol_set_strm_cls_vol_controlled(NULL, false) is valid to clear previous setting;

AlpMaxActivationMethodType alp_widget_get_activation_method GtkWidget *  widget  ) 
 

Get how to activate items.

Parameters:
[in] widget an GtkTreeView or GtkIconViewWidget.
Returns:
activate method

alp_status_t alp_widget_register_long_press_callback GtkWidget *  widget,
AlpLongPressCallback  func,
gpointer  data
 

Register a generic callback function to be invoked whenever the user "long presses" on the specified widget. The function should be called once to register a callback that will be invoked whenever a long press occurs on the specified widget. The callback will be invoked anytime a long press occurs unless the function is called a second time with the func parameter set to NULL. Calling the function more than once with the func parameter set to a non-NULL value replaces the old callback function with a new one. The callback function is of type AlpLongPressCallback and receives two sets of coordinates, x and y, that provide the x and y location of the press event in the widget's window, and x_root and y_root, that provide the x and y location of the press event relative to the device's root window.

Parameters:
[in] widget - A pointer to the widget that will cause the callback to be invoked when a long press on the widget occurs.
[in] func - A pointer to the callback function to be invoked. If func is NULL, the callback is cancelled.
[in] data - A pointer to a data structure passed as a parameter to the function when its invoked.
Returns:
ALP_STATUS_REGISTER_CALLBACK_ERROR if there is a problem registering the callback.

ALP_STATUS_OK if the callback is registered successfully

alp_status_t alp_widget_register_long_press_popup GtkWidget *  widget,
GtkMenu *  popup
 

Register a pop-up menu to be invoked whenever the user "long presses" on the specified widget. The function should be called once to register a pop-up menu that will be invoked whenever a long press occurs on the specified widget. The pop-up will be displayed anytime a long press occurs unless the function is called a second time with the menu parameter set to NULL. Calling the function more than once with the menu parameter set to a non-NULL value replaces the old pop-up menu with a new one.

Parameters:
[in] widget - A pointer to the widget that will activate the popup when a long press occurs.
[in] menu - A pointer to the GtkMenu that will be popped up. If menu is NULL, the pop-up is cancelled.
Returns:
ALP_STATUS_REGISTER_POPUP_ERROR if there is a problem registering the pop-up.

ALP_STATUS_OK if the pop-up is registered successfully

void alp_widget_set_activation_method GtkWidget *  widget,
AlpMaxActivationMethodType  activation
 

Set how to activate items.

Parameters:
[in] widget an GtkTreeView or GtkIconViewWidget.
[in] activation activateion methods


Generated on Wed Jul 30 07:06:41 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.