2 * Automatically generated, do not edit this file directly
5 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
7 * plugin-class.g.cpp: MoonLight browser plugin - autogenerated classes
10 * Moonlight List (moonlight-list@lists.ximian.com)
12 * Copyright 2007-2009 Novell, Inc. (http://www.novell.com)
14 * See the LICENSE file included with the distribution for details.
22 #include "plugin-class.h"
23 #include "browser-bridge.h"
25 #include "deployment.h"
26 #include "bitmapimage.h"
30 /*** MoonlightUIElementClass *********/
32 moonlight_uielement_allocate (NPP instance
, NPClass
*klass
)
34 return new MoonlightUIElementObject (instance
);
37 static const MoonNameIdMapping moonlight_uielement_mapping
[] = {
38 {"capturemouse", MoonId_UIElement_CaptureMouse
},
39 {"transformtovisual", MoonId_UIElement_TransformToVisual
},
40 {"releasemousecapture", MoonId_UIElement_ReleaseMouseCapture
},
41 {"updatelayout", MoonId_UIElement_UpdateLayout
}
45 MoonlightUIElementObject::Invoke (int id
, NPIdentifier name
,
46 const NPVariant
*args
, guint32 argCount
,
49 UIElement
*dob
= (UIElement
*)GetDependencyObject ();
53 case MoonId_UIElement_CaptureMouse
: {
54 bool ret
= dob
->CaptureMouse();
55 BOOLEAN_TO_NPVARIANT (ret
, *result
);
60 case MoonId_UIElement_TransformToVisual
: {
61 if (!check_arg_list ("o", argCount
, args
))
62 THROW_JS_EXCEPTION ("TransformToVisual");
64 NPObject
*obj0
= NPVARIANT_TO_OBJECT (args
[0]);
65 if (!npobject_is_dependency_object (obj0
))
66 THROW_JS_EXCEPTION ("TransformToVisual");
67 DependencyObject
*arg0
= ((MoonlightDependencyObjectObject
*) obj0
)->GetDependencyObject();
68 GeneralTransform
* ret
= dob
->GetTransformToUIElementWithError((UIElement
*) arg0
,&err
);
69 if (err
.number
!= 0) THROW_JS_EXCEPTION (err
.message
);
71 OBJECT_TO_NPVARIANT (EventObjectCreateWrapper (GetPlugin (), ret
), *result
);
73 NULL_TO_NPVARIANT (*result
);
78 case MoonId_UIElement_ReleaseMouseCapture
: {
79 dob
->ReleaseMouseCapture();
80 VOID_TO_NPVARIANT (*result
);
85 case MoonId_UIElement_UpdateLayout
: {
87 VOID_TO_NPVARIANT (*result
);
93 return MoonlightDependencyObjectObject::Invoke (id
, name
, args
, argCount
, result
);
96 MoonlightUIElementType::MoonlightUIElementType ()
98 AddMapping (moonlight_uielement_mapping
, G_N_ELEMENTS (moonlight_uielement_mapping
));
100 allocate
= moonlight_uielement_allocate
;