Permalink
Browse files

Misc whitespace changes

  • Loading branch information...
1 parent 99b72ab commit 6f8c325fdbb1e5fa30a082a33e7d7d2c3364b03d @tim-smart tim-smart committed Mar 30, 2011
Showing with 22 additions and 22 deletions.
  1. +3 −3 src/ngtk_button.cc
  2. +10 −9 src/ngtk_hsv.cc
  3. +6 −6 src/ngtk_image.h
  4. +3 −4 src/ngtk_widget.h
View
@@ -76,10 +76,10 @@ Handle<Value> Button::SetImage (const Arguments &args) {
HandleScope scope;
GtkWidget *button = Button::Data(args.This());
- GtkWidget *other = Image::Data(args[0]->ToObject());
+ GtkWidget *image = Image::Data(args[0]->ToObject());
+
+ gtk_button_set_image(GTK_BUTTON(button), image);
- gtk_button_set_image(GTK_BUTTON(button), other);
-
return args.This();
}
View
@@ -58,9 +58,9 @@ Handle<Value> HSV::SetColor (const Arguments &args) {
HandleScope scope;
GtkWidget *hsv = HSV::Data(args.This());
- double h = args[0]->NumberValue();
- double s = args[1]->NumberValue();
- double v = args[2]->NumberValue();
+ double h = args[0]->NumberValue();
+ double s = args[1]->NumberValue();
+ double v = args[2]->NumberValue();
gtk_hsv_set_color(GTK_HSV(hsv), h, s, v);
@@ -78,9 +78,9 @@ Handle<Value> HSV::GetColor (const Arguments &args) {
HandleScope scope;
GtkWidget *hsv = HSV::Data(args.This());
- double h = 0;
- double s = 0;
- double v = 0;
+ double h = 0;
+ double s = 0;
+ double v = 0;
gtk_hsv_get_color(GTK_HSV(hsv), &h, &s, &v);
v8::Handle<v8::Array> c = v8::Array::New(3);
@@ -154,8 +154,8 @@ void HSV::SetPrototypeMethods (Handle<FunctionTemplate> constructor_template) {
Widget::SetPrototypeMethods(constructor_template);
- NGTK_SET_PROTOTYPE_METHOD(constructor_template, "setColor", HSV::SetColor);
- NGTK_SET_PROTOTYPE_METHOD(constructor_template, "getColor", HSV::GetColor);
+ NGTK_SET_PROTOTYPE_METHOD(constructor_template, "setColor", HSV::SetColor);
+ NGTK_SET_PROTOTYPE_METHOD(constructor_template, "getColor", HSV::GetColor);
NGTK_SET_METHOD(constructor_template, "hsvToRgb", HsvToRgb);
NGTK_SET_METHOD(constructor_template, "rgbToHsv", RgbToHsv);
@@ -184,7 +184,8 @@ void HSV::Initialize (Handle<Object> target) {
HandleScope scope;
Local<FunctionTemplate> t = FunctionTemplate::New(HSV::New);
- constructor_template = Persistent<FunctionTemplate>::New(t);
+ constructor_template = Persistent<FunctionTemplate>::New(t);
+
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
constructor_template->SetClassName(String::NewSymbol("HSV"));
View
@@ -7,16 +7,16 @@ namespace ngtk {
class Image : public Widget {
public:
- static void SetPrototypeMethods (v8::Handle<v8::FunctionTemplate> constructor_template);
- static void Initialize (v8::Handle<v8::Object> target);
- static Image* New (void); // public constructor
- static bool HasInstance (v8::Handle<v8::Value> val);
+ static void SetPrototypeMethods (v8::Handle<v8::FunctionTemplate> constructor_template);
+ static void Initialize (v8::Handle<v8::Object> target);
+ static Image* New (void); // public constructor
+ static bool HasInstance (v8::Handle<v8::Value> val);
private:
static v8::Persistent<v8::FunctionTemplate> constructor_template;
- static v8::Handle<v8::Value> New (const v8::Arguments &args);
- static v8::Handle<v8::Value> SetFromFile (const v8::Arguments &args);
+ static v8::Handle<v8::Value> New (const v8::Arguments &args);
+ static v8::Handle<v8::Value> SetFromFile (const v8::Arguments &args);
Image(void);
};
View
@@ -2,7 +2,6 @@
#define NGTK_WIDGET_H_
#include <node_object_wrap.h> // node::ObjectWrap
-#include "v8.h"
#include "ngtk.h"
#include <vector>
@@ -34,9 +33,9 @@ class Widget : public node::ObjectWrap {
static std::vector<SignalCallback> *callbacks;
// Event handlers.
- static void SignalBare (GtkWidget *widget, gpointer callback_ptr);
- static gboolean SignalBoolean(GtkWidget *widget, gpointer callback_ptr);
- static gboolean SignalFocus (GtkWidget *widget, GtkDirectionType direction, gpointer callback_ptr);
+ static void SignalBare (GtkWidget *widget, gpointer callback_ptr);
+ static gboolean SignalBoolean (GtkWidget *widget, gpointer callback_ptr);
+ static gboolean SignalFocus (GtkWidget *widget, GtkDirectionType direction, gpointer callback_ptr);
private:
// Add signal handler.

0 comments on commit 6f8c325

Please sign in to comment.