diff --git a/clients/Makefile.am b/clients/Makefile.am index c92c0a065a..ad8d55b955 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -1 +1 @@ -SUBDIRS = kde1 kstep system b2 laptop riscos modernsystem win2k kwmtheme quartz +SUBDIRS = kde1 kstep system b2 laptop riscos modernsystem win2k kwmtheme quartz icewm diff --git a/clients/icewm/Makefile.am b/clients/icewm/Makefile.am new file mode 100644 index 0000000000..85d8321578 --- /dev/null +++ b/clients/icewm/Makefile.am @@ -0,0 +1,22 @@ +INCLUDES = $(all_includes) + +SUBDIRS = . config icewm-themes + +kde_module_LTLIBRARIES = libkwinicewm.la + +libkwinicewm_la_SOURCES = icewm.cpp +libkwinicewm_la_LIBADD = ../../kwin.la +libkwinicewm_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) + +METASOURCES = AUTO +noinst_HEADERS = icewm.h + +lnkdir = $(kde_datadir)/kwin/ +lnk_DATA = icewm.desktop + +EXTRA_DIST = $(lnk_DATA) + + +###KMAKE-start (don't edit or delete this block) + +###KMAKE-end diff --git a/clients/icewm/config/Makefile.am b/clients/icewm/config/Makefile.am new file mode 100644 index 0000000000..5286d951e6 --- /dev/null +++ b/clients/icewm/config/Makefile.am @@ -0,0 +1,16 @@ +INCLUDES = $(all_includes) + +kde_module_LTLIBRARIES = libkwinicewm_config.la + +libkwinicewm_config_la_SOURCES = config.cpp +libkwinicewm_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkwinicewm_config_la_LIBADD = $(LIB_KDEUI) + +METASOURCES = AUTO +noinst_HEADERS = config.h + +lnkdir = $(kde_datadir)/kwin/ + +###KMAKE-start (don't edit or delete this block) + +###KMAKE-end diff --git a/clients/icewm/config/config.cpp b/clients/icewm/config/config.cpp new file mode 100644 index 0000000000..c8204db283 --- /dev/null +++ b/clients/icewm/config/config.cpp @@ -0,0 +1,212 @@ +/* + This file contains the icewm configuration widget... + + Copyright (c) 2001 + Karol Szwed (gallium) + http://gallium.n3.net/ +*/ + +#include "config.h" +#include +#include +#include +#include +#include + + +// KWin client config plugin interface +extern "C" +{ + QObject* allocate_config( KConfig* conf, QWidget* parent ) + { + return(new IceWMConfig(conf, parent)); + } +} + + +// NOTE: +// ========================================================================== +// 'conf' is a pointer to the kwindecoration modules open kwin config, +// and is by default set to the "Style" group. +// +// 'parent' is the parent of the QObject, which is a VBox inside the +// Configure tab in kwindecoration +// ========================================================================== + +IceWMConfig::IceWMConfig( KConfig* conf, QWidget* parent ) + : QObject( parent ) +{ + gb1 = new QGroupBox( 1, Qt::Horizontal, i18n("IceWM Theme Selector"), parent ); + themeListBox = new QListBox( gb1 ); + themeLabel = new QLabel( i18n("To manage your IceWM themes, simply click on the link below to open a Konqueror window. " + "Once shown, you will be able to add or remove natice IceWM themes, by uncompressing http://icewm.themes.org/ " + "theme files into this directory, or creating directory symlinks to existing IceWM themes on your system."), parent ); + urlLabel = new KURLLabel( parent ); + urlLabel->setText( i18n("Open Konqueror Window at KDE's IceWM theme directory") ); + + gb2 = new QGroupBox( 1, Qt::Horizontal, i18n("IceWM Decoration Settings"), parent ); + cbThemeButtonPositions = new QCheckBox( i18n("Use theme &button positions"), gb2 ); + cbThemeTitleTextColors = new QCheckBox( i18n("Use theme &title text colors"), gb2 ); + cbTitleBarOnTop = new QCheckBox( i18n("&Show title bar on top of windows"), gb2 ); + cbShowMenuButtonIcon = new QCheckBox( i18n("&Menu button always shows application mini icon"), gb2 ); + + // Load configuration options + load( conf ); + + // Ensure we track user changes properly + connect( themeListBox, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); + connect( urlLabel, SIGNAL(leftClickedURL(const QString&)), this, SLOT(callURL(const QString&))); + connect( cbThemeButtonPositions, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) ); + connect( cbThemeTitleTextColors, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) ); + connect( cbTitleBarOnTop, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) ); + connect( cbShowMenuButtonIcon, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) ); + + // Make sure the local user's theme directory actually exists... + QStringList dirList = KGlobal::dirs()->findDirs("data", "kwin"); + QString localThemeString = *(dirList.begin()); + + // Create the directory if not found... + if (localThemeString.isEmpty()) + localThemeString = KGlobal::dirs()->saveLocation("data", "kwin"); + + localThemeString += "/icewm-themes"; + if (!QFile::exists(localThemeString)) + QDir().mkdir(localThemeString); + + // Set the konqui link url + localThemeString = QString("file://") + localThemeString; + localThemeString.replace( QRegExp("~"), "$HOME" ); + urlLabel->setURL( localThemeString ); + + // Make the widgets visible in kwindecoration + gb1->show(); + themeLabel->show(); + urlLabel->show(); + gb2->show(); +} + + +IceWMConfig::~IceWMConfig() +{ + delete gb2; + delete urlLabel; + delete themeLabel; + delete gb1; +} + + +// Searches for all installed IceWM themes, and adds them to the listBox. +void IceWMConfig::findIceWMThemes() +{ + QStringList dirList = KGlobal::dirs()->findDirs("data", "kwin/icewm-themes"); + QStringList::ConstIterator it; + + // Remove any old themes in the list (if any) + themeListBox->clear(); + themeListBox->insertItem( i18n("Infadel #2 (default)") ); + + // Step through all kwin/icewm-themes directories... + for( it = dirList.begin(); it != dirList.end(); it++) + { + // List all directory names only... + QDir d(*it, QString("*"), QDir::Unsorted, QDir::Dirs | QDir::Readable ); + if (d.exists()) + { + QFileInfoListIterator it2( *d.entryInfoList() ); + QFileInfo* finfo; + + // Step through all directories within the kwin/icewm-themes directory + while( (finfo = it2.current()) ) + { + // Ignore . and .. directories + if ( (finfo->fileName() == ".") || (finfo->fileName() == "..") ) + { + ++it2; + continue; + } + + if ( !themeListBox->findItem( finfo->fileName()) ) + themeListBox->insertItem( finfo->fileName() ); + + ++it2; + } + } + } + + // Sort the items + themeListBox->sort(); +} + + +void IceWMConfig::callURL( const QString& s ) +{ + kapp->invokeBrowser( s ); +} + + +void IceWMConfig::slotSelectionChanged() +{ + emit changed(); +} + + +// Loads the configurable options from the kwinrc config file +// It is passed the open config from kwindecoration to improve efficiency +void IceWMConfig::load( KConfig* conf ) +{ + conf->setGroup("IceWM"); + bool override = conf->readBoolEntry( "ThemeButtonPositions", true ); + cbThemeButtonPositions->setChecked( override ); + + override = conf->readBoolEntry( "ThemeTitleTextColors", true ); + cbThemeTitleTextColors->setChecked( override ); + + override = conf->readBoolEntry( "TitleBarOnTop", true ); + cbTitleBarOnTop->setChecked( override ); + + override = conf->readBoolEntry( "ShowMenuButtonIcon", false ); + cbShowMenuButtonIcon->setChecked( override ); + + findIceWMThemes(); + QString themeName = conf->readEntry("CurrentTheme", ""); + + // Provide a theme alias + if (themeName == "default") + themeName = ""; + + // Select the currently used IceWM theme + if (themeName == "") + themeListBox->setCurrentItem( + themeListBox->findItem( i18n("Infadel #2 (default)") ) ); + else + themeListBox->setCurrentItem( themeListBox->findItem(themeName) ); +} + + +// Saves the configurable options to the kwinrc config file +void IceWMConfig::save( KConfig* conf ) +{ + conf->setGroup("IceWM"); + conf->writeEntry( "ThemeTitleTextColors", cbThemeTitleTextColors->isChecked() ); + conf->writeEntry( "ThemeButtonPositions", cbThemeButtonPositions->isChecked() ); + conf->writeEntry( "TitleBarOnTop", cbTitleBarOnTop->isChecked() ); + conf->writeEntry( "ShowMenuButtonIcon", cbShowMenuButtonIcon->isChecked() ); + + if (themeListBox->currentText() == i18n("Infadel #2 (default)")) + conf->writeEntry("CurrentTheme", "default"); + else + conf->writeEntry("CurrentTheme", themeListBox->currentText() ); +} + + +// Sets UI widget defaults which must correspond to config defaults +void IceWMConfig::defaults() +{ + cbThemeTitleTextColors->setChecked( true ); + cbThemeButtonPositions->setChecked( true ); + cbTitleBarOnTop->setChecked( true ); + cbShowMenuButtonIcon->setChecked( false ); + themeListBox->setCurrentItem( themeListBox->findItem(i18n("Infadel #2 (default)")) ); +} + +#include "config.moc" diff --git a/clients/icewm/config/config.h b/clients/icewm/config/config.h new file mode 100644 index 0000000000..e1626cf979 --- /dev/null +++ b/clients/icewm/config/config.h @@ -0,0 +1,56 @@ +/* + This file contains the icewm configuration widget... + + Copyright (c) 2001 + Karol Szwed (gallium) + http://gallium.n3.net/ +*/ + +#ifndef __KDEGALLIUM_ICEWMCONFIG_H +#define __KDEGALLIUM_ICEWMCONFIG_H + +#include +#include +#include +#include +#include +#include +#include + +class IceWMConfig: public QObject +{ + Q_OBJECT + + public: + IceWMConfig( KConfig* conf, QWidget* parent ); + ~IceWMConfig(); + + // These public signals/slots work similar to KCM modules + signals: + void changed(); + + public slots: + void load( KConfig* conf ); + void save( KConfig* conf ); + void defaults(); + + protected slots: + void slotSelectionChanged(); // Internal use + void callURL( const QString& s ); + + private: + void findIceWMThemes(); + + QCheckBox* cbThemeButtonPositions; + QCheckBox* cbThemeTitleTextColors; + QCheckBox* cbTitleBarOnTop; + QCheckBox* cbShowMenuButtonIcon; + QGroupBox* gb1; + QGroupBox* gb2; + QListBox* themeListBox; + QLabel* themeLabel; + KURLLabel* urlLabel; +}; + + +#endif diff --git a/clients/icewm/icewm-themes/Makefile.am b/clients/icewm/icewm-themes/Makefile.am new file mode 100644 index 0000000000..dab1d86e95 --- /dev/null +++ b/clients/icewm/icewm-themes/Makefile.am @@ -0,0 +1,13 @@ +data_DATA = titleAB.xpm titleAJ.xpm titleAM.xpm titleAP.xpm titleAQ.xpm \ + titleAR.xpm titleAS.xpm titleAT.xpm titleIB.xpm titleIJ.xpm \ + titleIM.xpm titleIQ.xpm titleIR.xpm titleIS.xpm titleIT.xpm \ + titleIP.xpm closeA.xpm closeI.xpm depthA.xpm depthI.xpm \ + maximizeA.xpm maximizeI.xpm menuButtonA.xpm menuButtonI.xpm \ + minimizeA.xpm minimizeI.xpm restoreA.xpm restoreI.xpm \ + rolldownA.xpm rolldownI.xpm rollupA.xpm rollupI.xpm \ + default.theme + +datadir = $(kde_datadir)/kwin/icewm-themes + +EXTRA_DIST = $(data_DATA) + diff --git a/clients/icewm/icewm-themes/closeA.xpm b/clients/icewm/icewm-themes/closeA.xpm new file mode 100644 index 0000000000..cc202bcda0 --- /dev/null +++ b/clients/icewm/icewm-themes/closeA.xpm @@ -0,0 +1,69 @@ +/* XPM */ +static char * closeA_xpm[] = { +"15 34 32 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #798EAA", +"( c #7E96B6", +"_ c #C7CDD4", +": c #FEFEFE", +"< c #8CA3C5", +"[ c #435165", +"} c #3C4553", +"| c #323F4F", +"1 c #0D0E13", +"2 c #363636", +"3 c #677B98", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/_>^]{~", +":*)^>!(<'!_^[*:", +"~%}^>!/*/_>^}%~", +",%}[->*!,>;^}%,", +"&%|[^$>_>;^}=%&", +"@$]|1[&^^^}|]$@", +"+)$]|&}[)||=$)+", +"..**']=|=]]**..", +"{{{$1*'''*1${{{", +"####=%%%%1=####", +")))))))))))))))", +"2222222=2222222", +"...............", +"+++++++++++++++", +"@@@@)1%%%$)@@@@", +"&&&*'})[)}]*&&&", +",,*=)[^-^^}2*,,", +"~{'}[^;>;-[}'{~", +":$=}[^>31+[|=*:", +"~%=}[^;$;^+|=%~", +",%]|}^1-^+}|]%,", +"&%'2|1[[/)|2'%&", +"@1']%|}.}|2]'1@", +"+)1']=.==]]'1)+", +"..$$*.]]''*$1..", +"{{{11$***$1${{{", +"####]%%%%%]####", +")))))))))))))))", +"222222222222222"}; diff --git a/clients/icewm/icewm-themes/closeI.xpm b/clients/icewm/icewm-themes/closeI.xpm new file mode 100644 index 0000000000..4529b06ffd --- /dev/null +++ b/clients/icewm/icewm-themes/closeI.xpm @@ -0,0 +1,69 @@ +/* XPM */ +static char * closeI_xpm[] = { +"15 34 32 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #8A8A8A", +"( g #929292", +"_ g #CBCBCB", +": g #FEFEFE", +"< g #9F9F9F", +"[ g #4F4F4F", +"} g #434343", +"| g #3C3C3C", +"1 g #0E0E0E", +"2 g #363636", +"3 g #787878", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/_>^]{~", +":*)^>!(<'!_^[*:", +"~%}^>!/*/_>^}%~", +",%}[->*!,>;^}%,", +"&%|[^$>_>;^}=%&", +"@$]|1[&^^^}|]$@", +"+)$]|&}[)||=$)+", +"..**']=|=]]**..", +"{{{$1*'''*1${{{", +"####=%%%%1=####", +")))))))))))))))", +"2222222=2222222", +"...............", +"+++++++++++++++", +"@@@@)1%%%$)@@@@", +"&&&*'})[)}]*&&&", +",,*=)[^-^^}2*,,", +"~{'}[^;>;-[}'{~", +":$=}[^>31+[|=*:", +"~%=}[^;$;^+|=%~", +",%]|}^1-^+}|]%,", +"&%'2|1[[/)|2'%&", +"@1']%|}.}|2]'1@", +"+)1']=.==]]'1)+", +"..$$*.]]''*$1..", +"{{{11$***$1${{{", +"####]%%%%%]####", +")))))))))))))))", +"222222222222222"}; diff --git a/clients/icewm/icewm-themes/default.theme b/clients/icewm/icewm-themes/default.theme new file mode 100644 index 0000000000..5c76117b32 --- /dev/null +++ b/clients/icewm/icewm-themes/default.theme @@ -0,0 +1,48 @@ +# Xerithane: +# +# Well, Artwiz inspired me (dirty lil blackbox user ) +# So, I ripped his font (snap.pcf), and then got the chrome style idea and +# adapted the theme as a rip of the e.t.o page (get it, Infadel..) +# Some of the borrowed style is from Area 51 (by RudeSka, herald of #icewm) +# Also borrowed are some icons from Area 51. +# +# tbf: +# +# Extended Artwiz's snap font, added cursors, polished the applets. +# Invented depth, hide, rollup and rolldown buttons. Redraw the others. +# Reduced number of colors. + +# closeI.xpm depthI.xpm maximizeI.xpm minimizeI.xpm restoreI.xpm hideI.xpm +# rollupI.xpm rolldownI.xpm menuButtonI.xpm +# closeA.xpm depthA.xpm maximizeA.xpm minimizeA.xpm restoreA.xpm hideA.xpm +# rollupA.xpm rolldownA.xpm menuButtonA.xpm + +# PLEASE NOTE: +# ============ +# Heavily modified by gallium for the purposes of kwin-icewm. +# Please do not use this for icewm. Use the original icewm Infadel #2 instead. +# The full Infadel #2 theme will still work with kwin-icewm as well, but +# this trimmed version is included here for space reasons. + +ThemeDescription="Infadel/1.0.7(kwin)" +ThemeAuthor="xerithane@nerdfarm.org" +Look=pixmap + +TitleButtonsLeft="s" +TitleButtonsRight="xmi" +TitleButtonsSupported="sxmihrd" +TitleBarCentered=1 +TitleBarHeight=17 + +# Modified border sizes so they're more user "grip" friendly +BorderSizeX=3 +BorderSizeY=3 +CornerSizeX=28 +CornerSizeY=28 + +ColorNormalTitleBarText="#c0c0c0" +ColorActiveTitleBarText="#ffffff" +ColorActiveBorder="#868687" +ColorNormalBorder="#575757" + +ShowMenuButtonIcon=0 diff --git a/clients/icewm/icewm-themes/depthA.xpm b/clients/icewm/icewm-themes/depthA.xpm new file mode 100644 index 0000000000..67a2e1e644 --- /dev/null +++ b/clients/icewm/icewm-themes/depthA.xpm @@ -0,0 +1,69 @@ +/* XPM */ +static char * depthA_xpm[] = { +"15 34 32 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #363636", +"$ c #0D0E13", +"% c #040404", +"& c #C2C2C2", +"* c #4A4A4A", +"= c #2D333D", +"- c #56657A", +"; c #5D6E86", +"> c #D6D6D6", +", c #4D5868", +"' c #677B98", +") c #6E809C", +"! c #58667E", +"~ c #EAEAEA", +"{ c #232D3A", +"] c #798EAA", +"^ c #7E96B6", +"/ c #FEFEFE", +"( c #3C4553", +"_ c #8CA3C5", +": c #111214", +"< c #323F4F", +"[ c #435165", +"} c #C7CDD4", +"| c #717273", +"1 c #181C22", +"2 c #1D2632", +"3 c #5D5D5E", +"...............", +"+++++++++++++++", +"@@@@.#$%$#.@@@@", +"&&&*=-;;;-=*&&&", +">>,*-;')';!*,>>", +"~@{,;)]^]);,{@~", +"/*(-;)^_^);,(,/", +"~:(,;)<(<);,*:~", +">%([!=)))}![(%>", +"&:=*[-}}&-,[=$&", +"@#=<*[,-,[(<{#@", +"+|:{<(((*(<=:|+", +"..#1{=<==={1#..", +"|||{$12221$=|||", +"3333(1%%%1(3333", +"***************", +"###############", +"...............", +"+++++++++++++++", +"@@@@|{$%%=|@@@@", +"&&&(2**[[(2(&&&", +">>*=([,3,,*#*>>", +"~+1([3!;!,[(2+~", +"/(#([,;'!-[(#(/", +"~:=([,{={,[<=:~", +">%{<(2,-,+(<=%>", +"&$2#((^+.[<=2$&", +"@=2{=#<<(<#{1=@", +"+3$2{===={{2$!+", +"..=:122{221:=..", +"|||{%1111:$2|||", +"3333#1%%%:*3333", +"***************", +"###############"}; diff --git a/clients/icewm/icewm-themes/depthI.xpm b/clients/icewm/icewm-themes/depthI.xpm new file mode 100644 index 0000000000..e4fe17a98c --- /dev/null +++ b/clients/icewm/icewm-themes/depthI.xpm @@ -0,0 +1,69 @@ +/* XPM */ +static char * depthI_xpm[] = { +"15 34 32 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #363636", +"$ g #0E0E0E", +"% g #040404", +"& g #C2C2C2", +"* g #4A4A4A", +"= g #323232", +"- g #626262", +"; g #6B6B6B", +"> g #D6D6D6", +", g #565656", +"' g #787878", +") g #7D7D7D", +"! g #646464", +"~ g #EAEAEA", +"{ g #2B2B2B", +"] g #8A8A8A", +"^ g #929292", +"/ g #FEFEFE", +"( g #434343", +"_ g #9F9F9F", +": g #111111", +"< g #3C3C3C", +"[ g #4F4F4F", +"} g #CBCBCB", +"| g #717171", +"1 g #1B1B1B", +"2 g #242424", +"3 g #5D5D5D", +"...............", +"+++++++++++++++", +"@@@@.#$%$#.@@@@", +"&&&*=-;;;-=*&&&", +">>,*-;')';!*,>>", +"~@{,;)]^]);,{@~", +"/*(-;)^_^);,(,/", +"~:(,;)<(<);,*:~", +">%([!=)))}![(%>", +"&:=*[-}}&-,[=$&", +"@#=<*[,-,[(<{#@", +"+|:{<(((*(<=:|+", +"..#1{=<==={1#..", +"|||{$12221$=|||", +"3333(1%%%1(3333", +"***************", +"###############", +"...............", +"+++++++++++++++", +"@@@@|{$%%=|@@@@", +"&&&(2**[[(2(&&&", +">>*=([,3,,*#*>>", +"~+1([3!;!,[(2+~", +"/(#([,;'!-[(#(/", +"~:=([,{={,[<=:~", +">%{<(2,-,+(<=%>", +"&$2#((^+.[<=2$&", +"@=2{=#<<(<#{1=@", +"+3$2{===={{2$!+", +"..=:122{221:=..", +"|||{%1111:$2|||", +"3333#1%%%:*3333", +"***************", +"###############"}; diff --git a/clients/icewm/icewm-themes/maximizeA.xpm b/clients/icewm/icewm-themes/maximizeA.xpm new file mode 100644 index 0000000000..c34304dccf --- /dev/null +++ b/clients/icewm/icewm-themes/maximizeA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * maximizeA_xpm[] = { +"15 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #798EAA", +"( c #7E96B6", +"_ c #FEFEFE", +": c #7A91B1", +"< c #3C4553", +"[ c #435165", +"} c #C7CDD4", +"| c #323F4F", +"1 c #0D0E13", +"2 c #363636", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>!(~:!>-)*_", +"~%<^>!,@,!>^<%~", +",%<[-}@@@};^|%,", +"&%|[^%%%%%^<|%&", +"@$]|<^^^^^<|]$@", +"+)$]|<<[<<|]$)+", +"..**'==|=]]**..", +"{{{$1*'''*1${{{", +"####=%%%%1=####", +")))))))))))))))", +"222222222222222", +"...............", +"+++++++++++++++", +"@@@@)1%%%$)@@@@", +"&&&*'<)[)['*}&&", +",,*2<^^^^[<2*,,", +"~{'<[^>>;-)<*{~", +"_$=|[->+;-[<2*_", +"~%=<[^+.+^[|=%~", +",%]|<+.!!+<|]%,", +"&%'=|%%%%%|2'%&", +"@1']=||<||2]'1@", +"+)1']==2=]]'1)+", +"..$1*'''''*$1..", +"{{{11$***$1${{{", +"####]%%%%%]####", +")))))))))))))))", +"222222222222222"}; diff --git a/clients/icewm/icewm-themes/maximizeI.xpm b/clients/icewm/icewm-themes/maximizeI.xpm new file mode 100644 index 0000000000..d857672b3b --- /dev/null +++ b/clients/icewm/icewm-themes/maximizeI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * maximizeI_xpm[] = { +"15 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #8A8A8A", +"( g #929292", +"_ g #FEFEFE", +": g #8D8D8D", +"< g #434343", +"[ g #4F4F4F", +"} g #CBCBCB", +"| g #3C3C3C", +"1 g #0E0E0E", +"2 g #363636", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>!(~:!>-)*_", +"~%<^>!,@,!>^<%~", +",%<[-}@@@};^|%,", +"&%|[^%%%%%^<|%&", +"@$]|<^^^^^<|]$@", +"+)$]|<<[<<|]$)+", +"..**'==|=]]**..", +"{{{$1*'''*1${{{", +"####=%%%%1=####", +")))))))))))))))", +"222222222222222", +"...............", +"+++++++++++++++", +"@@@@)1%%%$)@@@@", +"&&&*'<)[)['*}&&", +",,*2<^^^^[<2*,,", +"~{'<[^>>;-)<*{~", +"_$=|[->+;-[<2*_", +"~%=<[^+.+^[|=%~", +",%]|<+.!!+<|]%,", +"&%'=|%%%%%|2'%&", +"@1']=||<||2]'1@", +"+)1']==2=]]'1)+", +"..$1*'''''*$1..", +"{{{11$***$1${{{", +"####]%%%%%]####", +")))))))))))))))", +"222222222222222"}; diff --git a/clients/icewm/icewm-themes/menuButtonA.xpm b/clients/icewm/icewm-themes/menuButtonA.xpm new file mode 100644 index 0000000000..e4b5e0ed3a --- /dev/null +++ b/clients/icewm/icewm-themes/menuButtonA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * menuButtonA_xpm[] = { +"17 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #363636", +"$ c #0D0E13", +"% c #040404", +"& c #C2C2C2", +"* c #4A4A4A", +"= c #2D333D", +"- c #56657A", +"; c #5D6E86", +"> c #D6D6D6", +", c #4D5868", +"' c #677B98", +") c #6E809C", +"! c #58667E", +"~ c #EAEAEA", +"{ c #232D3A", +"] c #798EAA", +"^ c #7E96B6", +"/ c #FEFEFE", +"( c #3C4553", +"_ c #8CA3C5", +": c #111214", +"< c #435165", +"[ c #323F4F", +"} c #717273", +"| c #181C22", +"1 c #1D2632", +"2 c #5D5D5E", +".................", +"+++++++++++++++++", +"@@@@@.#$%$#.@@@@@", +"&&&&*=-;;;-=*&&&&", +">>>,*-;')';!*,>>>", +"~~@{,;)]^]);,{@~~", +"//*(-;)^_^);,(,//", +"~~:(,;)]^]);,*:~~", +">>%(<%%%%%%%<(%>>", +"&&$=<@&&&&&@<=$&&", +"@@#{[*<,,,,([=#@@", +"++}|{[((<(([=:}++", +"...#|{{=[={{|#...", +"}}}}{$|111|$=}}}}", +"22222(|%%$|(22222", +"*****************", +"#################", +".................", +"+++++++++++++++++", +"@@@@@}{$%%=}@@@@@", +"&&&&(1**<<(1(&&&&", +">>>*=(<,-2<*#*>>>", +"~~+|(<,-;-,<(1+~~", +"//(#(<-;'!-<(#(//", +"~~$=[*,!;-,<[=:~~", +">>%{[%%%%%%%[{%>>", +"&&$1#.]..]..#1$&&", +"@@=1{=[((([#{1=@@", +"++2$1{====={|$2++", +"...{:|11{11|:=...", +"}}}}{%:|||:$1}}}}", +"22222(|%%%|(22222", +"*****************", +"#################"}; diff --git a/clients/icewm/icewm-themes/menuButtonI.xpm b/clients/icewm/icewm-themes/menuButtonI.xpm new file mode 100644 index 0000000000..854ea2733a --- /dev/null +++ b/clients/icewm/icewm-themes/menuButtonI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * menuButtonI_xpm[] = { +"17 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #363636", +"$ g #0E0E0E", +"% g #040404", +"& g #C2C2C2", +"* g #4A4A4A", +"= g #323232", +"- g #626262", +"; g #6B6B6B", +"> g #D6D6D6", +", g #565656", +"' g #787878", +") g #7D7D7D", +"! g #646464", +"~ g #EAEAEA", +"{ g #2B2B2B", +"] g #8A8A8A", +"^ g #929292", +"/ g #FEFEFE", +"( g #434343", +"_ g #9F9F9F", +": g #111111", +"< g #4F4F4F", +"[ g #3C3C3C", +"} g #717171", +"| g #1B1B1B", +"1 g #242424", +"2 g #5D5D5D", +".................", +"+++++++++++++++++", +"@@@@@.#$%$#.@@@@@", +"&&&&*=-;;;-=*&&&&", +">>>,*-;')';!*,>>>", +"~~@{,;)]^]);,{@~~", +"//*(-;)^_^);,(,//", +"~~:(,;)]^]);,*:~~", +">>%(<%%%%%%%<(%>>", +"&&$=<@&&&&&@<=$&&", +"@@#{[*<,,,,([=#@@", +"++}|{[((<(([=:}++", +"...#|{{=[={{|#...", +"}}}}{$|111|$=}}}}", +"22222(|%%$|(22222", +"*****************", +"#################", +".................", +"+++++++++++++++++", +"@@@@@}{$%%=}@@@@@", +"&&&&(1**<<(1(&&&&", +">>>*=(<,-2<*#*>>>", +"~~+|(<,-;-,<(1+~~", +"//(#(<-;'!-<(#(//", +"~~$=[*,!;-,<[=:~~", +">>%{[%%%%%%%[{%>>", +"&&$1#.]..]..#1$&&", +"@@=1{=[((([#{1=@@", +"++2$1{====={|$2++", +"...{:|11{11|:=...", +"}}}}{%:|||:$1}}}}", +"22222(|%%%|(22222", +"*****************", +"#################"}; diff --git a/clients/icewm/icewm-themes/minimizeA.xpm b/clients/icewm/icewm-themes/minimizeA.xpm new file mode 100644 index 0000000000..bcbfa3a741 --- /dev/null +++ b/clients/icewm/icewm-themes/minimizeA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * minimizeA_xpm[] = { +"15 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #798EAA", +"( c #7E96B6", +"_ c #FEFEFE", +": c #8CA3C5", +"< c #3C4553", +"[ c #323F4F", +"} c #0D0E13", +"| c #435165", +"1 c #363636", +"2 c #677B98", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>!(:(!>-)*_", +"~%<^>,,,,,>^<%~", +",%<^-%@@@%-^[%,", +"&%[<^-}@%-^<[%&", +"@}][<|^%^|<[]$@", +"+|$][<<|<<[=$)+", +"..**]==[=]]**..", +"{{{$}*'''*}${{{", +"####=%%%%}]####", +")))))))))))))))", +"111111111111111", +"...............", +"+++++++++++++++", +"@@@@)}%%%}^@@@@", +"&&&*'<)|)<'*&&&", +",,*1||^-^|)1*,,", +"~{*[|^;>;^|<'{~", +"_*1<|->2>-|<=*_", +"~%=[|+++++|[=%~", +",%=[<%!.!%<[]%,", +"&%'1[<%.%)[1'%&", +"@}']11[%[[1]'}@", +"+)}']==1==]'})+", +"..}$*'''''*$}..", +"{{{$}$**$$}}{{{", +"####]%%%%}]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/minimizeI.xpm b/clients/icewm/icewm-themes/minimizeI.xpm new file mode 100644 index 0000000000..e2e954a232 --- /dev/null +++ b/clients/icewm/icewm-themes/minimizeI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * minimizeI_xpm[] = { +"15 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #8A8A8A", +"( g #929292", +"_ g #FEFEFE", +": g #9F9F9F", +"< g #434343", +"[ g #3C3C3C", +"} g #0E0E0E", +"| g #4F4F4F", +"1 g #363636", +"2 g #787878", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>!(:(!>-)*_", +"~%<^>,,,,,>^<%~", +",%<^-%@@@%-^[%,", +"&%[<^-}@%-^<[%&", +"@}][<|^%^|<[]$@", +"+|$][<<|<<[=$)+", +"..**]==[=]]**..", +"{{{$}*'''*}${{{", +"####=%%%%}]####", +")))))))))))))))", +"111111111111111", +"...............", +"+++++++++++++++", +"@@@@)}%%%}^@@@@", +"&&&*'<)|)<'*&&&", +",,*1||^-^|)1*,,", +"~{*[|^;>;^|<'{~", +"_*1<|->2>-|<=*_", +"~%=[|+++++|[=%~", +",%=[<%!.!%<[]%,", +"&%'1[<%.%)[1'%&", +"@}']11[%[[1]'}@", +"+)}']==1==]'})+", +"..}$*'''''*$}..", +"{{{$}$**$$}}{{{", +"####]%%%%}]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/restoreA.xpm b/clients/icewm/icewm-themes/restoreA.xpm new file mode 100644 index 0000000000..93481afe61 --- /dev/null +++ b/clients/icewm/icewm-themes/restoreA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * restoreA_xpm[] = { +"15 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #798EAA", +"( c #FEFEFE", +"_ c #3C4553", +": c #0D0E13", +"< c #323F4F", +"[ c #C7CDD4", +"} c #435165", +"| c #363636", +"1 c #8CA3C5", +"2 c #7E96B6", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/,/!>^]{~", +"(*)^>!,@,!>-)*(", +"~%_^>,@@@,>^_%~", +",%_^;%:%%%-^<%,", +"&%<_^[[[[[^_<%&", +"@:]<_:@@@%_<]$@", +"+}$]<<%@%_<]$)+", +"..**]]=%=]]**..", +"{{{$:*'''*:${{{", +"####=%%%%:=####", +")))))))))))))))", +"|||||||||||||||", +"...............", +"+++++++++++++++", +"@@@@):%%%$)@@@@", +"&&&*'_)})}'*[&&", +",,*|_^^^^}_|*,,", +"~{'_}^>1;#}<'{~", +"($=<}-+.+^}_=*(", +"~%=_)+!..+}<=%~", +",%=<_%%%%%)|]%,", +"&%'<<++2+/_=]%&", +"@:*]=%.{.%|]*:@", +"+):'']%{%]]':)+", +"..$$*''%''*$$..", +"{{{$:$***$::{{{", +"####]%%%%:]####", +")))))))))))))))", +"|||||||||||||||"}; diff --git a/clients/icewm/icewm-themes/restoreI.xpm b/clients/icewm/icewm-themes/restoreI.xpm new file mode 100644 index 0000000000..b14086575a --- /dev/null +++ b/clients/icewm/icewm-themes/restoreI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * restoreI_xpm[] = { +"15 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #8A8A8A", +"( g #FEFEFE", +"_ g #434343", +": g #0E0E0E", +"< g #3C3C3C", +"[ g #CBCBCB", +"} g #4F4F4F", +"| g #363636", +"1 g #9F9F9F", +"2 g #929292", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/,/!>^]{~", +"(*)^>!,@,!>-)*(", +"~%_^>,@@@,>^_%~", +",%_^;%:%%%-^<%,", +"&%<_^[[[[[^_<%&", +"@:]<_:@@@%_<]$@", +"+}$]<<%@%_<]$)+", +"..**]]=%=]]**..", +"{{{$:*'''*:${{{", +"####=%%%%:=####", +")))))))))))))))", +"|||||||||||||||", +"...............", +"+++++++++++++++", +"@@@@):%%%$)@@@@", +"&&&*'_)})}'*[&&", +",,*|_^^^^}_|*,,", +"~{'_}^>1;#}<'{~", +"($=<}-+.+^}_=*(", +"~%=_)+!..+}<=%~", +",%=<_%%%%%)|]%,", +"&%'<<++2+/_=]%&", +"@:*]=%.{.%|]*:@", +"+):'']%{%]]':)+", +"..$$*''%''*$$..", +"{{{$:$***$::{{{", +"####]%%%%:]####", +")))))))))))))))", +"|||||||||||||||"}; diff --git a/clients/icewm/icewm-themes/rolldownA.xpm b/clients/icewm/icewm-themes/rolldownA.xpm new file mode 100644 index 0000000000..e7b7084525 --- /dev/null +++ b/clients/icewm/icewm-themes/rolldownA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * rolldownA_xpm[] = { +"15 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #798EAA", +"( c #7E96B6", +"_ c #FEFEFE", +": c #3C4553", +"< c #323F4F", +"[ c #0D0E13", +"} c #C7CDD4", +"| c #435165", +"1 c #363636", +"2 c #8CA3C5", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>,,~,,>-)*_", +"~%:^>%@@@%>^:%~", +",%:^->%@%>;^<%,", +"&%<:^;>%>-^:<%&", +"@[]<&&}}}&&<][@", +"+|$]%%%%%%%=$)+", +"..**]]====]**..", +"{{{$[*']'*[${{{", +"####=%%%%%=####", +")))))))))))))))", +"111111=11111111", +"...............", +"+++++++++++++++", +"@@@@)[%%%[^@@@@", +"&&&*':)|):'*&&&", +",,*=)|^-^|)1*,,", +"~{':|^;>;^|:'{~", +"_$=:|+2+2+|:=*_", +"~%=:|%...%)<=%~", +",%]<:|%.%|)<]%,", +"&%'1<:)%):<<'%&", +"@[''+/+/+(.]*[@", +"+)['%%%%%%%'[)+", +"..$$*'''''*$$..", +"{{{[[$***$[[{{{", +"####]%%%%%]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/rolldownI.xpm b/clients/icewm/icewm-themes/rolldownI.xpm new file mode 100644 index 0000000000..993e561b38 --- /dev/null +++ b/clients/icewm/icewm-themes/rolldownI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * rolldownI_xpm[] = { +"15 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #8A8A8A", +"( g #929292", +"_ g #FEFEFE", +": g #434343", +"< g #3C3C3C", +"[ g #0E0E0E", +"} g #CBCBCB", +"| g #4F4F4F", +"1 g #363636", +"2 g #9F9F9F", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^>!/(/!>^]{~", +"_*)^>,,~,,>-)*_", +"~%:^>%@@@%>^:%~", +",%:^->%@%>;^<%,", +"&%<:^;>%>-^:<%&", +"@[]<&&}}}&&<][@", +"+|$]%%%%%%%=$)+", +"..**]]====]**..", +"{{{$[*']'*[${{{", +"####=%%%%%=####", +")))))))))))))))", +"111111=11111111", +"...............", +"+++++++++++++++", +"@@@@)[%%%[^@@@@", +"&&&*':)|):'*&&&", +",,*=)|^-^|)1*,,", +"~{':|^;>;^|:'{~", +"_$=:|+2+2+|:=*_", +"~%=:|%...%)<=%~", +",%]<:|%.%|)<]%,", +"&%'1<:)%):<<'%&", +"@[''+/+/+(.]*[@", +"+)['%%%%%%%'[)+", +"..$$*'''''*$$..", +"{{{[[$***$[[{{{", +"####]%%%%%]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/rollupA.xpm b/clients/icewm/icewm-themes/rollupA.xpm new file mode 100644 index 0000000000..32311d6a0e --- /dev/null +++ b/clients/icewm/icewm-themes/rollupA.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * rollupA_xpm[] = { +"15 34 31 1", +" c None", +". c #858686", +"+ c #9A9A9A", +"@ c #AEAEAE", +"# c #5D5D5E", +"$ c #111214", +"% c #040404", +"& c #C2C2C2", +"* c #181C22", +"= c #2D333D", +"- c #56657A", +"; c #58667E", +"> c #5D6E86", +", c #D6D6D6", +"' c #1D2632", +") c #4A4A4A", +"! c #6E809C", +"~ c #EAEAEA", +"{ c #717273", +"] c #232D3A", +"^ c #4D5868", +"/ c #C7CDD4", +"( c #FEFEFE", +"_ c #0D0E13", +": c #435165", +"< c #3C4553", +"[ c #677B98", +"} c #798EAA", +"| c #323F4F", +"1 c #363636", +"2 c #8CA3C5", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^/,,,,,/^]{~", +"(*)^_%__%_%^:*(", +"~%<^;[},}!>^<%~", +",%<^;>,@/[-^<%,", +"&%|<^/@@@/^<=%&", +"@_]|<_%%%%<|]$@", +"+)*]|<<<<||=$)+", +"..$*'=||==]**..", +"{{{$_**''*_${{{", +"##-#=_%%%%=####", +")))))))))))))))", +"111111=11111111", +"...............", +"+++++++++++++++", +"@@@@)_%%%_^@@@@", +"&&&*'<):)<'*&&&", +",,*=):^-^^)1*,,", +"~{'|+2+2+++<'{~", +"($=<%%%%%%%<=*(", +"~%=|:^;+;^:|=%~", +",%=|<:+.+:<|]%,", +"&%'1<+!!.+|1'%&", +"@_']=%%%%%1]'_@", +"+)_*]====]]'_)+", +"..$$*'']''*$_..", +"{{{__$$*$$_${{{", +"####]%%%%_]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/rollupI.xpm b/clients/icewm/icewm-themes/rollupI.xpm new file mode 100644 index 0000000000..31b81973ed --- /dev/null +++ b/clients/icewm/icewm-themes/rollupI.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * rollupI_xpm[] = { +"15 34 31 1", +" g None", +". g #858585", +"+ g #9A9A9A", +"@ g #AEAEAE", +"# g #5D5D5D", +"$ g #111111", +"% g #040404", +"& g #C2C2C2", +"* g #1B1B1B", +"= g #323232", +"- g #626262", +"; g #646464", +"> g #6B6B6B", +", g #D6D6D6", +"' g #242424", +") g #4A4A4A", +"! g #7D7D7D", +"~ g #EAEAEA", +"{ g #717171", +"] g #2B2B2B", +"^ g #565656", +"/ g #CBCBCB", +"( g #FEFEFE", +"_ g #0E0E0E", +": g #4F4F4F", +"< g #434343", +"[ g #787878", +"} g #8A8A8A", +"| g #3C3C3C", +"1 g #363636", +"2 g #9F9F9F", +"...............", +"+++++++++++++++", +"@@@@#$%%%$#@@@@", +"&&&*=-;>;-=*&&&", +",,')->!!!>;)',,", +"~{]^/,,,,,/^]{~", +"(*)^_%__%_%^:*(", +"~%<^;[},}!>^<%~", +",%<^;>,@/[-^<%,", +"&%|<^/@@@/^<=%&", +"@_]|<_%%%%<|]$@", +"+)*]|<<<<||=$)+", +"..$*'=||==]**..", +"{{{$_**''*_${{{", +"##-#=_%%%%=####", +")))))))))))))))", +"111111=11111111", +"...............", +"+++++++++++++++", +"@@@@)_%%%_^@@@@", +"&&&*'<):)<'*&&&", +",,*=):^-^^)1*,,", +"~{'|+2+2+++<'{~", +"($=<%%%%%%%<=*(", +"~%=|:^;+;^:|=%~", +",%=|<:+.+:<|]%,", +"&%'1<+!!.+|1'%&", +"@_']=%%%%%1]'_@", +"+)_*]====]]'_)+", +"..$$*'']''*$_..", +"{{{__$$*$$_${{{", +"####]%%%%_]####", +")))))))))))))))", +"111111111111111"}; diff --git a/clients/icewm/icewm-themes/titleAB.xpm b/clients/icewm/icewm-themes/titleAB.xpm new file mode 100644 index 0000000000..f153f2af78 --- /dev/null +++ b/clients/icewm/icewm-themes/titleAB.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * titleAS_xpm[] = { +"1 17 12 1", +" c None", +". c #868687", +"+ c #9A9A9B", +"@ c #AEAEAF", +"# c #C2C2C3", +"$ c #D6D6D7", +"% c #EAEAEB", +"& c #FFFFFF", +"* c #727273", +"= c #5E5E5F", +"- c #4A4A4B", +"; c #363637", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"%", +"$", +"#", +"@", +"+", +".", +"*", +"=", +"-", +";"}; diff --git a/clients/icewm/icewm-themes/titleAJ.xpm b/clients/icewm/icewm-themes/titleAJ.xpm new file mode 100644 index 0000000000..0ef284c1d7 --- /dev/null +++ b/clients/icewm/icewm-themes/titleAJ.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAJ_xpm[] = { +"3 17 17 1", +" c None", +". c #858687", +"+ c #4F4F51", +"@ c #999A9A", +"# c #AEAEAE", +"$ c #5E5E5E", +"% c #C2C2C2", +"& c #717172", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #FEFEFE", +"; c #909090", +"> c #717374", +", c #5C5F64", +"' c #373739", +") c #494B4D", +"! c #343638", +"..+", +"@@+", +"##$", +"%%&", +"**&", +"==&", +"--;", +"==&", +"**&", +"%%&", +"##$", +"@@+", +"..+", +">>+", +",,'", +"))'", +"!!'"}; diff --git a/clients/icewm/icewm-themes/titleAM.xpm b/clients/icewm/icewm-themes/titleAM.xpm new file mode 100644 index 0000000000..808458a44b --- /dev/null +++ b/clients/icewm/icewm-themes/titleAM.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static char * titleAM_xpm[] = { +"18 17 53 1", +" c None", +". c #868687", +"+ c #4E4E4F", +"@ c #484848", +"# c #9A9A9B", +"$ c #575758", +"% c #344066", +"& c #515151", +"* c #AEAEAF", +"= c #606061", +"- c #425076", +"; c #606060", +"> c #C2C2C3", +", c #68686A", +"' c #526185", +") c #707070", +"! c #D6D6D7", +"~ c #717173", +"{ c #607194", +"] c #808080", +"^ c #EAEAEB", +"/ c #7A7A7C", +"( c #7081A3", +"_ c #8E8E8E", +": c #FFFFFF", +"< c #838385", +"[ c #7284A6", +"} c #9B9B9B", +"| c #7587A9", +"1 c #A9A9A9", +"2 c #66779A", +"3 c #B7B7B7", +"4 c #57668A", +"5 c #C5C5C5", +"6 c #4A597D", +"7 c #D2D2D2", +"8 c #3D4A70", +"9 c #303C63", +"0 c #A7A7A7", +"a c #727273", +"b c #454547", +"c c #273259", +"d c #7F7F7F", +"e c #5E5E5F", +"f c #3C3C3E", +"g c #969696", +"h c #848484", +"i c #6B6B6B", +"j c #575757", +"k c #4A4A4B", +"l c #333335", +"m c #363637", +"n c #2A2A2C", +"..............+...", +"@@@@@@@@@@@@@#$###", +"%%%%%%%%%%%%&*=***", +"------------;>,>>>", +"'''''''''''')!~!!!", +"{{{{{{{{{{{{]^/^^^", +"((((((((((((_:<:::", +"[[[[[[[[[[[[}^/^^^", +"||||||||||||1!~!!!", +"2222222222223>,>>>", +"4444444444445*=***", +"6666666666667#$###", +"8888888888885.+...", +"9999999999990abaaa", +"ccccccccccccdefeee", +"}}}}}}}}}ghijklkkk", +"mmmmmmmmmmmmmmnmmm"}; diff --git a/clients/icewm/icewm-themes/titleAP.xpm b/clients/icewm/icewm-themes/titleAP.xpm new file mode 100644 index 0000000000..a4ae203a20 --- /dev/null +++ b/clients/icewm/icewm-themes/titleAP.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static char * titleAP_xpm[] = { +"18 17 53 1", +" c None", +". c #868687", +"+ c #4E4E4F", +"@ c #9A9A9B", +"# c #575758", +"$ c #484848", +"% c #AEAEAF", +"& c #606061", +"* c #515151", +"= c #344066", +"- c #C2C2C3", +"; c #68686A", +"> c #606060", +", c #425076", +"' c #D6D6D7", +") c #717173", +"! c #707070", +"~ c #526185", +"{ c #EAEAEB", +"] c #7A7A7C", +"^ c #808080", +"/ c #607194", +"( c #FFFFFF", +"_ c #838385", +": c #8E8E8E", +"< c #7081A3", +"[ c #9B9B9B", +"} c #7284A6", +"| c #A9A9A9", +"1 c #7587A9", +"2 c #B7B7B7", +"3 c #66779A", +"4 c #C5C5C5", +"5 c #57668A", +"6 c #D2D2D2", +"7 c #4A597D", +"8 c #3D4A70", +"9 c #727273", +"0 c #454547", +"a c #A7A7A7", +"b c #303C63", +"c c #5E5E5F", +"d c #3C3C3E", +"e c #7F7F7F", +"f c #273259", +"g c #4A4A4B", +"h c #333335", +"i c #575757", +"j c #6B6B6B", +"k c #848484", +"l c #969696", +"m c #363637", +"n c #2A2A2C", +"...+..............", +"@@@#@$$$$$$$$$$$$$", +"%%%&%*============", +"---;->,,,,,,,,,,,,", +"''')'!~~~~~~~~~~~~", +"{{{]{^////////////", +"(((_(:<<<<<<<<<<<<", +"{{{]{[}}}}}}}}}}}}", +"''')'|111111111111", +"---;-2333333333333", +"%%%&%4555555555555", +"@@@#@6777777777777", +"...+.4888888888888", +"99909abbbbbbbbbbbb", +"cccdceffffffffffff", +"ggghgijkl[[[[[[[[[", +"mmmnmmmmmmmmmmmmmm"}; diff --git a/clients/icewm/icewm-themes/titleAQ.xpm b/clients/icewm/icewm-themes/titleAQ.xpm new file mode 100644 index 0000000000..8bc6cd280e --- /dev/null +++ b/clients/icewm/icewm-themes/titleAQ.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAQ_xpm[] = { +"2 17 17 1", +" c None", +". c #4F4F51", +"+ c #858687", +"@ c #999A9A", +"# c #5E5E5E", +"$ c #AEAEAE", +"% c #717172", +"& c #C2C2C2", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #909090", +"; c #FEFEFE", +"> c #717374", +", c #373739", +"' c #5C5F64", +") c #494B4D", +"! c #343638", +".+", +".@", +"#$", +"%&", +"%*", +"%=", +"-;", +"%=", +"%*", +"%&", +"#$", +".@", +".+", +".>", +",'", +",)", +",!"}; diff --git a/clients/icewm/icewm-themes/titleAR.xpm b/clients/icewm/icewm-themes/titleAR.xpm new file mode 100644 index 0000000000..8bc6cd280e --- /dev/null +++ b/clients/icewm/icewm-themes/titleAR.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAQ_xpm[] = { +"2 17 17 1", +" c None", +". c #4F4F51", +"+ c #858687", +"@ c #999A9A", +"# c #5E5E5E", +"$ c #AEAEAE", +"% c #717172", +"& c #C2C2C2", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #909090", +"; c #FEFEFE", +"> c #717374", +", c #373739", +"' c #5C5F64", +") c #494B4D", +"! c #343638", +".+", +".@", +"#$", +"%&", +"%*", +"%=", +"-;", +"%=", +"%*", +"%&", +"#$", +".@", +".+", +".>", +",'", +",)", +",!"}; diff --git a/clients/icewm/icewm-themes/titleAS.xpm b/clients/icewm/icewm-themes/titleAS.xpm new file mode 100644 index 0000000000..f153f2af78 --- /dev/null +++ b/clients/icewm/icewm-themes/titleAS.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * titleAS_xpm[] = { +"1 17 12 1", +" c None", +". c #868687", +"+ c #9A9A9B", +"@ c #AEAEAF", +"# c #C2C2C3", +"$ c #D6D6D7", +"% c #EAEAEB", +"& c #FFFFFF", +"* c #727273", +"= c #5E5E5F", +"- c #4A4A4B", +"; c #363637", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"%", +"$", +"#", +"@", +"+", +".", +"*", +"=", +"-", +";"}; diff --git a/clients/icewm/icewm-themes/titleAT.xpm b/clients/icewm/icewm-themes/titleAT.xpm new file mode 100644 index 0000000000..84f06879cf --- /dev/null +++ b/clients/icewm/icewm-themes/titleAT.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char * titleAT_xpm[] = { +"1 17 18 1", +" c None", +". c #868687", +"+ c #484848", +"@ c #344066", +"# c #425076", +"$ c #526185", +"% c #607194", +"& c #7081A3", +"* c #7284A6", +"= c #7587A9", +"- c #66779A", +"; c #57668A", +"> c #4A597D", +", c #3D4A70", +"' c #303C63", +") c #273259", +"! c #9B9B9B", +"~ c #363637", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"*", +"=", +"-", +";", +">", +",", +"'", +")", +"!", +"~"}; diff --git a/clients/icewm/icewm-themes/titleIB.xpm b/clients/icewm/icewm-themes/titleIB.xpm new file mode 100644 index 0000000000..f153f2af78 --- /dev/null +++ b/clients/icewm/icewm-themes/titleIB.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * titleAS_xpm[] = { +"1 17 12 1", +" c None", +". c #868687", +"+ c #9A9A9B", +"@ c #AEAEAF", +"# c #C2C2C3", +"$ c #D6D6D7", +"% c #EAEAEB", +"& c #FFFFFF", +"* c #727273", +"= c #5E5E5F", +"- c #4A4A4B", +"; c #363637", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"%", +"$", +"#", +"@", +"+", +".", +"*", +"=", +"-", +";"}; diff --git a/clients/icewm/icewm-themes/titleIJ.xpm b/clients/icewm/icewm-themes/titleIJ.xpm new file mode 100644 index 0000000000..0ef284c1d7 --- /dev/null +++ b/clients/icewm/icewm-themes/titleIJ.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAJ_xpm[] = { +"3 17 17 1", +" c None", +". c #858687", +"+ c #4F4F51", +"@ c #999A9A", +"# c #AEAEAE", +"$ c #5E5E5E", +"% c #C2C2C2", +"& c #717172", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #FEFEFE", +"; c #909090", +"> c #717374", +", c #5C5F64", +"' c #373739", +") c #494B4D", +"! c #343638", +"..+", +"@@+", +"##$", +"%%&", +"**&", +"==&", +"--;", +"==&", +"**&", +"%%&", +"##$", +"@@+", +"..+", +">>+", +",,'", +"))'", +"!!'"}; diff --git a/clients/icewm/icewm-themes/titleIM.xpm b/clients/icewm/icewm-themes/titleIM.xpm new file mode 100644 index 0000000000..575b63c488 --- /dev/null +++ b/clients/icewm/icewm-themes/titleIM.xpm @@ -0,0 +1,66 @@ +/* XPM */ +static char * titleIM_xpm[] = { +"18 17 46 1", +" c None", +". c #868686", +"+ c #4E4E4E", +"@ c #484848", +"# c #9A9A9A", +"$ c #575757", +"% c #4D4D4D", +"& c #515151", +"* c #AEAEAE", +"= c #606060", +"- c #5C5C5C", +"; c #C2C2C2", +"> c #696969", +", c #6B6B6B", +"' c #707070", +") c #D6D6D6", +"! c #727272", +"~ c #7A7A7A", +"{ c #808080", +"] c #EAEAEA", +"^ c #7B7B7B", +"/ c #898989", +"( c #8E8E8E", +"_ c #FFFFFF", +": c #848484", +"< c #8C8C8C", +"[ c #9B9B9B", +"} c #8F8F8F", +"| c #A9A9A9", +"1 c #B7B7B7", +"2 c #C5C5C5", +"3 c #636363", +"4 c #D2D2D2", +"5 c #565656", +"6 c #494949", +"7 c #A7A7A7", +"8 c #464646", +"9 c #404040", +"0 c #7F7F7F", +"a c #5E5E5E", +"b c #3D3D3D", +"c c #969696", +"d c #4A4A4A", +"e c #343434", +"f c #363636", +"g c #2B2B2B", +"..............+...", +"@@@@@@@@@@@@@#$###", +"%%%%%%%%%%%%&*=***", +"------------=;>;;;", +",,,,,,,,,,,,')!)))", +"~~~~~~~~~~~~{]^]]]", +"////////////(_:___", +"<<<<<<<<<<<<[]^]]]", +"}}}}}}}}}}}}|)!)))", +"{{{{{{{{{{{{1;>;;;", +"''''''''''''2*=***", +"3333333333334#$###", +"5555555555552.+...", +"6666666666667!8!!!", +"9999999999990abaaa", +"[[[[[[[[[c:,$deddd", +"ffffffffffffffgfff"}; diff --git a/clients/icewm/icewm-themes/titleIP.xpm b/clients/icewm/icewm-themes/titleIP.xpm new file mode 100644 index 0000000000..170d1b2aea --- /dev/null +++ b/clients/icewm/icewm-themes/titleIP.xpm @@ -0,0 +1,66 @@ +/* XPM */ +static char * titleIP_xpm[] = { +"18 17 46 1", +" c None", +". c #868686", +"+ c #4E4E4E", +"@ c #9A9A9A", +"# c #575757", +"$ c #484848", +"% c #AEAEAE", +"& c #606060", +"* c #515151", +"= c #4D4D4D", +"- c #C2C2C2", +"; c #696969", +"> c #5C5C5C", +", c #D6D6D6", +"' c #727272", +") c #707070", +"! c #6B6B6B", +"~ c #EAEAEA", +"{ c #7B7B7B", +"] c #808080", +"^ c #7A7A7A", +"/ c #FFFFFF", +"( c #848484", +"_ c #8E8E8E", +": c #898989", +"< c #9B9B9B", +"[ c #8C8C8C", +"} c #A9A9A9", +"| c #8F8F8F", +"1 c #B7B7B7", +"2 c #C5C5C5", +"3 c #D2D2D2", +"4 c #636363", +"5 c #565656", +"6 c #464646", +"7 c #A7A7A7", +"8 c #494949", +"9 c #5E5E5E", +"0 c #3D3D3D", +"a c #7F7F7F", +"b c #404040", +"c c #4A4A4A", +"d c #343434", +"e c #969696", +"f c #363636", +"g c #2B2B2B", +"...+..............", +"@@@#@$$$$$$$$$$$$$", +"%%%&%*============", +"---;-&>>>>>>>>>>>>", +",,,',)!!!!!!!!!!!!", +"~~~{~]^^^^^^^^^^^^", +"///(/_::::::::::::", +"~~~{~<[[[[[[[[[[[[", +",,,',}||||||||||||", +"---;-1]]]]]]]]]]]]", +"%%%&%2))))))))))))", +"@@@#@3444444444444", +"...+.2555555555555", +"'''6'7888888888888", +"99909abbbbbbbbbbbb", +"cccdc#!(e<<<<<<<<<", +"fffgffffffffffffff"}; diff --git a/clients/icewm/icewm-themes/titleIQ.xpm b/clients/icewm/icewm-themes/titleIQ.xpm new file mode 100644 index 0000000000..8bc6cd280e --- /dev/null +++ b/clients/icewm/icewm-themes/titleIQ.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAQ_xpm[] = { +"2 17 17 1", +" c None", +". c #4F4F51", +"+ c #858687", +"@ c #999A9A", +"# c #5E5E5E", +"$ c #AEAEAE", +"% c #717172", +"& c #C2C2C2", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #909090", +"; c #FEFEFE", +"> c #717374", +", c #373739", +"' c #5C5F64", +") c #494B4D", +"! c #343638", +".+", +".@", +"#$", +"%&", +"%*", +"%=", +"-;", +"%=", +"%*", +"%&", +"#$", +".@", +".+", +".>", +",'", +",)", +",!"}; diff --git a/clients/icewm/icewm-themes/titleIR.xpm b/clients/icewm/icewm-themes/titleIR.xpm new file mode 100644 index 0000000000..8bc6cd280e --- /dev/null +++ b/clients/icewm/icewm-themes/titleIR.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * titleAQ_xpm[] = { +"2 17 17 1", +" c None", +". c #4F4F51", +"+ c #858687", +"@ c #999A9A", +"# c #5E5E5E", +"$ c #AEAEAE", +"% c #717172", +"& c #C2C2C2", +"* c #D6D6D6", +"= c #E9EAEA", +"- c #909090", +"; c #FEFEFE", +"> c #717374", +", c #373739", +"' c #5C5F64", +") c #494B4D", +"! c #343638", +".+", +".@", +"#$", +"%&", +"%*", +"%=", +"-;", +"%=", +"%*", +"%&", +"#$", +".@", +".+", +".>", +",'", +",)", +",!"}; diff --git a/clients/icewm/icewm-themes/titleIS.xpm b/clients/icewm/icewm-themes/titleIS.xpm new file mode 100644 index 0000000000..f153f2af78 --- /dev/null +++ b/clients/icewm/icewm-themes/titleIS.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * titleAS_xpm[] = { +"1 17 12 1", +" c None", +". c #868687", +"+ c #9A9A9B", +"@ c #AEAEAF", +"# c #C2C2C3", +"$ c #D6D6D7", +"% c #EAEAEB", +"& c #FFFFFF", +"* c #727273", +"= c #5E5E5F", +"- c #4A4A4B", +"; c #363637", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"%", +"$", +"#", +"@", +"+", +".", +"*", +"=", +"-", +";"}; diff --git a/clients/icewm/icewm-themes/titleIT.xpm b/clients/icewm/icewm-themes/titleIT.xpm new file mode 100644 index 0000000000..ddcab7574b --- /dev/null +++ b/clients/icewm/icewm-themes/titleIT.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char * titleIT_xpm[] = { +"1 17 18 1", +" c None", +". c #868686", +"+ c #484848", +"@ c #4D4D4D", +"# c #5C5C5C", +"$ c #6B6B6B", +"% c #7A7A7A", +"& c #898989", +"* c #8C8C8C", +"= c #8F8F8F", +"- c #808080", +"; c #707070", +"> c #636363", +", c #565656", +"' c #494949", +") c #404040", +"! c #9B9B9B", +"~ c #363636", +".", +"+", +"@", +"#", +"$", +"%", +"&", +"*", +"=", +"-", +";", +">", +",", +"'", +")", +"!", +"~"}; diff --git a/clients/icewm/icewm.cpp b/clients/icewm/icewm.cpp new file mode 100644 index 0000000000..137bc6a074 --- /dev/null +++ b/clients/icewm/icewm.cpp @@ -0,0 +1,1189 @@ +/* + Gallium-IceWM themeable KWin client + + Copyright 2001 + Karol Szwed (gallium) + http://gallium.n3.net/ + + This client loads most icewm 1.0.X pixmap themes, without taking into account + specific font settings for clients, or coloured mouse cursors. Titlebar + fonts can be changed via the kde control center. Bi-colour mouse cursors + may be added in future if requested by users, as well as theme font support. + Any styles using inbuilt icewm titlebar drawing without using pixmaps (e.g. + Warp4, win95 etc.) are not fully supported, and may cause drawing errors, + as these themes use in-built icewm drawing mechanisms. + + When a pixmap theme is not present (or a corrupt one is present) then very + plain title decorations are painted instead, so that users don't see + non-painted window areas where possible ;) + + At a later date, frame shaping may be added if really requested, and an + update to support the latest icewm 1.1.X theme format may be made. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../workspace.h" +#include "../../options.h" +#include "icewm.h" + +using namespace KWinInternal; + +extern "C" +{ + Client* allocate(Workspace *ws, WId w, int) + { + return(new IceWMClient(ws, w)); + } +} + +//////////////////////////////////////////////////////////////////////////////////////////// +// Here's the global pixmap stuff - as memory efficient as it can be :) +//////////////////////////////////////////////////////////////////////////////////////////// + +// IceWM frame pixmaps +QPixmap* frameTL[] = {NULL, NULL}; +QPixmap* frameT [] = {NULL, NULL}; +QPixmap* frameTR[] = {NULL, NULL}; +QPixmap* frameL [] = {NULL, NULL}; +QPixmap* frameR [] = {NULL, NULL}; +QPixmap* frameBL[] = {NULL, NULL}; +QPixmap* frameB [] = {NULL, NULL}; +QPixmap* frameBR[] = {NULL, NULL}; + +// Button pixmaps +QPixmap* closePix[] = {NULL, NULL}; +QPixmap* depthPix[] = {NULL, NULL}; +QPixmap* maximizePix[] = {NULL, NULL}; +QPixmap* minimizePix[] = {NULL, NULL}; +QPixmap* restorePix[] = {NULL, NULL}; +QPixmap* hidePix[] = {NULL, NULL}; +QPixmap* rollupPix[] = {NULL, NULL}; +QPixmap* rolldownPix[] = {NULL, NULL}; +QPixmap* menuButtonPix[] = {NULL, NULL}; + +// Titlebar pixmaps +QPixmap* titleJ[] = {NULL, NULL}; +QPixmap* titleL[] = {NULL, NULL}; +QPixmap* titleS[] = {NULL, NULL}; +QPixmap* titleP[] = {NULL, NULL}; +QPixmap* titleT[] = {NULL, NULL}; +QPixmap* titleM[] = {NULL, NULL}; +QPixmap* titleB[] = {NULL, NULL}; +QPixmap* titleR[] = {NULL, NULL}; +QPixmap* titleQ[] = {NULL, NULL}; + +bool initialized = false; +bool validframe = false; + +int cornerSizeX; +int cornerSizeY; +int titleBarHeight; +int borderSizeX; +int borderSizeY; + +// Yes, we can change button positions :-) +QString titleButtonsLeft; +QString titleButtonsRight; +QString themeName; + +QColor colorActiveBorder; +QColor colorInActiveBorder; +QColor colorActiveTitleBarText; +QColor colorInActiveTitleBarText; +QColor colorActiveTitleBar; +QColor colorInActiveTitleBar; + +Workspace* workspace_internal = NULL; +Options* options_internal = NULL; +ThemeHandler theme_handler; + +// KControl Settings - Read from kwinrc config file or icewm theme +bool themeTitleTextColors = true; // Allow theme to set colors. kcontrol will have no effect +bool titleBarOnTop = true; // Titlebars can be below windows too :) +bool showMenuButtonIcon = false; // Draw a mini icon over the menu pixmap. + +// make these work... +bool themeButtonPositions = true; // Let the theme dictate the btn pos. +bool titleBarCentered = true; + + +//////////////////////////////////////////////////////////////////////////////////////////// +// General utility functions +//////////////////////////////////////////////////////////////////////////////////////////// + +// Returns true if both active and inactive pixmaps are valid, and not null +bool validPixmaps( QPixmap* p[] ) +{ + // If p[Active] exists, then p[InActive] is guaranteed to exist + // only if p[Active] is valid (see setPixmap func) + return (p[Active] && !p[Active]->isNull()); +} + + + +//////////////////////////////////////////////////////////////////////////////////////////// +// ThemeHandler class +// +// This class allows us to free dynamic memory upon being reset, or unloaded +// from kwin, so we don't leak big images everywhere, and handles the theme +// initialisation / destruction in general. +//////////////////////////////////////////////////////////////////////////////////////////// + +ThemeHandler::ThemeHandler(): QObject( 0L ) +{ + readConfig(); + initTheme(); + validframe = isFrameValid(); + initialized = true; + connect( options, SIGNAL(resetClients()), this, SLOT(slotReset()) ); +} + + +ThemeHandler::~ThemeHandler() +{ + if (initialized) + freePixmaps(); +} + + + +// Converts KDE style button strings to icewm style button strings +void ThemeHandler::convertButtons( QString& s ) +{ + s.replace( QRegExp("_"), ""); // Spacer (ignored) + s.replace( QRegExp("H"), ""); // Help (ignored) + s.replace( QRegExp("M"), "s"); // Sysmenu + s.replace( QRegExp("S"), "d"); // Sticky + s.replace( QRegExp("I"), "i"); // Minimize + s.replace( QRegExp("A"), "m"); // Maximize + s.replace( QRegExp("X"), "x"); // Close +} + + +// Reverses all characters in a QString +QString ThemeHandler::reverseString( QString s ) +{ + if (s.length() <= 1) + return s; + + QString tmpStr; + for(int i = s.length()-1; i >= 0; i--) + { + tmpStr += s[(unsigned int)i]; + } + + return tmpStr; +} + + +// This function reads the kwinrc config file +void ThemeHandler::readConfig() +{ + KConfig* conf = KGlobal::config(); + conf->setGroup("IceWM"); + themeName = conf->readEntry("CurrentTheme", ""); + themeTitleTextColors = conf->readBoolEntry("ThemeTitleTextColors", true); + themeButtonPositions = conf->readBoolEntry("ThemeButtonPositions", true); + showMenuButtonIcon = conf->readBoolEntry("ShowMenuButtonIcon", false); + titleBarOnTop = conf->readBoolEntry("TitleBarOnTop", true); + + if (!themeButtonPositions) + { + conf->setGroup("Style"); + titleButtonsLeft = conf->readEntry("ButtonsOnLeft", "MS"); + titleButtonsRight = conf->readEntry("ButtonsOnRight", "HIAX"); + + // Convert KDE to icewm style buttons + convertButtons( titleButtonsLeft ); + convertButtons( titleButtonsRight ); + } + + // Provide a default theme alias + if (themeName == "default") + themeName = ""; +} + + +// This creates the dynamic pixmaps upon loading the style +// into the pixmap buffers above, and configures the dimensioning stuff. +void ThemeHandler::initTheme() +{ + // Add a slash if required + if ( themeName != "" ) + themeName += "/"; + + // We use kconfig to read icewm config files... + // this is easy since icewm uses key=value pairs! + KConfig config( locate("appdata", QString("icewm-themes/") + themeName + QString("default.theme")) ); + + // Load specifics, or use IceWM defaults instead. + borderSizeX = config.readNumEntry("BorderSizeX", 6); + borderSizeY = config.readNumEntry("BorderSizeY", 6); + cornerSizeX = config.readNumEntry("CornerSizeX", 24); + cornerSizeY = config.readNumEntry("CornerSizeY", 24); + titleBarCentered = (bool) config.readNumEntry("TitleBarCentered", 0); + + // Check if readConfig() hasn't overridden this value... + if (!showMenuButtonIcon) + showMenuButtonIcon = (bool) config.readNumEntry("ShowMenuButtonIcon", 0); + titleBarHeight = config.readNumEntry("TitleBarHeight", 20); + + if (themeButtonPositions) + { + // Read in the button configuration, stripping any quotes + // Ignore sticky 'd' on the left buttons (some themes look bad with it on by default) + titleButtonsLeft = config.readEntry("TitleButtonsLeft", "s"); + titleButtonsLeft = titleButtonsLeft.replace( QRegExp(QString("\"")), ""); + titleButtonsRight = config.readEntry("TitleButtonsRight", "xmi"); + titleButtonsRight = titleButtonsRight.replace( QRegExp(QString("\"")), ""); + + // I have no idea why the right side buttons in icewm are reversed + titleButtonsRight = reverseString( titleButtonsRight ); + } + + // Read the default border and text colours from the config file + // And use IceWM defaults if not found + QString s; + s = config.readEntry("ColorActiveBorder", "#C0C0C0"); + colorActiveBorder = decodeColor( s ); + s = config.readEntry("ColorNormalBorder", "#C0C0C0"); + colorInActiveBorder = decodeColor( s ); + + // Use these as a last resort + s = config.readEntry("ColorActiveTitleBar", "#0000A0"); + colorActiveTitleBar = decodeColor( s ); + s = config.readEntry("ColorNormalTitleBar", "#808080"); + colorInActiveTitleBar = decodeColor( s ); + + // Read titlebar text colours + s = config.readEntry("ColorActiveTitleBarText", "#FFFFFF"); + colorActiveTitleBarText = decodeColor( s ); + s = config.readEntry("ColorNormalTitleBarText", "#000000"); + colorInActiveTitleBarText = decodeColor( s ); + + // Stretch pixmaps for speed, where required + setPixmap( titleJ, "title", "J.xpm" ); + setPixmap( titleL, "title", "L.xpm" ); + setPixmap( titleS, "title", "S.xpm", true ); + + setPixmap( titleP, "title", "P.xpm" ); + setPixmap( titleT, "title", "T.xpm", true ); + setPixmap( titleM, "title", "M.xpm" ); + setPixmap( titleB, "title", "B.xpm", true ); + setPixmap( titleR, "title", "R.xpm" ); + setPixmap( titleQ, "title", "Q.xpm" ); + + setPixmap( closePix, "close", ".xpm" ); + setPixmap( depthPix, "depth", ".xpm" ); + setPixmap( maximizePix, "maximize", ".xpm" ); + setPixmap( minimizePix, "minimize", ".xpm" ); + setPixmap( restorePix, "restore", ".xpm" ); + setPixmap( hidePix, "hide", ".xpm" ); + setPixmap( rollupPix, "rollup", ".xpm" ); + setPixmap( rolldownPix, "rolldown", ".xpm" ); + setPixmap( menuButtonPix,"menuButton",".xpm" ); + + // Top + setPixmap( frameTL, "frame", "TL.xpm" ); + setPixmap( frameT, "frame", "T.xpm", true ); + setPixmap( frameTR, "frame", "TR.xpm" ); + + // Sides + setPixmap( frameL, "frame", "L.xpm", true, Vertical ); + setPixmap( frameR, "frame", "R.xpm", true, Vertical ); + + // Bottom + setPixmap( frameBL, "frame", "BL.xpm" ); + setPixmap( frameB, "frame", "B.xpm", true ); + setPixmap( frameBR, "frame", "BR.xpm" ); + + // Make sure border sizes are at least reasonable... + if (borderSizeX < 0) + borderSizeX = 0; + if (borderSizeY < 0) + borderSizeY = 0; +} + + +// Frees all memory used by pixmaps. +void ThemeHandler::freePixmaps() +{ + freePixmapGroup( frameTL ); + freePixmapGroup( frameT ); + freePixmapGroup( frameTR ); + freePixmapGroup( frameL ); + freePixmapGroup( frameR ); + freePixmapGroup( frameBL ); + freePixmapGroup( frameB ); + freePixmapGroup( frameBR ); + + freePixmapGroup( closePix ); + freePixmapGroup( depthPix ); + freePixmapGroup( maximizePix ); + freePixmapGroup( minimizePix ); + freePixmapGroup( restorePix ); + freePixmapGroup( hidePix ); + freePixmapGroup( rollupPix ); + freePixmapGroup( rolldownPix ); + freePixmapGroup( menuButtonPix ); + + freePixmapGroup( titleJ ); + freePixmapGroup( titleL ); + freePixmapGroup( titleS ); + freePixmapGroup( titleP ); + freePixmapGroup( titleT ); + freePixmapGroup( titleM ); + freePixmapGroup( titleB ); + freePixmapGroup( titleR ); + freePixmapGroup( titleQ ); +} + + +// Frees a dynamic pixmap group from the heap. +void ThemeHandler::freePixmapGroup( QPixmap* p[] ) +{ + if (p) + { + if (p[Active]) delete p[Active]; + if (p[InActive]) delete p[InActive]; + p[Active] = 0L; + p[InActive] = 0L; + } else + qWarning("kwin-icewm: freePixmapGroup - invalid QPixmap** 'p'\n"); +} + + +// Converts icewm colors #C0C0C0 or rgb:C0/C0/C0 to QColors +QColor ThemeHandler::decodeColor( QString& s ) +{ + // Make rgb:C0/C0/C0, or #C0/C0/C0 -> C0C0C0 + s.replace( QRegExp("r"), ""); + s.replace( QRegExp("g"), ""); + s.replace( QRegExp("b"), ""); + s.replace( QRegExp("#"), ""); + s.replace( QRegExp("/"), ""); + s.replace( QRegExp(":"), ""); + s.replace( QRegExp("\\"), ""); + s.replace( QRegExp("\""), ""); + + // Wierd error - return grey + if (s.length() != 6) + return QColor( 0xC0, 0xC0, 0xC0 ); + + // Qt makes this conversion very easy + return QColor( QString("#") + s ); +} + + +// Stretches tiny pixmaps vertically or horizontally, taking into account +// repetition in patterns, so as not to make them mismatched +QPixmap* ThemeHandler::stretchPixmap( QPixmap* src, bool stretchHoriz, int stretchSize ) +{ + if (!src) return 0L; + if (src->isNull()) return 0L; + + int s_inc, size; + + // If its the right size already, just return + if (stretchSize == -1) + { + if (stretchHoriz) + s_inc = src->width(); + else + s_inc = src->height(); + + size = s_inc; + if (size >= 100) + return src; + + // Stretch an appropriate amount - taking care of pattern repetition + while( size < 100 ) + size += s_inc; + } else + size = stretchSize; + + QPixmap* p = new QPixmap(); + if ( stretchHoriz ) + p->resize( size, src->height() ); + else + p->resize( src->width(), size ); + + QPainter pnt( p ); + if ( stretchHoriz ) + pnt.drawTiledPixmap( 0, 0, size, src->height(), *src); + else + pnt.drawTiledPixmap( 0, 0, src->width(), size, *src); + pnt.end(); + + delete src; + return p; +} + + +// Loads the specified Active/InActive files into the specific pixmaps, and +// can perform horizontal / vertical stretching if required for speed. +// Tries to implement some icewm specific pixmap handling for some dodgy themes +void ThemeHandler::setPixmap( QPixmap* p[], QString s1, QString s2, bool stretch, bool stretchHoriz ) +{ + if ( p[Active] ) + qWarning("kwin-icewm: setPixmap - should be null (1)\n"); + if ( p[InActive] ) + qWarning("kwin-icewm: setPixmap - should be null (2)\n"); + + p[Active] = new QPixmap( locate("appdata", QString("icewm-themes/") + themeName + s1 + "A" + s2) ); + p[InActive] = new QPixmap( locate("appdata", QString("icewm-themes/") + themeName + s1 + "I" + s2) ); + + if ( (!p[Active]) || (!p[InActive]) ) + qWarning("kwin-icewm: Could not locate requested XBM file(s), or memory exhausted.\n"); + + // If we don't get an inactive pixmap from the files, + // use the same pixmap as the active one + if (p[InActive]->isNull()) + { + delete p[InActive]; + p[InActive] = new QPixmap( *p[Active] ); + } + + // Stretch the pixmap if requested. + if ( stretch ) + { + p[Active] = stretchPixmap( p[Active], stretchHoriz ); + p[InActive] = stretchPixmap( p[InActive], stretchHoriz ); + } else + { + // Make sure active and inactive pixmaps are the same width for proper painting + if (p[Active]->width() > p[InActive]->width()) + p[InActive] = stretchPixmap( p[InActive], true, p[Active]->width() ); + } +} + + +// returns true if there were enough pixmaps loaded to +// draw the pixmap frame properly. +bool ThemeHandler::isFrameValid() +{ + return + ( validPixmaps( frameTL ) && + validPixmaps( frameT ) && + validPixmaps( frameTR ) && + validPixmaps( frameL ) && + validPixmaps( frameR ) && + validPixmaps( frameBL ) && + validPixmaps( frameB ) && + validPixmaps( frameBR ) ); +} + + +// Resets the theme, and re-clients all kwin's wrapped windows. +void ThemeHandler::slotReset() +{ + // Don't reset if a client has never been made, and the workspace + // pointer hasn't been set. This is a hack - the workspace is not + // globally visible like options is, which isn't nice. + if (workspace_internal) + { + initialized = false; + freePixmaps(); + readConfig(); + initTheme(); + validframe = isFrameValid(); + initialized = true; + + // Make kwin create new clients for each window... + workspace_internal->slotResetAllClientsDelayed(); + } +} + + + +//////////////////////////////////////////////////////////////////////////////////////////// +// IceWM button class +//////////////////////////////////////////////////////////////////////////////////////////// + +IceWMButton::IceWMButton(Client *parent, const char *name, QPixmap* (*p)[2], bool isToggle ) + : QButton(parent, name, WStyle_Customize | WRepaintNoErase | + WResizeNoErase | WStyle_NoBorder) +{ + // Eliminate any possible background flicker + setBackgroundMode( QWidget::NoBackground ); + client = parent; + usePixmap( p ); + setFixedSize( sizeHint() ); + setToggleButton( isToggle ); +} + + +QSize IceWMButton::sizeHint() const +{ + // Check for invalid data + if ( validPixmaps( (QPixmap**) (*pix) ) ) // Cast to avoid dumb warning + { + QPixmap* p = (*pix)[ client->isActive() ? Active : InActive ]; + return( QSize(p->width(), titleBarHeight) ); + } else + return( QSize(0, 0) ); +} + + +void IceWMButton::usePixmap( QPixmap* (*p)[2] ) +{ + if ( validPixmaps( *p ) ) + { + pix = p; + setFixedSize( (*pix)[Active]->width(), titleBarHeight ); + repaint( false ); + } else + { + pix = NULL; + } +} + + +void IceWMButton::drawButton(QPainter *pnt) +{ + if ( pix && validPixmaps(*pix) ) + { + QPixmap* p = (*pix)[ client->isActive() ? Active : InActive ]; + + if( p && (!p->isNull()) ) + { + int width = p->width(); + + // Only draw the lower pixmap 1/2 for down, and upper 1/2 for up state + if( isDown() || isOn() ) + pnt->drawPixmap(0, 0, *p, 0, titleBarHeight, width, titleBarHeight); + else + pnt->drawPixmap(0, 0, *p, 0, 0, width, titleBarHeight); + } + } else + qWarning("kwin-icewm: Can't paint a null pixmap button"); +} + + +void IceWMButton::turnOn( bool isOn ) +{ + if ( isToggleButton() ) + setOn( isOn ); +} + + +void IceWMButton::mousePressEvent( QMouseEvent* e ) +{ + last_button = e->button(); + QMouseEvent me ( e->type(), e->pos(), e->globalPos(), + LeftButton, e->state() ); + QButton::mousePressEvent( &me ); +} + + +void IceWMButton::mouseReleaseEvent( QMouseEvent* e ) +{ + last_button = e->button(); + QMouseEvent me ( e->type(), e->pos(), e->globalPos(), + LeftButton, e->state() ); + QButton::mouseReleaseEvent( &me ); +} + + + +//////////////////////////////////////////////////////////////////////////////////////////// +// IceWMClient class +//////////////////////////////////////////////////////////////////////////////////////////// + +IceWMClient::IceWMClient( Workspace *ws, WId w, QWidget *parent, const char *name ) + : Client( ws, w, parent, name, WResizeNoErase | WNorthWestGravity | WRepaintNoErase ) +{ + // The ThemeHandler must also see the options class + // which it null upon initially loading kwin +// if (!options_internal) +// { +// options_internal = options; +// connect( options, SIGNAL(resetClients()), &theme_handler, SLOT(slotReset()) ); +// } + workspace_internal = ws; + + // Set button pointers to null so we can track things + for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++) + button[i] = NULL; + + // Make sure we can track the menu pixmaps too. + menuButtonWithIconPix[Active] = NULL; + menuButtonWithIconPix[InActive] = NULL; + + // No flicker thanks + setBackgroundMode( NoBackground ); + + // Pack the windowWrapper() window within a grid layout + grid = new QGridLayout(this, 0, 0, 0); + grid->setResizeMode(QLayout::FreeResize); + grid->addRowSpacing(0, borderSizeY); // Top grab bar + + // Do something IceWM can't do :) + if (titleBarOnTop) + grid->addWidget(windowWrapper(), 2, 1); + else + grid->addWidget(windowWrapper(), 1, 1); + + grid->setRowStretch(1, 10); + grid->setRowStretch(2, 10); + grid->setColStretch(1, 10); + grid->addRowSpacing(3, borderSizeY); + grid->addColSpacing(0, borderSizeX); + grid->addColSpacing(2, borderSizeX); + + // Pack the titlebar with spacers and buttons + hb = new QHBoxLayout(); + hb->setResizeMode( QLayout::FreeResize ); + + titleSpacerJ = addPixmapSpacer( titleJ ); + + addClientButtons( titleButtonsLeft ); + titleSpacerL = addPixmapSpacer( titleL ); + + // Centre titlebar if required. + QSizePolicy::SizeType spTitleBar; + spTitleBar = titleBarCentered ? QSizePolicy::Expanding : QSizePolicy::Maximum; + titleSpacerS = addPixmapSpacer( titleS, spTitleBar, 1 ); + titleSpacerP = addPixmapSpacer( titleP ); + + titlebar = new QSpacerItem( titleTextWidth(caption()), titleBarHeight, + QSizePolicy::Preferred, QSizePolicy::Fixed ); + hb->addItem(titlebar); + + titleSpacerM = addPixmapSpacer( titleM ); + titleSpacerB = addPixmapSpacer( titleB, QSizePolicy::Expanding, 1 ); + titleSpacerR = addPixmapSpacer( titleR ); + + addClientButtons( titleButtonsRight ); + + titleSpacerQ = addPixmapSpacer( titleQ ); + + if (titleBarOnTop) + grid->addLayout ( hb, 1, 1 ); + else + grid->addLayout ( hb, 2, 1 ); + + // Hide buttons which are not required + if ( !isMinimizable() && button[BtnMinimize] ) + button[BtnMinimize]->hide(); + if ( !isMaximizable() && button[BtnMaximize] ) + button[BtnMaximize]->hide(); +} + + +IceWMClient::~IceWMClient() +{ + // Free the menu pixmaps if previously allocated + if ( menuButtonWithIconPix[Active] ) + delete menuButtonWithIconPix[Active]; + if ( menuButtonWithIconPix[InActive] ) + delete menuButtonWithIconPix[InActive]; +} + + +// Adds the buttons to the hbox layout as per the buttons specified +// in the button string 's' +void IceWMClient::addClientButtons( const QString& s ) +{ + if (s.length() > 0) + for(unsigned int i = 0; i < s.length(); i++) + { + switch ( s[i].latin1() ) + { + case 's': + // Create the menu icons, and render with the current mini-icon + // if explicitly requested by the theme. + if ( validPixmaps(menuButtonPix) && !button[BtnSysMenu]) + { + if (showMenuButtonIcon) { + renderMenuIcons(); + button[BtnSysMenu] = new IceWMButton(this, "menu", &menuButtonWithIconPix); + } + else + button[BtnSysMenu] = new IceWMButton(this, "menu", &menuButtonPix); + + connect( button[BtnSysMenu], SIGNAL(pressed()), this, SLOT(menuButtonPressed())); + hb->addWidget( button[BtnSysMenu] ); + } + break; + + case 'x': + if ( validPixmaps(closePix) && !button[BtnClose] ) + { + button[BtnClose] = new IceWMButton(this, "close", &closePix); + hb->addWidget( button[BtnClose] ); + connect( button[BtnClose], SIGNAL(clicked()), this, SLOT(closeWindow())); + } + break; + + case 'm': + if ( validPixmaps(maximizePix) && !button[BtnMaximize] ) + { + button[BtnMaximize] = new IceWMButton(this, "maximize", &maximizePix); + hb->addWidget( button[BtnMaximize] ); + connect( button[BtnMaximize], SIGNAL(clicked()), this, SLOT(slotMaximize())); + } + break; + + case 'i': + if ( validPixmaps(minimizePix) && !button[BtnMinimize] ) + { + button[BtnMinimize] = new IceWMButton(this, "minimize", &minimizePix); + hb->addWidget( button[BtnMinimize] ); + connect( button[BtnMinimize], SIGNAL(clicked()), this, SLOT(iconify())); + } + break; + + // Not yet implemented - how's hide useful anyway? + // case 'h': + // if ( button[BtnHide] && !button[BtnHide] ) + // hb->addWidget( button[BtnHide] ); + // break; + +/* Re-enable this when kwin has void shadeChange(bool s) in clients.cpp + case 'r': + // NOTE: kwin doesn't have toggleShade() in clients.h ! + if ( validPixmaps(rollupPix) && !button[BtnRollup] ) + { + button[BtnRollup] = new IceWMButton(this, "shade", isShade() ? &rolldownPix : &rollupPix); + connect( button[BtnRollup], SIGNAL(clicked()), this, SLOT(toggleShade()) ); + hb->addWidget( button[BtnRollup] ); + } + break; */ + + case 'd': + // Depth == sticky + if ( validPixmaps(depthPix) && !button[BtnDepth] ) + { + button[BtnDepth] = new IceWMButton(this, "sticky", &depthPix, true ); + button[BtnDepth]->turnOn( isSticky() ); + hb->addWidget( button[BtnDepth] ); + connect( button[BtnDepth], SIGNAL(clicked()), this, SLOT(toggleSticky())); + } + break; + } + } +} + + +// Adds a pixmap to the titlebar layout via the use of a nice QSpacerItem +QSpacerItem* IceWMClient::addPixmapSpacer( QPixmap* p[], QSizePolicy::SizeType s, int hsize ) +{ + QSpacerItem* sp; + + // Add a null spacer for zero image + if ( validPixmaps(p) ) + { + int w = (hsize == -1) ? p[Active]->width(): hsize; + sp = new QSpacerItem( w, p[Active]->height(), s, QSizePolicy::Fixed ); + } + else + sp = new QSpacerItem(0, 0, QSizePolicy::Maximum, QSizePolicy::Fixed ); + + hb->addItem( sp ); + return sp; +} + + +void IceWMClient::renderMenuIcons() +{ + if (validPixmaps(menuButtonPix) && (!miniIcon().isNull())) + for(int i = 0; i < 2; i++) + { + if ( menuButtonWithIconPix[i] ) + delete menuButtonWithIconPix[i]; + + // Try to be more friendly to dodgy themes - icewm assumes a square menu button + // but some pixmap themes don't provide a square menu button. + menuButtonWithIconPix[i] = new QPixmap( titleBarHeight, 2*titleBarHeight ); + + QPainter pnt( menuButtonWithIconPix[i] ); + pnt.drawPixmap(0, 0, *menuButtonPix[i]); + + int offset = (titleBarHeight - miniIcon().width())/2; + // Paint the mini icon over the menu pixmap in the centre + pnt.drawPixmap( offset, offset, miniIcon() ); + pnt.drawPixmap( offset, titleBarHeight+offset, miniIcon() ); + pnt.end(); + } +} + + +void IceWMClient::slotMaximize() +{ + if ( button[BtnMaximize]->last_button == MidButton ) + maximize( MaximizeVertical ); + else if ( button[BtnMaximize]->last_button == RightButton ) + maximize( MaximizeHorizontal ); + else + maximize(); +} + + +int IceWMClient::titleTextWidth( const QString& s ) +{ + // Obtains the actual width of the text, using the titlebar font + QSize size; + QFontMetrics fm( options->font(true) ); + size = fm.size( 0, s ); + return size.width(); +} + + +// Repaint nicely upon resize to minimise flicker. +void IceWMClient::resizeEvent( QResizeEvent* e ) +{ + Client::resizeEvent( e ); + + if (isVisibleToTLW()) + { + update(rect()); + int dx = 0; + int dy = 0; + + if ( e->oldSize().width() != width() ) + dx = 32 + QABS( e->oldSize().width() - width() ); + + if ( e->oldSize().height() != height() ) + dy = 8 + QABS( e->oldSize().height() - height() ); + + if ( dy ) + update( 0, height() - dy + 1, width(), dy ); + + if ( dx ) + { + update( width() - dx + 1, 0, dx, height() ); + update( QRect( QPoint(4,4), titlebar->geometry().bottomLeft() - QPoint(1,0) ) ); + update( QRect( titlebar->geometry().topRight(), QPoint( width() - 4, titlebar->geometry().bottom() ) ) ); + QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), FALSE ) ); + } + } +} + + +// IceWM Paint magic goes here. +void IceWMClient::paintEvent( QPaintEvent* ) +{ + QPixmap* tmpPix; + QColor c1; + + QPainter p(this); + int act = isActive() ? Active: InActive; + + // Obtain widget bounds. + QRect r; + r = rect(); + int fillWidth = r.width() - 2*borderSizeX; + int y = r.y(); + int x = r.x(); + int w = r.width(); + int h = r.height(); + + // Do we have pixmaps for the frame? + if (validframe) + { + // Top corner + p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, cornerSizeX, borderSizeY); + p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, borderSizeX, cornerSizeY); + + // Top right corner + p.drawPixmap(w-cornerSizeX, 0, *frameTR[ act ], frameTR[act]->width()-cornerSizeX, 0, cornerSizeX, borderSizeY); + p.drawPixmap(w-borderSizeX, 0, *frameTR[ act ], frameTR[act]->width()-borderSizeX, 0, borderSizeX, cornerSizeY); + + // Top bar + p.drawTiledPixmap( cornerSizeX, 0, w-(2*cornerSizeX), borderSizeY, *frameT[ act ] ); + + // Left bar + p.drawTiledPixmap( 0, cornerSizeY, borderSizeX, h-(2*cornerSizeY), *frameL[ act ] ); + + // Right bar + p.drawTiledPixmap( w-borderSizeX, cornerSizeY, borderSizeX, h-(2*cornerSizeY), *frameR[ act ], + frameR[act]->width()-borderSizeX ); + + // Bottom left corner + p.drawPixmap(0, h-borderSizeY, *frameBL[ act ], 0, frameBL[act]->height()-borderSizeY, cornerSizeX, borderSizeY); + p.drawPixmap(0, h-cornerSizeY, *frameBL[ act ], 0, frameBL[act]->height()-cornerSizeY, borderSizeX, cornerSizeY); + + // Bottom right corner + p.drawPixmap(w-cornerSizeX, h-borderSizeY, *frameBR[ act ], frameBR[act]->width()-cornerSizeX, frameBR[act]->height()-borderSizeY, cornerSizeX, borderSizeY); + p.drawPixmap(w-borderSizeX, h-cornerSizeY, *frameBR[ act ], frameBR[act]->width()-borderSizeX, frameBR[act]->height()-cornerSizeY, borderSizeX, cornerSizeY); + + // Bottom bar + p.drawTiledPixmap(cornerSizeX, h-borderSizeY, w-(2*cornerSizeX), borderSizeY, *frameB[ act ], + 0, frameB[ act ]->height()-borderSizeY ); + + } else + { + // Draw a stock IceWM frame instead of a pixmap frame + c1 = isActive() ? colorActiveBorder : colorInActiveBorder; + p.setPen( c1.light(135) ); + p.drawLine(0, 0, w-2, 0); + p.drawLine(0, 0, 0, h-2); + + p.setPen(c1); + p.drawLine(1, 1, w-3, 1); + p.drawLine(1, 1, 1, h-3); + + p.setPen( c1.dark(140) ); + p.drawLine(1, h-2, w-2, h-2); + p.drawLine(w-2, 1, w-2, h-2); + + p.setPen( Qt::black ); + p.drawLine(w-1, 0, w-1, h-1); + p.drawLine(0, h-1, w-1, h-1); + + // Fill frame border if required + if (borderSizeX > 2) + { + // Fill Vertical sizes + p.fillRect( x+2, y+2, borderSizeX-2, h-4, c1); + p.fillRect( w-borderSizeX, y+2, borderSizeX-2, h-4, c1); + } + if (borderSizeY > 2) + { + // Fill horizontal frame parts + p.fillRect( x+borderSizeX, y+2, fillWidth, borderSizeY-2, c1); + p.fillRect( x+borderSizeX, h-borderSizeY, fillWidth, borderSizeY-2, c1); + } + } + + // Draw the title elements, which are visible + r = titleSpacerJ->geometry(); + if (!r.isEmpty() && validPixmaps( titleJ )) + p.drawPixmap( r.x(), r.y(), *titleJ[ act ]); + + r = titleSpacerL->geometry(); + if (!r.isEmpty() && validPixmaps( titleL )) + p.drawPixmap( r.x(), r.y(), *titleL[ act ]); + + r = titleSpacerS->geometry(); + if (!r.isEmpty() && validPixmaps( titleS )) + p.drawTiledPixmap( r, *titleS[ act ]); + + r = titleSpacerP->geometry(); + if (!r.isEmpty() && validPixmaps( titleP )) + p.drawPixmap( r.x(), r.y(), *titleP[ act ]); + + r = titlebar->geometry(); + if (!r.isEmpty()) + { + // Try to "debug" themes which have the title[A,I]T.xpm images missing + // e.g. xp theme + if (validPixmaps( titleT )) + tmpPix = titleT[ act ]; + else if (validPixmaps( titleS )) + tmpPix = titleS[ act ]; + else if (validPixmaps( titleB )) + tmpPix = titleB[ act ]; + else + tmpPix = 0L; + + p.setFont( options->font(true) ); + + // Select appropriate title text color + if (themeTitleTextColors) + p.setPen( isActive() ? colorActiveTitleBarText : colorInActiveTitleBarText ); + else + p.setPen( options->color(Options::Font, isActive() )); + + // Draw the titlebar pixmap + if (tmpPix) + { + // Pre-compute as much as possible so text flickers less + // via caching function call results + int rx, ry, rw, rh, talign; + QString tts; + + rx = r.x(); + ry = r.y(); + rw = r.width(); + rh = r.height(); + tts = caption(); + talign = titleBarCentered ? AlignCenter|AlignVCenter : AlignLeft|AlignVCenter; + + p.drawTiledPixmap( r, *tmpPix); + // Draw the text immediately after the pixmap, to reduce flicker + p.drawText(rx, ry, rw, rh, talign, tts); + } + else + { + // Draw a standard icewm title using stock fill colour as a last resort + // for the _whole_ titlebar (something's obviously wrong with the theme) + QRect r2 = geometry(); + QRect r3( borderSizeX, borderSizeY, r2.width()-(2*borderSizeX), titleBarHeight); + p.fillRect( r3, act ? colorActiveTitleBar : colorInActiveTitleBar ); + + // Draw the text immediately after the rect to reduce flicker + p.drawText(r3.x()+2, r3.y(), r.width(), r.height(), AlignLeft | AlignVCenter, caption()); + } + } + + r = titleSpacerM->geometry(); + if (!r.isEmpty() && validPixmaps( titleM )) + p.drawPixmap( r.x(), r.y(), *titleM[ act ], 0, 0, r.width(), r.height()); + + r = titleSpacerB->geometry(); + if (!r.isEmpty() && validPixmaps( titleB )) + p.drawTiledPixmap( r, *titleB[ act ]); + + r = titleSpacerR->geometry(); + if (!r.isEmpty() && validPixmaps( titleR )) + p.drawPixmap( r.x(), r.y(), *titleR[ act ]); + + r = titleSpacerQ->geometry(); + if (!r.isEmpty() && validPixmaps( titleQ )) + p.drawPixmap( r.x(), r.y(), *titleQ[ act ]); +} + + +void IceWMClient::showEvent(QShowEvent *ev) +{ + titlebar->changeSize( titleTextWidth(caption()), titleBarHeight, + QSizePolicy::Preferred, QSizePolicy::Fixed ); + grid->activate(); + show(); + Client::showEvent(ev); +} + + +void IceWMClient::mouseDoubleClickEvent( QMouseEvent * e ) +{ + QRect r( borderSizeX, borderSizeY, geometry().width()-(2*borderSizeX), titleBarHeight); + + if ( r.contains( e->pos() ) ) + workspace()->performWindowOperation( this, options->operationTitlebarDblClick() ); + + workspace()->requestFocus( this ); +} + + +// Called via Client class when the miniIcon() changes +void IceWMClient::iconChange() +{ + if (validPixmaps(menuButtonPix) && showMenuButtonIcon) + { + renderMenuIcons(); + button[BtnSysMenu]->usePixmap( &menuButtonWithIconPix ); + + if (button[BtnSysMenu]->isVisible()) + button[BtnSysMenu]->repaint(false); + } +} + + +// Please don't modify the following unless you want layout problems +void IceWMClient::captionChange( const QString& s ) +{ + QRect r( borderSizeX, borderSizeY, geometry().width()-(2*borderSizeX), + titleBarHeight); + + titlebar->changeSize( titleTextWidth(s), titleBarHeight, + QSizePolicy::Preferred, QSizePolicy::Fixed ); + titlebar->invalidate(); + grid->activate(); + repaint( r, false ); +} + + +void IceWMClient::maximizeChange(bool m) +{ + // Change the button pixmap to restore if required + if (button[BtnMaximize] && validPixmaps(restorePix)) + button[BtnMaximize]->usePixmap( m ? &restorePix : &maximizePix ); +} + + +/* Re-enable this when kwin has void shadeChange(bool s) in clients.cpp +void IceWMClient::shadeChange(bool s) +{ + // Change the button pixmap to rolldown if required + if (button[BtnRollup] && validPixmaps(rolldownPix)) + button[BtnRollup]->usePixmap( s ? rolldownPix : rollupPix ); +} +*/ + + +void IceWMClient::activeChange(bool) +{ + // Reset the button pixmaps. + for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++) + if(button[i]) + button[i]->repaint( false ); + + repaint(false); +} + + +// Mouse position code modified from that in workspace.cpp +Client::MousePosition IceWMClient::mousePosition( const QPoint& p ) const +{ + int rangeX = cornerSizeX; + int rangeY = cornerSizeY; + int borderX = borderSizeX; + int borderY = borderSizeY; + + MousePosition m = Nowhere; + + if ((p.x() > borderX && p.x() < width() - borderX) && + ( p.y() > borderY && p.y() < height() - borderY)) + return Center; + + if ( p.y() <= rangeY && p.x() <= rangeX) + m = TopLeft; + else if ( p.y() >= height()-rangeY && p.x() >= width()-rangeX) + m = BottomRight; + else if ( p.y() >= height()-rangeX && p.x() <= rangeX) + m = BottomLeft; + else if ( p.y() <= rangeY && p.x() >= width()-rangeX) + m = TopRight; + else if ( p.y() <= borderY ) + m = Top; + else if ( p.y() >= height()-borderY ) + m = Bottom; + else if ( p.x() <= borderX ) + m = Left; + else if ( p.x() >= width()-borderX ) + m = Right; + else + m = Center; + return m; +} + + +// Make sure the menu button follows double click conventions set in kcontrol +void IceWMClient::menuButtonPressed() +{ + static QTime* t = 0; + static IceWMClient* tc = 0; + if ( !t ) + t = new QTime; + + if ( tc != this || t->elapsed() > QApplication::doubleClickInterval() ) + { + QPoint menuPoint ( button[BtnSysMenu]->rect().bottomLeft() ); + + // Move to right if menu on rhs, otherwise on left + // and make this depend on windowWrapper(), not button. + workspace()->clientPopup(this)->popup( button[BtnSysMenu]->mapToGlobal( menuPoint )); + + // Animate the menu button when pressed + if (button[BtnSysMenu]) + button[BtnSysMenu]->animateClick(); + } + else + closeWindow(); + + t->start(); + tc = this; +} + +#include "icewm.moc" diff --git a/clients/icewm/icewm.desktop b/clients/icewm/icewm.desktop new file mode 100644 index 0000000000..936c0f8761 --- /dev/null +++ b/clients/icewm/icewm.desktop @@ -0,0 +1,3 @@ +[Desktop Entry] +Name=IceWM +X-KDE-Library=libkwinicewm diff --git a/clients/icewm/icewm.h b/clients/icewm/icewm.h new file mode 100644 index 0000000000..218b3dfe03 --- /dev/null +++ b/clients/icewm/icewm.h @@ -0,0 +1,143 @@ +/* + Gallium-IceWM themeable KWin client + + Copyright 2001 + Karol Szwed (gallium) + http://gallium.n3.net/ + + This client loads most icewm 1.0.X pixmap themes, without taking into account + specific font settings for clients, or coloured mouse cursors. Titlebar + fonts can be changed via the kde control center. Bi-colour mouse cursors + may be added in future if requested by users, as well as theme font support. + Any styles using inbuilt icewm titlebar drawing without using pixmaps (e.g. + Warp4, win95 etc.) are not fully supported, and may cause drawing errors, + as these themes use in-built icewm drawing mechanisms. + + When a pixmap theme is not present (or a corrupt one is present) then very + plain title decorations are painted instead, so that users don't see + non-painted window areas where possible ;) + + At a later date, frame shaping may be added if really requested, and an + update to support the latest icewm 1.1.X theme format may be made. +*/ + +#ifndef __KDEGALLIUM_ICEWM_H +#define __KDEGALLIUM_ICEWM_H + +#include +#include +#include +#include "../../client.h" +class QLabel; +class QSpacerItem; +class QHBoxLayout; +class QGridLayout; + +namespace KWinInternal { + +// Pixmap group +enum { InActive=0, Active }; +// Pixmap stretching mode +enum { Vertical=0, Horizontal=1 }; + + +// Handles the resetClients() signal from the Options class, +// and manages the dynamic pixmaps, configuration and theme changing +class ThemeHandler: public QObject +{ + Q_OBJECT + public: + ThemeHandler(); + ~ThemeHandler(); + + public slots: + void slotReset(); + + private: + void readConfig(); + QColor decodeColor( QString& s ); + bool isFrameValid(); + void initTheme(); + void freePixmaps(); + void freePixmapGroup( QPixmap* p[] ); + void setPixmap( QPixmap* p[], QString s1, QString s2, bool stretch=false, bool stretchHoriz=true ); + QPixmap* stretchPixmap( QPixmap* src, bool stretchHoriz=true, int stretchSize=-1); + void convertButtons( QString& s ); + QString reverseString( QString s ); +}; + + +class IceWMButton : public QButton +{ + public: + IceWMButton( Client *parent=0, const char *name=0, + QPixmap* (*p)[2]=0L, bool isToggle=false ); + void usePixmap( QPixmap* (*p)[2] ); + QSize sizeHint() const; + void turnOn( bool isOn ); + + int last_button; + + protected: + void mousePressEvent( QMouseEvent* e ); + void mouseReleaseEvent( QMouseEvent* e ); + + void drawButton( QPainter *p ); + void drawButtonLabel( QPainter * ) {;} + + private: + QPixmap* (*pix)[2]; // Points to active/inactive pixmap array + Client* client; +}; + + +class IceWMClient : public KWinInternal::Client +{ + Q_OBJECT + public: + // These are all the icewm button types :) + enum Buttons{ BtnSysMenu=0, BtnClose, BtnMaximize, BtnMinimize, BtnHide, BtnRollup, BtnDepth, BtnCount }; + IceWMClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 ); + ~IceWMClient(); + + protected: + void resizeEvent( QResizeEvent* ); + void paintEvent( QPaintEvent* ); + void showEvent( QShowEvent* ); + void mouseDoubleClickEvent( QMouseEvent * ); + void captionChange( const QString& name ); + void maximizeChange(bool m); + void activeChange(bool); + // void shadeChange(bool); /* KWin Client class doesn't provide this yet */ + MousePosition mousePosition( const QPoint& ) const; + void renderMenuIcons(); + void iconChange(); + + protected slots: + void slotMaximize(); + void menuButtonPressed(); + int titleTextWidth( const QString& s ); + void addClientButtons( const QString& s ); + + private: + QSpacerItem* addPixmapSpacer( QPixmap* p[], QSizePolicy::SizeType = QSizePolicy::Maximum, + int hsize = -1 ); + + IceWMButton* button[ IceWMClient::BtnCount ]; + QPixmap* menuButtonWithIconPix[2]; + QSpacerItem* titleSpacerJ; + QSpacerItem* titleSpacerL; + QSpacerItem* titleSpacerS; + QSpacerItem* titleSpacerP; + QSpacerItem* titlebar; + QSpacerItem* titleSpacerM; + QSpacerItem* titleSpacerB; + QSpacerItem* titleSpacerR; + QSpacerItem* titleSpacerQ; + QHBoxLayout* hb; + QGridLayout* grid; +}; + +}; + +#endif