[gjs: 18/45] [cairo] Update indentation of private header



commit ddac95c63d4f1eeaa54bff8436476d827ab57da6
Author: Johan Dahlin <johan gnome org>
Date:   Thu Feb 25 15:17:28 2010 -0300

    [cairo] Update indentation of private header

 modules/cairo-context.c  |    8 ++--
 modules/cairo-gradient.c |    8 ++--
 modules/cairo-pattern.c  |    4 +-
 modules/cairo-private.h  |  114 +++++++++++++++++++++++++++++-----------------
 modules/cairo-surface.c  |    4 +-
 modules/cairo.c          |   26 +++++-----
 6 files changed, 99 insertions(+), 65 deletions(-)
---
diff --git a/modules/cairo-context.c b/modules/cairo-context.c
index df86f30..0cbfd05 100644
--- a/modules/cairo-context.c
+++ b/modules/cairo-context.c
@@ -228,10 +228,10 @@ _gjs_cairo_context_construct_internal(JSContext *context,
 
 static JSBool
 gjs_cairo_context_constructor(JSContext *context,
-                          JSObject  *obj,
-                          uintN      argc,
-                          jsval     *argv,
-                          jsval     *retval)
+                              JSObject  *obj,
+                              uintN      argc,
+                              jsval     *argv,
+                              jsval     *retval)
 {
     JSObject *surface_wrapper;
     cairo_surface_t *surface;
diff --git a/modules/cairo-gradient.c b/modules/cairo-gradient.c
index daef51c..ad813a7 100644
--- a/modules/cairo-gradient.c
+++ b/modules/cairo-gradient.c
@@ -67,10 +67,10 @@ addColorStopRGB_func(JSContext *context,
 
 static JSBool
 addColorStopRGBA_func(JSContext *context,
-                     JSObject  *object,
-                     uintN      argc,
-                     jsval     *argv,
-                     jsval     *retval)
+                      JSObject  *object,
+                      uintN      argc,
+                      jsval     *argv,
+                      jsval     *retval)
 {
     double offset, red, green, blue, alpha;
     cairo_pattern_t *pattern;
diff --git a/modules/cairo-pattern.c b/modules/cairo-pattern.c
index 5955d83..45404c3 100644
--- a/modules/cairo-pattern.c
+++ b/modules/cairo-pattern.c
@@ -43,7 +43,9 @@ gjs_cairo_pattern_finalize(JSContext *context,
 }
 
 void
-gjs_cairo_pattern_construct(JSContext *context, JSObject *obj, cairo_pattern_t *pattern)
+gjs_cairo_pattern_construct(JSContext       *context,
+                            JSObject        *obj,
+                            cairo_pattern_t *pattern)
 {
     GjsCairoPattern *priv;
 
diff --git a/modules/cairo-private.h b/modules/cairo-private.h
index f420aea..1062fa4 100644
--- a/modules/cairo-private.h
+++ b/modules/cairo-private.h
@@ -26,84 +26,114 @@
 #include <cairo.h>
 
 typedef struct {
-    void *dummy;
-    JSContext  *context;
-    JSObject   *object;
+    void            *dummy;
+    JSContext       *context;
+    JSObject        *object;
     cairo_surface_t *surface;
 } GjsCairoSurface;
 
-JSBool gjs_js_define_cairo_stuff(JSContext *context,
-                                 JSObject  *module_obj);
+JSBool           gjs_js_define_cairo_stuff              (JSContext       *context,
+                                                         JSObject        *module);
 
-jsval gjs_cairo_context_create_proto(JSContext *context, JSObject *module,
-                                     const char *proto_name, JSObject *parent);
-cairo_t *gjs_cairo_context_get_cr(JSContext *context,
-                                  JSObject *object);
-JSObject * gjs_cairo_context_from_cr(JSContext *context,
-                                     cairo_t *cr);
+jsval            gjs_cairo_context_create_proto         (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
+cairo_t *        gjs_cairo_context_get_cr               (JSContext       *context,
+                                                         JSObject        *object);
+JSObject *       gjs_cairo_context_from_cr              (JSContext       *context,
+                                                         cairo_t         *cr);
 
 /* surface */
-jsval gjs_cairo_surface_create_proto(JSContext *context, JSObject *module,
-                                     const char *proto_name, JSObject *parent);
-void gjs_cairo_surface_construct(JSContext *context, JSObject *obj, cairo_surface_t *surface);
-void gjs_cairo_surface_finalize_surface(JSContext *context, JSObject  *obj);
-cairo_surface_t * gjs_cairo_surface_get_surface(JSContext *context,
-                                                JSObject *object);
+jsval            gjs_cairo_surface_create_proto         (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
+void             gjs_cairo_surface_construct            (JSContext       *context,
+                                                         JSObject        *object,
+                                                         cairo_surface_t *surface);
+void             gjs_cairo_surface_finalize_surface     (JSContext       *context,
+                                                         JSObject        *object);
+cairo_surface_t* gjs_cairo_surface_get_surface          (JSContext       *context,
+                                                         JSObject        *object);
 
 /* image surface */
 #ifdef CAIRO_HAS_IMAGE_SURFACE
-jsval gjs_cairo_image_surface_create_proto(JSContext *context, JSObject *module,
-                                           const char *proto_name, JSObject *parent);
-void gjs_cairo_image_surface_init(JSContext *context, JSObject *obj);
+jsval            gjs_cairo_image_surface_create_proto   (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
+void             gjs_cairo_image_surface_init           (JSContext       *context,
+                                                         JSObject        *object);
 #endif
 
 /* postscript surface */
 #ifdef CAIRO_HAS_PS_SURFACE
-jsval gjs_cairo_ps_surface_create_proto(JSContext *context, JSObject *module,
-                                        const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_ps_surface_create_proto      (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 #endif
 
 /* pdf surface */
 #ifdef CAIRO_HAS_PDF_SURFACE
-jsval gjs_cairo_pdf_surface_create_proto(JSContext *context, JSObject *module,
-                                         const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_pdf_surface_create_proto     (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 #endif
 
 /* svg surface */
 #ifdef CAIRO_HAS_SVG_SURFACE
-jsval gjs_cairo_svg_surface_create_proto(JSContext *context, JSObject *module,
-                                         const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_svg_surface_create_proto     (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 #endif
 
 /* pattern */
 typedef struct {
-    void *dummy;
-    JSContext  *context;
-    JSObject   *object;
+    void            *dummy;
+    JSContext       *context;
+    JSObject        *object;
     cairo_pattern_t *pattern;
 } GjsCairoPattern;
 
-jsval gjs_cairo_pattern_create_proto(JSContext *context, JSObject *module,
-                                     const char *proto_name, JSObject *parent);
-void gjs_cairo_pattern_construct(JSContext *context, JSObject *obj, cairo_pattern_t *pattern);
-void gjs_cairo_pattern_finalize_pattern(JSContext *context, JSObject *obj);
-cairo_pattern_t * gjs_cairo_pattern_get_pattern(JSContext *context, JSObject *object);
+jsval            gjs_cairo_pattern_create_proto         (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
+void             gjs_cairo_pattern_construct            (JSContext       *context,
+                                                         JSObject        *object,
+                                                         cairo_pattern_t *pattern);
+void             gjs_cairo_pattern_finalize_pattern     (JSContext       *context,
+                                                         JSObject        *object);
+cairo_pattern_t* gjs_cairo_pattern_get_pattern          (JSContext       *context,
+                                                         JSObject        *object);
 
 /* gradient */
-jsval gjs_cairo_gradient_create_proto(JSContext *context, JSObject *module,
-                                     const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_gradient_create_proto        (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 
 /* linear gradient */
-jsval gjs_cairo_linear_gradient_create_proto(JSContext *context, JSObject *module,
-                                             const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_linear_gradient_create_proto (JSContext       *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 
 /* radial gradient */
-jsval gjs_cairo_radial_gradient_create_proto(JSContext *context, JSObject *module,
-                                             const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_radial_gradient_create_proto(JSContext        *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 
 /* surface pattern */
-jsval gjs_cairo_surface_pattern_create_proto(JSContext *context, JSObject *module,
-                                             const char *proto_name, JSObject *parent);
+jsval            gjs_cairo_surface_pattern_create_proto(JSContext        *context,
+                                                         JSObject        *module,
+                                                         const char      *proto_name,
+                                                         JSObject        *parent);
 
 #endif /* __CAIRO_PRIVATE_H__ */
 
diff --git a/modules/cairo-surface.c b/modules/cairo-surface.c
index d0dfcaa..815504e 100644
--- a/modules/cairo-surface.c
+++ b/modules/cairo-surface.c
@@ -43,7 +43,9 @@ gjs_cairo_surface_finalize(JSContext *context,
 }
 
 void
-gjs_cairo_surface_construct(JSContext *context, JSObject *obj, cairo_surface_t *surface)
+gjs_cairo_surface_construct(JSContext       *context,
+                            JSObject        *obj,
+                            cairo_surface_t *surface)
 {
     GjsCairoSurface *priv;
 
diff --git a/modules/cairo.c b/modules/cairo.c
index a013c06..d39e84e 100644
--- a/modules/cairo.c
+++ b/modules/cairo.c
@@ -27,25 +27,25 @@
 #include "cairo-private.h"
 
 JSBool
-gjs_js_define_cairo_stuff(JSContext      *context,
-                          JSObject       *module_obj)
+gjs_js_define_cairo_stuff(JSContext *context,
+                          JSObject  *module)
 {
     jsval obj;
     JSObject *surface_proto, *pattern_proto, *gradient_proto;
 
-    obj = gjs_cairo_context_create_proto(context, module_obj,
+    obj = gjs_cairo_context_create_proto(context, module,
                                          "Context", NULL);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 
-    obj = gjs_cairo_surface_create_proto(context, module_obj,
+    obj = gjs_cairo_surface_create_proto(context, module,
                                          "Surface", NULL);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
     surface_proto = JSVAL_TO_OBJECT(obj);
 
 #if CAIRO_HAS_IMAGE_SURFACE
-    obj = gjs_cairo_image_surface_create_proto(context, module_obj,
+    obj = gjs_cairo_image_surface_create_proto(context, module,
                                                "ImageSurface", surface_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
@@ -53,49 +53,49 @@ gjs_js_define_cairo_stuff(JSContext      *context,
 #endif
 
 #if CAIRO_HAS_PS_SURFACE
-    obj = gjs_cairo_ps_surface_create_proto(context, module_obj,
+    obj = gjs_cairo_ps_surface_create_proto(context, module,
                                             "PSSurface", surface_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 #endif
 
 #if CAIRO_HAS_PDF_SURFACE
-    obj = gjs_cairo_pdf_surface_create_proto(context, module_obj,
+    obj = gjs_cairo_pdf_surface_create_proto(context, module,
                                              "PDFSurface", surface_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 #endif
 
 #if CAIRO_HAS_SVG_SURFACE
-    obj = gjs_cairo_svg_surface_create_proto(context, module_obj,
+    obj = gjs_cairo_svg_surface_create_proto(context, module,
                                              "SVGSurface", surface_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 #endif
 
-    obj = gjs_cairo_pattern_create_proto(context, module_obj,
+    obj = gjs_cairo_pattern_create_proto(context, module,
                                          "Pattern", NULL);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
     pattern_proto = JSVAL_TO_OBJECT(obj);
 
-    obj = gjs_cairo_gradient_create_proto(context, module_obj,
+    obj = gjs_cairo_gradient_create_proto(context, module,
                                          "Gradient", pattern_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
     gradient_proto = JSVAL_TO_OBJECT(obj);
 
-    obj = gjs_cairo_linear_gradient_create_proto(context, module_obj,
+    obj = gjs_cairo_linear_gradient_create_proto(context, module,
                                                  "LinearGradient", gradient_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 
-    obj = gjs_cairo_radial_gradient_create_proto(context, module_obj,
+    obj = gjs_cairo_radial_gradient_create_proto(context, module,
                                                  "RadialGradient", gradient_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;
 
-    obj = gjs_cairo_surface_pattern_create_proto(context, module_obj,
+    obj = gjs_cairo_surface_pattern_create_proto(context, module,
                                                  "SurfacePattern", pattern_proto);
     if (obj == JSVAL_NULL)
         return JS_FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]