2 Copyright 2008 Google Inc.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 #ifndef GGADGET_PLASMA_HOST_H__
18 #define GGADGET_PLASMA_HOST_H__
20 #include <ggadget/host_interface.h>
21 #include "ggl_applet_script.h"
26 using ggadget::ViewHostInterface
;
28 class PlasmaHost
: public ggadget::HostInterface
{
30 PlasmaHost(GadgetInfo
*info
);
31 virtual ~PlasmaHost();
32 virtual ViewHostInterface
*NewViewHost(Gadget
*gadget
,
33 ViewHostInterface::Type type
);
34 virtual Gadget
*LoadGadget(const char *path
, const char *options_name
,
35 int instance_id
, bool show_debug_console
);
36 virtual void RemoveGadget(Gadget
*gadget
, bool save_data
);
37 virtual bool LoadFont(const char *filename
);
39 virtual void ShowGadgetDebugConsole(Gadget
*) {}
40 virtual int GetDefaultFontSize();
41 virtual bool OpenURL(const Gadget
*gadget
, const char *url
);
43 void onConstraintsEvent(Plasma::Constraints constraints
);
50 } // namespace ggadget
52 #endif // GGADGET_PLASMA_HOST_H__