Skip to content

Instantly share code, notes, and snippets.

@sander
Created March 18, 2009 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sander/81282 to your computer and use it in GitHub Desktop.
Save sander/81282 to your computer and use it in GitHub Desktop.
Shell-1.0.gir:
<function name="get_vertical_gradient"
c:identifier="shell_global_get_vertical_gradient"
doc="Creates a vertical gradient actor.">
<return-value transfer-ownership="full">
<type name="Clutter.Actor" c:type="ClutterActor*"/>
</return-value>
<parameters>
<parameter name="top" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
<parameter name="bottom" transfer-ownership="none">
<type name="Clutter.Color" c:type="ClutterColor*"/>
</parameter>
</parameters>
</function>
panel.js:
let back_upper = global.get_vertical_gradient(PANEL_TOP_COLOR,
PANEL_MIDDLE_COLOR);
log(back_upper);
shell-global.c:
/**
* shell_global_get_vertical_gradient:
*
* @top: the color at the top
* @bottom: the color at the bottom
*
* Creates a vertical gradient actor.
*
* Return value: a #ClutterActor with the gradient
*/
ClutterActor *
shell_global_get_vertical_gradient (ClutterColor *top, ClutterColor *bottom)
{
ClutterActor *texture = clutter_cairo_texture_new (8, 8);
return texture;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment