Applet Framework
Redesigning the applet framework to support gobject's inheritance mechanism. This will change the hook function that all applets use to register with the system.
Blueprint information
- Status:
- Complete
- Approver:
- Neil J. Patel
- Priority:
- Essential
- Drafter:
- aarobone
- Direction:
- Needs approval
- Assignee:
- aarobone
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- aarobone
- Completed by
- aarobone
Related branches
Related bugs
Sprints
Whiteboard
The new applet hook function signature will look like this:
AwnApplet* awn_applet_
Your applet's implementation of this function will be responsible for creating itself and returning itself so it can be added to the AWN dock. Your applet will be required to extend AwnApplet via the GObject way.
Simple Example (non-inheritance way):
AwnApplet* awn_applet_
AwnApplet *applet = awn_applet_new( uid, orient, height );
gtk_
g_signal_
return applet;
}
static gboolean expose (GtkWidget *widget, GdkEventExpose *event, gpointer null) {
cairo_t *cr = NULL;
cr = gdk_cairo_create (widget->window);
if (!cr)
return FALSE;
/* Clear the background to transparent */
cairo_
cairo_
cairo_paint (cr);
/* Clean up */
cairo_destroy (cr);
return TRUE;
}