### Class

# Cogl Snippet

#### Description

    final class Cogl.Snippet : GObject.TypeInstance {
      /* No available fields */
    }

No description available.

#### Ancestors

- CoglObject

#### Constructors

###### cogl_snippet_new

Allocates and initializes a new snippet with the given source strings.

#### Instance methods

###### cogl_snippet_get_declarations

No description available.

###### cogl_snippet_get_hook

No description available.

###### cogl_snippet_get_post

No description available.

###### cogl_snippet_get_pre

No description available.

###### cogl_snippet_get_replace

No description available.

###### cogl_snippet_set_declarations

Sets a source string that will be inserted in the global scope of the generated shader when this snippet is used on a pipeline. This string is typically used to declare uniforms, attributes or functions that will be used by the other parts of the snippets.

###### cogl_snippet_set_post

Sets a source string that will be inserted after the hook point in the generated shader for the pipeline that this snippet is attached to. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

###### cogl_snippet_set_pre

Sets a source string that will be inserted before the hook point in the generated shader for the pipeline that this snippet is attached to. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

###### cogl_snippet_set_replace

Sets a source string that will be used instead of any generated source code or any previous snippets for this hook point. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

##### Methods inherited from CoglObject (2)

###### cogl_object_get_user_data

Finds the user data previously associated with `object` using the given `key`. If no user data has been associated with `object` for the given `key` this function returns NULL.

###### cogl_object_set_user_data

Associates some private `user_data` with a given `CoglObject`. To later remove the association call `cogl_object_set_user_data()` with the same `key` but NULL for the `user_data`.