~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/scriptengines/google_gadgets/plasma_host.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright 2008 Google Inc.
 
3
 
 
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
 
7
 
 
8
       http://www.apache.org/licenses/LICENSE-2.0
 
9
 
 
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.
 
15
*/
 
16
 
 
17
#ifndef GGADGET_PLASMA_HOST_H__
 
18
#define GGADGET_PLASMA_HOST_H__
 
19
 
 
20
#include <ggadget/host_interface.h>
 
21
#include "ggl_applet_script.h"
 
22
class Gadget;
 
23
 
 
24
namespace ggadget {
 
25
 
 
26
using ggadget::ViewHostInterface;
 
27
 
 
28
class PlasmaHost : public ggadget::HostInterface {
 
29
 public:
 
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);
 
38
  virtual void Run() {}
 
39
  virtual void ShowGadgetDebugConsole(Gadget *) {}
 
40
  virtual int GetDefaultFontSize();
 
41
  virtual bool OpenURL(const Gadget *gadget, const char *url);
 
42
 
 
43
  void onConstraintsEvent(Plasma::Constraints constraints);
 
44
 
 
45
 private:
 
46
  class Private;
 
47
  Private *d;
 
48
};
 
49
 
 
50
} // namespace ggadget
 
51
 
 
52
#endif // GGADGET_PLASMA_HOST_H__