ctk-main

ctk-main

Synopsis

void                ctk_init                            (gint *argc,
                                                         gchar ***argv);
void                ctk_init_after                      (gint *argc,
                                                         gchar ***argv);
void                ctk_cleanup                         (void);
gdouble             ctk_pixel_to_em                     (gint pixel_value);
gdouble             ctk_em_to_pixel                     (gdouble em_value);
void                ctk_surface_blur                    (cairo_surface_t *surface,
                                                         guint radius);

Description

Details

ctk_init ()

void                ctk_init                            (gint *argc,
                                                         gchar ***argv);

Will initialise CluTK, Clutter-GTK and Clutter. Will also do some run-time checks of the host gpu's capabilities for effects.

argc :

the number of arguments in argv. [inout]

argv :

a pointer to an array of arguments. [array length=argc][inout length=argc][allow-none length=argc]

ctk_init_after ()

void                ctk_init_after                      (gint *argc,
                                                         gchar ***argv);

Will initialise CluTK only. Use this if Clutter and Clutter-Gtk have already been intialised.

argc :

the number of arguments in argv. [inout]

argv :

a pointer to an array of arguments. [array length=argc][inout length=argc][allow-none length=argc]

ctk_cleanup ()

void                ctk_cleanup                         (void);

Cleanup object created in ctk_init. Shou;d be called when the program terminates.


ctk_pixel_to_em ()

gdouble             ctk_pixel_to_em                     (gint pixel_value);

pixel_value :

resolution-dependent measurement to convert to EMs

Returns :

the EM-value corresponding to pixel_value, considering screen-DPI and font-settings, as gdouble.

ctk_em_to_pixel ()

gdouble             ctk_em_to_pixel                     (gdouble em_value);

em_value :

resolution-independent measurement to convert to pixels

Returns :

the number of pixels corresponding to em_value, considering screen-DPI and font-settings, as gdouble.

ctk_surface_blur ()

void                ctk_surface_blur                    (cairo_surface_t *surface,
                                                         guint radius);

Applies an exponential blur on the passed surface executed on the CPU. Not as nice as a real gaussian blur, but much faster.

surface :

pointer to a cairo image-surface

radius :

unsigned integer acting as the blur-radius to apply