Main Page | Directories | File List | File Members

home-applet-handler.h File Reference

Definitions of Home Applet Handler. More...

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtktoolbar.h>
#include <gdk/gdkx.h>
#include <libosso.h>
#include <gtk/gtk.h>

Go to the source code of this file.

Defines

#define HOME_TYPE_APPLET_HANDLER   (home_applet_handler_get_type())
#define HOME_APPLET_HANDLER(obj)
#define HOME_APPLET_HANDLER_CLASS(klass)
#define IS_HOME_APPLET_HANDLER(obj)
#define IS_HOME_APPLET_HANDLER_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), HOME_TYPE_APPLET_HANDLER))

Typedefs

typedef void *(* AppletInitializeFn )(void *state_data, int *state_size, GtkWidget **widget)
typedef int(* AppletSaveStateFn )(void *data, void **state_data, int *state_size)
typedef void(* AppletBackgroundFn )(void *data)
typedef void(* AppletForegroundFn )(void *data)
typedef GtkWidget *(* AppletSettingsFn )(void *data, GtkWindow *parent)
typedef void(* AppletDeinitializeFn )(void *data)
typedef _HomeAppletHandler HomeAppletHandler
typedef _HomeAppletHandlerClass HomeAppletHandlerClass
typedef _HomeAppletHandlerPrivate HomeAppletHandlerPrivate

Functions

GType home_applet_handler_get_type (void)
HomeAppletHandler * home_applet_handler_new (const char *desktoppath, 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)
const gchar * home_applet_handler_get_desktop_filepath (HomeAppletHandler *handler)
const 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)
void home_applet_handler_store_size (HomeAppletHandler *handler)
void home_applet_handler_set_size (HomeAppletHandler *handler, gint width, gint height)
void home_applet_handler_get_size (HomeAppletHandler *handler, gint *width, gint *height)
void home_applet_handler_set_minimum_size (HomeAppletHandler *handler, gint minwidth, gint minheight)
void home_applet_handler_get_minimum_size (HomeAppletHandler *handler, gint *minwidth, gint *minheight)
void home_applet_handler_set_resizable (HomeAppletHandler *handler, gboolean resizable_width, gboolean resizable_height)
void home_applet_handler_get_resizable (HomeAppletHandler *handler, gboolean *resizable_width, gboolean *resizable_height)
GtkEventBox * home_applet_handler_get_eventbox (HomeAppletHandler *handler)
GtkWidget * home_applet_handler_get_widget (HomeAppletHandler *handler)


Detailed Description

Definitions of Home Applet Handler.


Define Documentation

#define HOME_APPLET_HANDLER obj   ) 
 

Value:

(GTK_CHECK_CAST (obj, HOME_TYPE_APPLET_HANDLER, \
    HomeAppletHandler))

#define HOME_APPLET_HANDLER_CLASS klass   ) 
 

Value:

(GTK_CHECK_CLASS_CAST ((klass),\
    HOME_TYPE_APPLET_HANDLER, HomeAppletHandlerClass))

#define IS_HOME_APPLET_HANDLER obj   ) 
 

Value:

(GTK_CHECK_TYPE (obj, \
    HOME_TYPE_APPLET_HANDLER))


Typedef Documentation

typedef struct _HomeAppletHandlerPrivate HomeAppletHandlerPrivate
 

HomeAppletHandlerPrivate:

This structure contains just internal data. It should not be accessed directly.


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_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

const 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

const 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

void home_applet_handler_get_minimum_size HomeAppletHandler *  handler,
gint *  minwidth,
gint *  minheight
 

home_applet_handler_get_minimum_size:

Called when the applet minimum size is wanted. If value returned is zero, resizing is not allowed to dimension.

Parameters:
handler A handler as returned by home_applet_handler_new.
minwidth storage place where width minimum is saved
minheight storage place where height minimum is saved

void home_applet_handler_get_resizable HomeAppletHandler *  handler,
gboolean *  resizable_width,
gboolean *  resizable_height
 

home_applet_handler_get_resizable:

Called when the applet resizable dimensions statuses are wanted. If value returned is FALSE, resizing is not allowed to dimension.

Parameters:
handler A handler as returned by home_applet_handler_new.
resizable_width storage place where resizable status of width is saved
resizable_height storage place where resizable status of height is saved

void home_applet_handler_get_size HomeAppletHandler *  handler,
gint *  width,
gint *  height
 

home_applet_handler_get_size:

Called when the applet size is wanted.

Parameters:
handler A handler as returned by home_applet_handler_new.
width storage place where width is saved
height storage place where height is saved

GType home_applet_handler_get_type void   ) 
 

home_applet_handler_get_type:

A GType of applet handler

HomeAppletHandler* home_applet_handler_new const char *  desktoppath,
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
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.
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_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

void home_applet_handler_set_minimum_size HomeAppletHandler *  handler,
gint  minwidth,
gint  minheight
 

home_applet_handler_set_minimum_size:

Called when the applet minimum size is wanted to set. If value is zero, resizing is not allowed to dimension.

Parameters:
handler A handler as returned by home_applet_handler_new.
minwidth New minimum width to set
minheight New minimum height to set

void home_applet_handler_set_resizable HomeAppletHandler *  handler,
gboolean  resizable_width,
gboolean  resizable_height
 

home_applet_handler_set_resizable:

Called when the applet resizable dimensions statuses are wanted to set. If value is FALSE, resizing is not allowed to dimension.

Parameters:
handler A handler as returned by home_applet_handler_new.
resizable_width storage place where resizable status of width is saved
resizable_height storage place where resizable status of height is saved

void home_applet_handler_set_size HomeAppletHandler *  handler,
gint  width,
gint  height
 

home_applet_handler_set_size:

Called when the applet size is wanted to set

Parameters:
handler A handler as returned by home_applet_handler_new.
width New width to set
height New height to set

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

void home_applet_handler_store_size HomeAppletHandler *  handler  ) 
 

home_applet_handler_set_size:

Called when the applet size is wanted to store to handler from eventbox.

Parameters:
handler A handler as returned by home_applet_handler_new.


Generated on Thu Dec 21 11:26:52 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2