diff options
author | David King <amigadave@amigadave.com> | 2011-11-05 13:24:38 +0100 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2011-11-05 13:24:38 +0100 |
commit | a8e5d86c622214712604a97a6ebddaa69d932bd7 (patch) | |
tree | 461f00af7171644081e38888e3e8ef0359216d0d /src/cheese-effects-manager.vala | |
parent | 884e34e97a13e049fc538a3b030b9bce38aa8d63 (diff) | |
download | cheese-a8e5d86c622214712604a97a6ebddaa69d932bd7.tar.gz |
Comment Vala methods with Valadoc markup
Add basic documentation to all methods in Vala sources.
Diffstat (limited to 'src/cheese-effects-manager.vala')
-rw-r--r-- | src/cheese-effects-manager.vala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cheese-effects-manager.vala b/src/cheese-effects-manager.vala index 42fc51c2..1d7bbc02 100644 --- a/src/cheese-effects-manager.vala +++ b/src/cheese-effects-manager.vala @@ -33,6 +33,9 @@ internal class Cheese.EffectsManager : GLib.Object effects = new ArrayList<Effect>((EqualFunc) cmp_value); } + /** + * Add the effects into the manager. + */ public void load_effects () { GLib.List<Cheese.Effect> effect_list = Cheese.Effect.load_effects (); @@ -51,6 +54,12 @@ internal class Cheese.EffectsManager : GLib.Object } } + /** + * Search for and return the requested effect. + * + * @param name the name of the effect to search for + * @return the effect that which matches the supplied name, or null + */ public Effect ? get_effect (string name) { foreach (Effect eff in effects) @@ -61,11 +70,26 @@ internal class Cheese.EffectsManager : GLib.Object return null; } + /** + * Compare two effects by the pipeline description. + * + * @param a an effect to compare against + * @param b another effect to compare against + * @return true if the effects are the same, false otherwise + */ private static bool cmp_value (Effect a, Effect b) { return a.pipeline_desc == b.pipeline_desc; } + /** + * A sort function for effects + * + * @param a an effect to sort against + * @param b another effect to sort against + * @return -1 if a is less than b, 0 if the effects are the same and 1 if a + * is greater than b + */ private static int sort_value (Effect a, Effect b) { if (a.name.down () < b.name.down ()) |