home-applet-handler.c File Reference

Implementation of Home Applet Handler. More...

#include "home-applet-handler.h"
#include "hildon-home-plugin-interface.h"
#include "hildon-home-interface.h"
#include <string.h>
#include <dlfcn.h>
#include <gtk/gtk.h>
#include <osso-log.h>

Classes

struct  _HomeAppletHandlerPrivate

Defines

#define HOME_APPLET_HANDLER_LIBRARY_DIR   "/usr/lib/hildon-home/"
#define HOME_APPLET_HANDLER_GET_PRIVATE(obj)

Enumerations

enum  {
  SYMBOL_INITIALIZE = 0, SYMBOL_SAVE_STATE, SYMBOL_BACKGROUND, SYMBOL_FOREGROUND,
  SYMBOL_SETTINGS, SYMBOL_DEINITIALIZE, MAX_SYMBOLS
}

Functions

GType home_applet_handler_get_type (void)
HomeAppletHandler * home_applet_handler_new (const char *desktoppath, const char *libraryfile, void *state_data, int *state_size)
int home_applet_handler_save_state (HomeAppletHandler *handler, void **state_data, int *state_size)
void home_applet_handler_background (HomeAppletHandler *handler)
void home_applet_handler_foreground (HomeAppletHandler *handler)
GtkWidget * home_applet_handler_settings (HomeAppletHandler *handler, GtkWindow *parent)
void home_applet_handler_deinitialize (HomeAppletHandler *handler)
gchar * home_applet_handler_get_desktop_filepath (HomeAppletHandler *handler)
gchar * home_applet_handler_get_libraryfile (HomeAppletHandler *handler)
void home_applet_handler_set_coordinates (HomeAppletHandler *handler, gint x, gint y)
void home_applet_handler_get_coordinates (HomeAppletHandler *handler, gint *x, gint *y)
GtkEventBox * home_applet_handler_get_eventbox (HomeAppletHandler *handler)


Detailed Description

Implementation of Home Applet Handler.


Define Documentation

#define HOME_APPLET_HANDLER_GET_PRIVATE obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
     HOME_TYPE_APPLET_HANDLER, HomeAppletHandlerPrivate))


Function Documentation

void home_applet_handler_background HomeAppletHandler *  handler  ) 
 

home_applet_handler_background:

Called when Home goes to backround.

Applet should stop all timers when this is called.

Parameters:
handler A handler as returned by home_applet_handler_new.

void home_applet_handler_deinitialize HomeAppletHandler *  handler  ) 
 

home_applet_handler_deinitialize:

Called when Home unloads the applet from memory.

Applet should deallocate all the resources needed.

Parameters:
handler A handler as returned by home_applet_handler_new.

void home_applet_handler_foreground HomeAppletHandler *  handler  ) 
 

home_applet_handler_foreground:

Called when Home goes to foreground.

Applet should start periodic UI updates again if needed.

Parameters:
handler A handler as returned by home_applet_handler_new.

void home_applet_handler_get_coordinates HomeAppletHandler *  handler,
gint *  x,
gint *  y
 

home_applet_handler_get_get_coordinates:

Called when the applet coordinates are wanted

Parameters:
handler A handler as returned by home_applet_handler_new.
x Place for x coordinate of applet to be saved
y Place for y coordinate of applet to be saved

gchar* home_applet_handler_get_desktop_filepath HomeAppletHandler *  handler  ) 
 

home_applet_handler_get_desktop_filepath:

Called when desktopfilepath is wanted

Parameters:
handler A handler as returned by home_applet_handler_new.
Returns:
desktop filepath

GtkEventBox* home_applet_handler_get_eventbox HomeAppletHandler *  handler  ) 
 

home_applet_handler_get_eventbox:

Called when eventbox of applet is wanted

Parameters:
handler A handler as returned by home_applet_handler_new.
Returns:
eventbox of applet

gchar* home_applet_handler_get_libraryfile HomeAppletHandler *  handler  ) 
 

home_applet_handler_get_libraryfile:

Called when libraryfile is wanted

Parameters:
handler A handler as returned by home_applet_handler_new.
Returns:
library filepath

GType home_applet_handler_get_type void   ) 
 

home_applet_handler_get_type:

Returns:
A GType of applet handler

HomeAppletHandler* home_applet_handler_new const char *  desktoppath,
const char *  libraryfile,
void *  state_data,
int *  state_size
 

home_applet_handler_new:

This is called when Home loads the applet from handler. Applet may load it self in initial state or in state given. It loads a GtkWidget that Home will use to display the applet.

Parameters:
desktoppath The path of the applet .desktop definition file. This is also unique identifier for applet in Home context
libraryfile The file name of the applet implementation library
state_data Statesaved data as returned by applet_save_state. NULL if applet is to be loaded in initial state.
state_size Size of the state data.
Returns:
A .

int home_applet_handler_save_state HomeAppletHandler *  handler,
void **  state_data,
int *  state_size
 

home_applet_handler_save_state:

Method called to save the UI state of the applet

Parameters:
handler A handler as returned by home_applet_handler_new.
state_data Applet allocates memory for state data and stores pointer here.
Must be freed by the calling application

Parameters:
state_size Applet stores the size of the state data allocated here.
Returns:
'1' if successfull.

void home_applet_handler_set_coordinates HomeAppletHandler *  handler,
gint  x,
gint  y
 

home_applet_handler_get_set_coordinates:

Called when the applet coordinates are set

Parameters:
handler A handler as returned by home_applet_handler_new.
x New x coordinate for applet
y New y coordinate for applet

GtkWidget* home_applet_handler_settings HomeAppletHandler *  handler,
GtkWindow *  parent
 

home_applet_handler_settings:

Called when the applet needs to open a properties dialog

Parameters:
handler A handler as returned by home_applet_handler_new.
parent a parent window.
Returns:
usually gtkmenuitem


Generated on Fri Jun 9 16:23:16 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6