Extended System Control plugin for DesktopX

Posted by Julien on June 22nd, 2009

image

A new week, a new plugin…

This one was asked by Zubaz to better handle multi-monitor systems. As it turns out, the virtual screen coordinates are not nearly enough to be able to position objects on multi-monitor systems. WMI is exposing monitor information, but it does not seems to work reliably (it only gives information for the first monitor on my system for example).

The plan for this plugin is to include all misc functionality that isn’t big enough to warrant a plugin of it’s own. At this time, the only thing available is monitor/screen information, but I have a few more things already planned.

MonitorInfo object:

This is a script "object" with the following properties:

  • IsPrimary
  • Left
  • Top
  • Bottom
  • Right

SysControl object (the main object exposed by the plugin):

SysControl.Screens

Gets an array of MonitorInfo objects

SysControl.GetScreen(index)

Returns the MonitorInfo for the given screen

SysControl.NumberOfScreens

Gets the number of active screens on the machine

I added the last method/property pair for JScript users, as working with VBArray can be a pain. It’s giving the same exact info as the first property.

Download

You can download a test version here (set to expire on 10/5/2009).

If you have ideas for stuff to add to this plugin, feel free to post them on the DesktopX 4.x request thread.

DXInstance: command line & single instance plugin for DesktopX

Posted by Julien on June 17th, 2009

This is a very small plugin for DesktopX that exposes command line information in your scripts, allowing you to act on certain parameters. It also adds a new callback that is called when another instance is started and gives you its command line arguments.

Use

  • associate a gadget to a custom file type and be able to do custom processing when called with the file path as an argument.
  • make the "Tasks" category of the jump list in Windows 7 usable (they are shortcuts and supposed to be available even if the application is not running, so they need to be shortcuts to the single exe, not the extracted one).
  • handle any other custom command line arguments like a normal application.

Documentation

Remember to select “Allow multiple instances of the application to run” when exporting your gadget!

Here are the new functions/callbacks available to your scripts:

Instance.CommandLine

Get the full command line (including the path to the executable and DesktopX-specific arguments)

Instance.CommandLineArgs

Get an array of command line arguments. Command line arguments have been cleaned up to remove DesktopX-specific arguments (in the case of single-exe gadgets)

Instance.IsFirstInstance

Will be True if this is the first instance to run, False otherwise. It is preferable to check for it at startup and close the gadget accordingly, as only the first instance will receive a callback message when a new instance is started.

Instance_OnNewInstance(commandLineArgs)

Gets called when another instance is started. The command line arguments are passed in an array.

Download

You can download a test version here.

 

Note: This plugin will not work with single-exe gadgets (or widgets)! Due to the way simple deployment gadget’s command line is handled, adding arguments will result in the gadget not even starting (it’s treating almost any command line argument as a path…). I sent a bug report/request to Stardock, but in the meantime, you will have to use custom deployment. I have a binary patch available for DXAppCustom.bin that fixes the command line parsing and allows gadgets to get the original command line (but disables ObjectBar-related code as it’s kind of a hack), so it’s definitely fixable. Let’s hope the next version of DX will have a fix.

DXTaskbar7: a DesktopX plugin to access Windows 7 taskbar extensions

Posted by Julien on June 12th, 2009

DXTaskbar7 - Preview

With Windows 7 a few months away, it was time to bring some of the new features to DesktopX. One of the things gadgets could really benefit from is the new extended taskbar. It has a few new options such as jump lists, tasks, thumbnails toolbars, icon overlays, progress bars and thumbnails.

DXTaskbar7 is a new plugin for DesktopX that allows you to access all those new features from your DesktopX scripts.

This is still a work in progress, but it already has support for progress bar, icon overlays and thumbnails buttons, with thumbnails handling still being worked on.

How to help

Download the DXTaskbar Dev package and start creating gadgets &widgets!

What to look for

  • Tab handling problems: tabs not appearing, tab name and icon not properly updated
  • Toolbar: icon corruption
  • crashes or memory leaks

What is broken/not working properlyDeliveryTracker-Win7

  • ActiveX controls are not drawn on the tab preview (this is a problem with DesktopX)
  • There is close to no error handling and checking, so if you do not pass proper values, it will either do nothing or crash…
  • This is a DEBUG build, so it’s going to be slower than normal

Links

Changelog

1.0 Build 198:

  • First test version

Download

You can download a test version here. Please do not use the DXTaskbar7 plugin in released objects and widgets yet. This version of the plugin will expire on the 10/01/2009.

Animator Script Component 1.1

Posted by Julien on May 12th, 2009

imageA small update for the Animator Component is now available. Changes from the internal version have been merged and a new method to remove all animations related to a specific object has been added.

The Animator Sample now has checkboxes to enable/disable a specific animation and the requested script “export” has been added. You can now tweak your object animation and have a ready to use script copied to the clipboard.

Download it from Wincustomize.

DXCanvas 2.0

Posted by Julien on May 12th, 2009

image I released an update for DXCanvas yesterday. This new version is in sync with the latest Canvas specifications. Error handling has been overhauled and is now closer to the spec (some things still aren’t the same as we are not running inside a browser and thus do not have access to a real DOM tree).

The Canvas Controller widget has received a lot of updates and can now run the Canvas test suite and generate a test report. We now pass 92.1% of the tests.

The source code has also been moved to a public repository on Google Code.

Download

You can get DXCanvas from here or from Wincustomize.

Changelog

2.0 Build 174:

  • Sync with the latest version of the Canvas specifications
  • Added new createImageDataFrom function to create an new ImageData instance using an existing one dimensions
  • Exceptions now return the correct DOMException error code
  • Completed documentation of IDL interface
  • Updated Canvas Controller with a pin to desktop icon
  • Integrated test suite into Canvas Controller (allows to run all tests at once and generate a report)
  • Updated test suite generator to parse the XML generated by Canvas Controller
  • Fixed Canvas Controller dialog drag during long operations
  • Fixed crash on exit when BETA was expired   
  • Fixed handling of negative width&height values by drawImage
  • Fixed handling of nonfinite arguments by drawImage
  • Fixed pattern leak in drawImage
  • canvas.rect() now handles NaN and Infinity correctly
  • pattern.addColorStop() now handles NaN and Infinity correctly   
  • Tweaked text drawing on paths   
  • Updated box blur algorithm to use precomputed values (slightly faster)
  • Moved support libs to a subfolder of project   
  • Moved source code from private repository to Google Code
  • Update Cairo (HEAD), Pixman (0.15.2), Pango (1.24.2), Glib (2.20.1)

DockletX

Posted by Julien on February 23rd, 2009

DockletX-Preview DockletX is a plugin for DesktopX that allows you to run ObjectDock docklets on your Desktop.

It implements the ObjectDock Docklet host interface and can load pretty much any docklets built for ObjectDock.

A few things are not implemented at this time:

  • Attention animations (such as glow or bounce)
  • Export (running as a gadget is not tested and might not be working properly)

 

Right now, only ObjectDock docklets are supported, but support for Y’z Dock and maybe AveDesk desklets is planned.

 

Download here.

.Net 2.0 support for ObjectDock

Posted by Julien on February 23rd, 2009

Runtime SDK-PreviewIt’s been available for some time from Wincustomize but I never did any big announcement. The old .Net  docklet for ObjectDock was compiled with .Net 1.0 and thus wasn’t working on newer version of the Framework. It also had problems on Vista with plugin registration which didn’t work with UAC on.

The new version is compiled with .Net 2.0 and should run correctly on Vista. I recently published a small update with support for ContextMenuStrip for docklet context menus, a check for older versions of the SDK so that docklets can specify a minimum supported SDK version and a workaround for the broken OnDropFiles in ObjectDock. There is also two new Host methods exposed (DoClickAnimation and RemoveSelf).

Download

The .Net 2.0 runtime docklet is available from Wincustomize and you can download it here.

Animator Script Component for DesktopX

Posted by Julien on February 1st, 2009

Preview I have this animation script I wrote 2 years ago for a widget (that I never finished), and I recently got back to work on a package tracking widget that is going to use some part of it. Still 70% of the script is never going to be used and I don’t want to throw it away, especially if it can help other people.

I’ve noticed a lot of questions on how to animate groups of objects, and everybody seems to write semi-custom code over and over. My script takes the form of a Script Component (an external script file you reference in your DesktopX script), which means it can be reused without cut&pasting dozens of lines of code every time.

Let me give you an example. In the script below Animator is the main object (already initialized, 3 lines of code, not of interest here). The last argument of each XXXAnim.Init methods is a callback that you can use to call a function when the animation is done. It’s especially interesting if you need to coordinate several complex animations. I’ve added variables so you can understand what each Init call does, but in practice the script would be a little bit simpler.


opacity = 75
length_fade = 1500
delay_fade = 500
toX = 300
toY = 300
length_move = 5000
delay_move  = 0
 
Set fadeAnim = CreateObject("DXScriptLibrary.FadeAnimation")
Set moveAnim = CreateObject("DXScriptLibrary.MoveAnimation")
 
fadeAnim.Init DesktopX.Object("My_Object_Layer"), opacity, length_fade, delay_fade, Animator.EaseNone, ""
moveAnim.Init DesktopX.Object("My_Object_Layer"), toX, toY, length_move, delay_move, Animator.EaseIn, ""
 
Animator.Add Array(fadeAnim, moveAnim)
Animator.Start

So, what this code does is prepare 2 animations with different length and start time, give them to the animator component and then start the animations. The Animator object will automatically manage the animations, starting each one after the delay (and of course fade will apply to all child objects). You can also add a new animation while the previous ones are playing, it will be handled transparently, adjusting delays and total animation length.

As a bonus, you can specify the easing type. In the example, the object will start to move slowly and speed up as it moves through the animation.

There are 4 different animation objects (Fade, Move, Rotate, Resize) and 5 types of easing (EaseIn, EaseOut, EaseInOut, EaseOutElasticBig, BackOut). Everything is in separate components with minimal dependencies, so adding new stuff is relatively easy should you wish to so (new easing types for example)

Download from here.

DXCanvas 1.1

Posted by Julien on December 10th, 2008

DXCanvas-Preview The final 1.1 version of DXCanvas is now available directly from here or on Wincustomize. There is now two new functions available from script allowing you to suspend the canvas drawing updates. This allows you to do all the drawing necessary for a frame of animation and refresh the canvas at the end, instead of having it refresh at 30fps while your script is doing all the drawing operations.

With this new API, it was possible to fix all the flickering in the included examples! I’ve also added a few new example scripts. Check out the Polygon example, as well as all the text-related ones.

Changelog

1.1 Build 287:

  • Added manual drawing mode with suspendDrawing/resumeDrawing methods
    (this should allow users to work around the flickering)
  • Fixed text position being off baseline when drawing on a path
  • Fixed a rare crash when drawing text on a path
  • Activated Pixman MMX&SSE2 fast paths
  • Updated Pango to fix font leak (rev 2746)
  • Updated Pixman (0.13.2)

DXCanvas 1.1 Beta

Posted by Julien on November 27th, 2008

DXCanvasShadowsThis small update brings a proper shadow implementation with blurring, two new functions (textPath and textAlongPath) and a few bug fixes. textAlongPath is still somewhat buggy with multi-segment paths but otherwise works great (see the TextWave demo). I fixed a few problems with arcTo that wasn’t working as specified and made a few changes here and there. More importantly, I fixed a nasty crash bug that was sometimes happening on exit.

The main thing not fixed in this version is the flickering when drawing, but I think I know what the root of the problem is and I might be able to fix it for the final 1.1 build.

You can find a beta build here.

Changelog

1.1 Build 269:

  • Added textPath, textAlongPath (with stroke or fill option)
  • Added support for shadows
  • arcTo is incorrect when the three points are collinear
  • arcTo should draw a straight line from P0 to P1
  • restore() with an empty stack has no effect
  • Corrected order of data returned by getImageData (BRGA -> RGBA)
  • ImageData is now converted to non-premultiplied color
  • Preserve the current path when clipping
  • rgba colors were not converted to string properly (green had the wrong value)
  • Some composite operations are now handled correctly
  • Fixed Debug build crashing when expired
  • Fixed stack overflow crash on exit
  • Added check for font validity on assignment and fallback to default font (will raise an error in debug mode if font is incorrect)
  • Moved state management to its own class
  • Updated Cairo(1.8.4), Pixman(0.12.0), Pango(1.22.3), Glib(2.18.3) and libpng(1.2.33)