diff options
Diffstat (limited to 'tdeui/kdetrayproxy')
-rw-r--r-- | tdeui/kdetrayproxy/CMakeLists.txt | 46 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/Makefile.am | 13 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/kdetrayproxy.cpp | 194 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/kdetrayproxy.desktop | 134 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/kdetrayproxy.h | 50 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/module.cpp | 33 | ||||
-rw-r--r-- | tdeui/kdetrayproxy/module.h | 39 |
7 files changed, 509 insertions, 0 deletions
diff --git a/tdeui/kdetrayproxy/CMakeLists.txt b/tdeui/kdetrayproxy/CMakeLists.txt new file mode 100644 index 000000000..be341b277 --- /dev/null +++ b/tdeui/kdetrayproxy/CMakeLists.txt @@ -0,0 +1,46 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/kded + ${CMAKE_SOURCE_DIR}/tdecore +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES + kdetrayproxy.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/kded ) + + +##### kded_kdetrayproxy ######################### + +set( target kded_kdetrayproxy ) + +set( ${target}_SRCS + kdetrayproxy.cpp module.cpp module.skel +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK tdecore-shared tdeinit_kded-shared + DEPENDENCIES dcopidl + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdeui/kdetrayproxy/Makefile.am b/tdeui/kdetrayproxy/Makefile.am new file mode 100644 index 000000000..01dc87082 --- /dev/null +++ b/tdeui/kdetrayproxy/Makefile.am @@ -0,0 +1,13 @@ +kde_module_LTLIBRARIES = kded_kdetrayproxy.la + +INCLUDES= -I$(top_srcdir)/kded $(all_includes) +kded_kdetrayproxy_la_SOURCES = kdetrayproxy.cpp module.cpp module.skel +kded_kdetrayproxy_la_LDFLAGS = $(all_libraries) -module -avoid-version +kded_kdetrayproxy_la_LIBADD = $(LIB_KDECORE) $(LIB_KDED) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_X11) + +METASOURCES = AUTO + +noinst_HEADERS = kdetrayproxy.h module.h + +servicesdir = $(kde_servicesdir)/kded +services_DATA = kdetrayproxy.desktop diff --git a/tdeui/kdetrayproxy/kdetrayproxy.cpp b/tdeui/kdetrayproxy/kdetrayproxy.cpp new file mode 100644 index 000000000..7cb621bd8 --- /dev/null +++ b/tdeui/kdetrayproxy/kdetrayproxy.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2004 Lubos Lunak <l.lunak@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "kdetrayproxy.h" + +#include <kapplication.h> +#include <kdebug.h> +#include <netwm.h> +#include <X11/Xlib.h> +#include <sys/select.h> +#include <sys/time.h> +#include <sys/types.h> +#include <unistd.h> +#include <assert.h> + +KDETrayProxy::KDETrayProxy() + : selection( makeSelectionAtom()) + { + connect( &selection, TQT_SIGNAL( newOwner( Window )), TQT_SLOT( newOwner( Window ))); + connect( &module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( windowAdded( WId ))); + selection.owner(); + for( TQValueList< WId >::ConstIterator it = module.windows().begin(); + it != module.windows().end(); + ++it ) + windowAdded( *it ); + kapp->installX11EventFilter( this ); // XSelectInput( StructureNotifyMask ) on windows is done by KWinModule +// kdDebug() << "Init done" << endl; + } + +Atom KDETrayProxy::makeSelectionAtom() + { + return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + TQCString().setNum( qt_xscreen()), False ); + } + +void KDETrayProxy::windowAdded( WId w ) + { + NETWinInfo ni( qt_xdisplay(), w, qt_xrootwin(), NET::WMKDESystemTrayWinFor ); + WId trayWinFor = ni.kdeSystemTrayWinFor(); + if ( !trayWinFor ) // not a KDE tray window + return; +// kdDebug() << "New tray window:" << w << endl; + if( !tray_windows.contains( w )) + tray_windows.append( w ); + withdrawWindow( w ); + // window will be removed from pending_windows when after docked + if( !pending_windows.contains( w )) + pending_windows.append( w ); + docked_windows.remove( w ); + Window owner = selection.owner(); + if( owner == None ) // no tray owner, sorry + { +// kdDebug() << "No owner, left in pending" << endl; + return; + } + dockWindow( w, owner ); + } + +void KDETrayProxy::newOwner( Window owner ) + { +// kdDebug() << "New owner:" << owner << endl; + for( TQValueList< Window >::ConstIterator it = pending_windows.begin(); + it != pending_windows.end(); + ++it ) + dockWindow( *it, owner ); + // remove from pending_windows only in windowRemoved(), after it's really docked + } + +bool KDETrayProxy::x11Event( XEvent* e ) + { + if( tray_windows.isEmpty()) + return false; + if( e->type == DestroyNotify && tray_windows.contains( e->xdestroywindow.window )) + { + tray_windows.remove( e->xdestroywindow.window ); + pending_windows.remove( e->xdestroywindow.window ); + docked_windows.remove( e->xdestroywindow.window ); + } + if( e->type == ReparentNotify && tray_windows.contains( e->xreparent.window )) + { + if( e->xreparent.parent == qt_xrootwin()) + { + if( !docked_windows.contains( e->xreparent.window ) || e->xreparent.serial >= docked_windows[ e->xreparent.window ] ) + { +// kdDebug() << "Window released:" << e->xreparent.window << endl; + docked_windows.remove( e->xreparent.window ); + if( !pending_windows.contains( e->xreparent.window )) + pending_windows.append( e->xreparent.window ); + } + } + else + { +// kdDebug() << "Window away:" << e->xreparent.window << ":" << e->xreparent.parent << endl; + pending_windows.remove( e->xreparent.window ); + } + } + if( e->type == UnmapNotify && tray_windows.contains( e->xunmap.window )) + { + if( docked_windows.contains( e->xunmap.window ) && e->xunmap.serial >= docked_windows[ e->xunmap.window ] ) + { +// kdDebug() << "Window unmapped:" << e->xunmap.window << endl; + XReparentWindow( qt_xdisplay(), e->xunmap.window, qt_xrootwin(), 0, 0 ); + // ReparentNotify will take care of the rest + } + } + return false; + } + +void KDETrayProxy::dockWindow( Window w, Window owner ) + { +// kdDebug() << "Docking " << w << " into " << owner << endl; + docked_windows[ w ] = XNextRequest( qt_xdisplay()); + static Atom prop = XInternAtom( qt_xdisplay(), "_XEMBED_INFO", False ); + long data[ 2 ] = { 0, 1 }; + XChangeProperty( qt_xdisplay(), w, prop, prop, 32, PropModeReplace, (unsigned char*)data, 2 ); + XSizeHints hints; + hints.flags = PMinSize | PMaxSize; + hints.min_width = 24; + hints.max_width = 24; + hints.min_height = 24; + hints.max_height = 24; + XSetWMNormalHints( qt_xdisplay(), w, &hints ); +// kxerrorhandler ? + XEvent ev; + memset(&ev, 0, sizeof( ev )); + static Atom atom = XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_OPCODE", False ); + ev.xclient.type = ClientMessage; + ev.xclient.window = owner; + ev.xclient.message_type = atom; + ev.xclient.format = 32; + ev.xclient.data.l[ 0 ] = GET_QT_X_TIME(); + ev.xclient.data.l[ 1 ] = 0; // SYSTEM_TRAY_REQUEST_DOCK + ev.xclient.data.l[ 2 ] = w; + ev.xclient.data.l[ 3 ] = 0; // unused + ev.xclient.data.l[ 4 ] = 0; // unused + XSendEvent( qt_xdisplay(), owner, False, NoEventMask, &ev ); + } + +void KDETrayProxy::withdrawWindow( Window w ) + { + XWithdrawWindow( qt_xdisplay(), w, qt_xscreen()); + static Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); + for(;;) + { + Atom type; + int format; + unsigned long length, after; + unsigned char *data; + int r = XGetWindowProperty( qt_xdisplay(), w, wm_state, 0, 2, + False, AnyPropertyType, &type, &format, + &length, &after, &data ); + bool withdrawn = true; + if ( r == Success && data && format == 32 ) + { + withdrawn = ( *( long* )data == WithdrawnState ); + XFree( (char *)data ); + } + if( withdrawn ) + return; // ---> + struct timeval tm; + tm.tv_sec = 0; + tm.tv_usec = 10 * 1000; // 10ms + select(0, NULL, NULL, NULL, &tm); + } + } + +#include "kdetrayproxy.moc" + +#if 0 +#include <kcmdlineargs.h> +int main( int argc, char* argv[] ) + { + KCmdLineArgs::init( argc, argv, "a", "b", "c", "d" ); + KApplication app( false ); // no styles + app.disableSessionManagement(); + KDETrayProxy proxy; + return app.exec(); + } +#endif diff --git a/tdeui/kdetrayproxy/kdetrayproxy.desktop b/tdeui/kdetrayproxy/kdetrayproxy.desktop new file mode 100644 index 000000000..59006a5eb --- /dev/null +++ b/tdeui/kdetrayproxy/kdetrayproxy.desktop @@ -0,0 +1,134 @@ +[Desktop Entry] +Type=Service +Name=KDE Tray Proxy Module +Name[af]=KDE Skinkbord Proksie Module +Name[bn]=কে.ডি.ই. ট্রে প্রক্সি মডিউল +Name[bs]=KDE proxy modul za tray +Name[ca]=Mòdul de safata d'intermediari del KDE +Name[cs]=Proxy modul panelu KDE +Name[csb]=Mòduł pòstrzédnika systemòwégò tablëtkù KDE +Name[da]=KDE-statusfelt proxy-modul +Name[de]=Proxy-Modul für den KDE-Systemabschnitt +Name[el]=Άρθρωμα διαμεσολαβητή πλαισίου συστήματος του KDE +Name[eo]=KDE-sistelistela prokurmodulo +Name[es]=Módulo Proxy de bandeja de KDE +Name[et]=KDE süsteemse salve proxy moodul +Name[eu]=KDEren erretiluko proxy-modulua +Name[fa]=پیمانۀ پیشکار سینی KDE +Name[fi]=KDE:n ilmoitusalueen välityspalvelinmoduuli +Name[fr]=Serveur mandataire pour les miniatures de KDE +Name[fy]=KDE Systeemfak Proxy Module +Name[ga]=Modúl Seachfhreastalaí do Thráidire KDE +Name[gl]=Módulo de simulación da bandexa de KDE +Name[he]=מתווך מגש מערכת של KDE +Name[hi]=केडीई ट्रे प्रॉक्सी मॉड्यूल +Name[hr]=KDE sistemski modul Proxy +Name[hu]=KDE paneltálca-proxy modul +Name[id]=Modul Proxy Baki KDE +Name[is]=KDE milliþjónseining spjaldsins +Name[it]=Modulo proxy per il vassoio di KDE +Name[ja]=KDE トレイプロキシモジュール +Name[ka]=KDE სისტემური ზოლის პროქსი მოდული +Name[kk]=KDE жүйелік сөресінің прокси модулі +Name[km]=ម៉ូឌុលប្រូកស៊ី KDE Tray +Name[lb]=Proxymodul fir KDE-Symbolleescht +Name[lt]=KDE dėklo proxy modulis +Name[mk]=KDE Модул за прокси во сис. лента +Name[ms]=Modul Dulang Proksi KDE +Name[nb]=KDE mellommodul +Name[nds]=Systeemafsnitt-Proxymoduul +Name[ne]=KDE ट्रे प्रोक्सी मोड्युल +Name[nl]=Proxy-module voor het KDE-systeemvak +Name[nn]=KDE-mellommodul for systemtrauet +Name[pa]=KDE ਟਰੇ ਪਰਾਕਸੀ ਮੈਡੀਊਲ +Name[pl]=Moduł pośrednika tacki systemowej KDE +Name[pt]=Módulo de 'Proxy' de Bandeja do KDE +Name[pt_BR]=Módulo de Proxy do Painel do KDE +Name[ro]=Modul proxy pentru tava de sistem KDE +Name[ru]=Модуль прокси системного лотка KDE +Name[rw]=Igice Igitwara Nyabubasha KDE +Name[se]=KDE-gaskamoduvla vuogádatgárccu várás +Name[sk]=Modul pre proxy lišty KDE +Name[sl]=Modul posrednika sistemske vrstice KDE +Name[sr]=Прокси модул KDE-ове касете +Name[sr@Latn]=Proksi modul KDE-ove kasete +Name[sv]=KDE-proxymodul för systembricka +Name[ta]=KDE தட்டு மாற்று பதிலாள் கூறு +Name[te]=కెడిఈ ట్రే ప్రాక్సీ మాడ్యూల్ +Name[tg]=Новаи KDE-и модули прокси +Name[th]=โมดูลถาดพร็อกซีของ KDE +Name[tr]=KDE Görev Çubuğu Vekil Birimi +Name[tt]=KDE Tiräsenä Proxy Modulı +Name[uk]=Модуль посередника для програм в системному лотку +Name[vi]=Mô-đun ủy nhiệm khay KDE +Name[zh_CN]=KDE 托盘代理模块 +Name[zh_TW]=KDE 系統匣代理模組 +Comment=Proxy enabling KDE systray applications to work without KWin +Comment[af]=Proksie wat KDE 'systray' programme toelaat om sonder KWin te werk +Comment[bg]=Модул, който позволява на програмите от KDE да работят в системния панел с други мениджъри на прозорци +Comment[bn]=কে.ডি.ই. সিস-ট্রে অ্যাপলিকেশন কে-উইন ছাড়াই কাজ করাবার জন্য প্রক্সি +Comment[bs]=Proxy koji omogućuje KDE systray programima da rade izvan KWin-a +Comment[ca]=Habilitació d'intermediari per a les aplicacions de safata del sistema per a treballar sense KWin +Comment[cs]=Proxy umožňuje, aby KDE zabudované aplikace fungovaly i bez KWin +Comment[csb]=Pòstrzédnik dôwôjący mòżnotã robòtë programów brëkùjącëch systemòwégò tablëtkù KDE wëłączając z tegò KWin +Comment[da]=Proxy aktivering af KDE's statusfelt programmer til at virke uden KWin +Comment[de]=Proxy, der Programme im Systemabschnitt der Kontrollleiste auch ohne KWin als Fenstermanager funktionieren lässt +Comment[el]=Διαμεσολαβητής που επιτρέπει σε εφαρμογές πλαισίου συστήματος του KDE να λειτουργούν χωρίς το KWin +Comment[eo]=Prokuro ebligas KDEajn aplikaĵojn labori sen KWin +Comment[es]=Activación de Proxy de aplicaciones systray de KDE sin KWin +Comment[et]=Proxy, mis võimaldab KDE süsteemse salve rakendustel töötada ilma KWin'ita +Comment[eu]=KDEren erretiluko proxy-gaitze aplikazioak KWin gabe lan egiteko +Comment[fa]=پیشکار، کاربردهایKDE systray را برای کار کردن بدون KWin فعال میسازد +Comment[fi]=Välimuistipalvelin, jonka avulla ilmoitusalueen sovellukset voivat toimia ilman KWiniä +Comment[fr]=Serveur mandataire autorisant le fonctionnement des miniatures sans KWin +Comment[fy]=Troch Proxy kinne KDE systeemfak applikaasjes wurkje sûnder KWin +Comment[ga]=Seachfhreastalaí a cheadaíonn d'fheidhmchláir i dtráidire an chórais a oibriú gan KWin +Comment[gl]=Proxy que permite que as aplicación de KDE que usen a bandexa traballen sen KWin +Comment[he]=שרת המאפשל לתוכניות KDE להתחבר למגש המערכת ללא KWin +Comment[hi]=प्रॉक्सी जो के-विन के बगैर कार्य करने के लिए केडीई सिस्ट्रे अनुप्रयोगों को सक्षम करता है +Comment[hr]=Aplikacije za omogućavanje proxyja smještene u KDE sistemskoj traci, bez primjene KWin +Comment[hu]=KDE-s paneltálca-alkalmazások futtatása a KWin-től eltérő ablakkezelőknél +Comment[id]=Proxy untuk membuat aplikasi systray KDE berfungsi tanpa KWin +Comment[is]=Milliþjónseining fyrir KDE spjaldið sem virkar án KWin +Comment[it]=Permette alle applicazioni per il vassoio di KDE di funzionare senza KWin +Comment[ja]=KWin なしで KDE systray アプリケーションを動作可能にするプロキシ +Comment[ka]=KDE სისტემური ზოლის პროქსი მოდული პროგრამებისთვის KWin-ის გარეშე სამუშაოდ +Comment[kk]=KDE жүйелік сөредегі қолданбаға KWin-сіз жұмыс істеуге мүмкіншілік беретін прокси +Comment[km]=ប្រូកស៊ីដែលអនុញ្ញាតឲ្យកម្មវិធី KDE systray ធ្វើការដោយគ្មាន KWin +Comment[lb]=Proxy, deen et erméiglecht, dass Programmer fir d'KDE-Symbolleescht ouni de KWin funktionéieren +Comment[lt]=Proxy įgalinantis KDE sistemos dėklo taikomasias programas dirbti be KWin +Comment[mk]=Прокси кое им овозможува на KDE апликациите од сис. лента да работат без KWin +Comment[ms]=Aplikasi dulang sys dengan fungsi proksi untuk berfungsi tanpa KWin +Comment[nb]=Modul som gjør at systemkurvprogrammet for KDE kan fungere uten KWin +Comment[nds]=Disse Proxy lett Systeemafsnitt-Programmen ok ahn KWin lopen +Comment[ne]= KWin बाहेक कार्य गर्न प्रोक्सी सक्षम पार्ने KDE सिस्ट्रे +Comment[nl]=Proxy-module om toepassingen in het KDE-systeemvak te plaatsen die geen KWin ondersteuning hebben. +Comment[nn]=Modul som gjer at systemtrauprogram for KDE kan fungera uavhengig av KWin +Comment[pa]=KWin ਬਿਨਾਂ ਕੰਮ ਕਰਨ ਲਈ KDE systray ਕਾਰਜਾਂ ਲਈ ਪਰਾਕਸੀ ਯੋਗ +Comment[pl]=Pośrednik, umożliwiający działanie programów wymagających tacki systemowej KDE bez KWin +Comment[pt]='Proxy' que permite aplicações da bandeja de sistema do KDE funcionarem sem o KWin +Comment[pt_BR]=Habilita o funcionamento do proxy em aplicativos sem o KWin +Comment[ro]=Permite aplicaţiilor pentru tava de sistem KDE să lucreze fără suport din partea KWin +Comment[ru]=Прокси для системного лотка KDE для приложений, работающих без KWin +Comment[rw]=Nyabubasha ibashisha Amaporogaramu y'igitwarasisitemu KDE gukora nta KWmo +Comment[se]=Moduvla mii dagaha ahte KDE:a vuogádatgárcoprográmmat doibmet KWin haga. +Comment[sk]=Proxy pre aplikácie z lišty KDE, aby nevyžadovali KWin +Comment[sl]=Posrednik, ki omogoča programom sistemske vrstice KDE, da delujejo brez KWin +Comment[sr]=Прокси који омогућава KDE програмима за системску касету да раде без KWin-а +Comment[sr@Latn]=Proksi koji omogućava KDE programima za sistemsku kasetu da rade bez KWin-a +Comment[sv]=Proxymodul som gör det möjligt för KDE:s program i systembrickan att fungera utan Kwin +Comment[ta]=மாற்று பதிலாள் KDE அமைப்பு தட்டு பயன்பாட்டை KWin இல்லாமல் வேலை செய்ய செயல்படுத்துகிறது +Comment[te]=కెవిన్ లేకుండా ప్రాక్సి ను వాడె కెడీఈ సిస్ ట్రే కార్యక్రమాలను పని చెYఇస్తుంది +Comment[tg]=Proxy барномаҳои KDE systray-ро барои корнамоӣ, бидуни KWin фаъол месозад +Comment[th]=แอพพลิเคชันถาดระบบของ KDE ที่เปิดความสามารถพร็อกซี สำหรับทำงานโดยไม่ต้องมี KWin +Comment[tr]=Vekil sunucu etkinleştirme KDE sistem çubuğu uygulamalarının KWin olmadan çalıştırır. +Comment[tt]=KWin'sız eşläwçe yazılımnar öçen KDE sistiräseneñ Proxy +Comment[uk]=Програма посередник, яка дозволяє працювати програмам для KDE, що використовують системний лоток, без KWin +Comment[vi]=Bộ ủy nhiệm hiệu lực các ứng dụng khay hệ thống KDE hoạt động, không cần KWin. +Comment[zh_CN]=允许 KDE 系统托盘应用程序在没有 KWin 的情况下工作 +Comment[zh_TW]=系統匣代理模組讓系統匣應用程式不必靠 KWin 運作 +ServiceTypes=KDEDModule +X-KDE-ModuleType=Library +X-KDE-Library=kdetrayproxy +X-KDE-FactoryName=kdetrayproxy +X-KDE-Kded-autoload=false diff --git a/tdeui/kdetrayproxy/kdetrayproxy.h b/tdeui/kdetrayproxy/kdetrayproxy.h new file mode 100644 index 000000000..8500bcb4f --- /dev/null +++ b/tdeui/kdetrayproxy/kdetrayproxy.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2004 Lubos Lunak <l.lunak@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef _KDE_TRAY_PROXY_H_ +#define _KDE_TRAY_PROXY_H_ + +#include <tqvaluelist.h> +#include <kmanagerselection.h> +#include <kwinmodule.h> +#include <tqwidget.h> + +class KDETrayProxy + : public TQWidget + { + Q_OBJECT + public: + KDETrayProxy(); + public slots: + void windowAdded( WId ); + void newOwner( Window ); + protected: + virtual bool x11Event( XEvent* ); + private: + void dockWindow( Window w, Window owner ); + void withdrawWindow( Window w ); + static Atom makeSelectionAtom(); + KSelectionWatcher selection; + KWinModule module; + TQValueList< Window > pending_windows; + TQValueList< Window > tray_windows; + TQMap< Window, unsigned long > docked_windows; + }; + +#endif diff --git a/tdeui/kdetrayproxy/module.cpp b/tdeui/kdetrayproxy/module.cpp new file mode 100644 index 000000000..5da30bab8 --- /dev/null +++ b/tdeui/kdetrayproxy/module.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2004 Lubos Lunak <l.lunak@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "module.h" + +KDETrayModule::KDETrayModule( const TQCString& obj ) + : KDEDModule( obj ) + { + } + +extern "C" +KDE_EXPORT KDEDModule *create_kdetrayproxy( const TQCString& obj ) + { + return new KDETrayModule( obj ); + } + +#include "module.moc" diff --git a/tdeui/kdetrayproxy/module.h b/tdeui/kdetrayproxy/module.h new file mode 100644 index 000000000..67ed1a29d --- /dev/null +++ b/tdeui/kdetrayproxy/module.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2004 Lubos Lunak <l.lunak@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef _KDE_TRAY_MODULE_H_ +#define _KDE_TRAY_MODULE_H_ + +#include <kdedmodule.h> +#include <dcopobject.h> + +#include "kdetrayproxy.h" + +class KDETrayModule + : public KDEDModule + { + Q_OBJECT + K_DCOP + public: + KDETrayModule( const TQCString& obj ); + private: + KDETrayProxy proxy; + }; + +#endif |