[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kjsembed
Subject:    [kjsembed] kdebindings/kjsembed/bindings
From:       Ian Reinhart Geiser <geiseri () kde ! org>
Date:       2004-06-04 22:52:06
Message-ID: 20040604225206.4BF6412661 () office ! kde ! org
[Download RAW message or body]

CVS commit by geiseri: 

Resolve conflicts.


  M +7 -1      dcop_imp.cpp   1.19
  M +19 -3     image_imp.cpp   1.21
  M +9 -3      image_imp.h   1.20
  M +4 -1      kconfig_imp.cpp   1.7


--- kdebindings/kjsembed/bindings/dcop_imp.cpp  #1.18:1.19
@@ -239,4 +239,5 @@ void JSDCOPClient::addBindings( KJS::Exe
         { MethodDCOPStart, "dcopStart"},
         { MethodappId, "appId"},
+        { MethodisApplicationRegistered, "isApplicationRegistered" },
         { 0, 0 }
     };
@@ -327,4 +328,9 @@ KJS::Value JSDCOPClient::call( KJS::Exec
                 retValue = KJS::String( kapp->dcopClient()->appId().data() );
                 break;
+        case MethodisApplicationRegistered: {
+                QString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() \
: QString::null; +                retValue = KJS::Boolean( \
kapp->dcopClient()->isApplicationRegistered( arg0.latin1() )  ); +                \
break; +        }
         case Methodsend:
                 return dcopSend( exec, self, args );

--- kdebindings/kjsembed/bindings/image_imp.cpp  #1.20:1.21
@@ -71,4 +71,6 @@ void ImageImp::addBindings( KJS::ExecSta
         { MethodsetPixmap, "setPixmap" },
         { MethodinvertPixels, "invertPixels" },
+        { Methodpixel, "pixel"},
+        { MethodsetPixel, "setPixel"},
         { Methodmirror, "mirror" },
         { 0, 0 }
@@ -159,7 +161,21 @@ KJS::Value ImageImp::call( KJS::ExecStat
             break;
         }
-    case MethodinvertPixels:
-    {
-        img.invertPixels(extractBool(exec, args, 0));
+    case MethodinvertPixels: {
+            bool alpha = extractBool( exec, args, 0);
+            img.invertPixels(alpha);
+            break;
+    }
+    case Methodpixel: {
+            int x = extractInt(exec, args, 0);
+            int y = extractInt(exec, args, 1);
+            retValue = KJS::Number( img.pixel(x, y) );
+            break;
+    }
+    case MethodsetPixel: {
+            int x = extractInt(exec, args, 0);
+            int y = extractInt(exec, args, 1);
+            uint col = extractUInt(exec, args, 2);
+            img.setPixel(x, y, col);
+            break;
     }
     case Methodmirror:

--- kdebindings/kjsembed/bindings/image_imp.h  #1.19:1.20
@@ -46,5 +46,11 @@ class ImageImp : public JSProxyImp {
         MethodisOk, Methodpixmap, Methodload, Methodsave,MethodsetFormat,
         MethodsmoothScale, MethodsmoothScaleMin, MethodsetPixmap, \
                MethodinvertPixels,
-        Methodmirror
+
+        Methodpixel, MethodsetPixel, Methodmirror
+
+
+
+
+
     };
 

--- kdebindings/kjsembed/bindings/kconfig_imp.cpp  #1.6:1.7
@@ -32,5 +32,8 @@ Config::Config( QObject *parent, const c
     : BindingObject(parent, name)
 {
+        if( name == 0)
     m_config = kapp->config();
+        else
+                m_config = new KConfig(name);
 }
 


_______________________________________________
kjsembed mailing list
kjsembed@kde.org
https://mail.kde.org/mailman/listinfo/kjsembed


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic