Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / nsplugins / viewer / pluginhost_xembed.cpp
blobfdc542d77a48777a2c780fbb1f5d23ec2b0103da
1 /*
3 XEmbed plugin embedding support
5 Copyright (c) 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
6 Stefan Schimanski <1Stein@gmx.de>
7 2003-2005 George Staikos <staikos@kde.org>
8 2007 Maksim orlovich <maksim@kde.org>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include "pluginhost_xembed.h"
27 #include <QX11Info>
28 #include <QVBoxLayout>
29 #include <QLabel>
31 PluginHostXEmbed::PluginHostXEmbed(NSPluginInstance* plugin):
32 _plugin(plugin), _winId(0)
35 PluginHostXEmbed::~PluginHostXEmbed()
39 void PluginHostXEmbed::setupWindow(int winId, int width, int height)
41 kDebug() << winId << width << height;
42 _winId = winId;
43 setupPluginWindow(_plugin, (void*)winId, width, height);
46 void PluginHostXEmbed::resizePlugin(int pluginWinId, int w, int h)
48 kDebug() << pluginWinId << _winId << w << h;
49 if (_winId) {
50 XResizeWindow(QX11Info::display(), pluginWinId, w, h);
51 setupPluginWindow(_plugin, (void*)_winId, w, h);
55 // kate: indent-width 4; replace-tabs on; tab-width 4; space-indent on;