@@ -166,31 +166,20 @@ bool gadgetDrop(void *lwc,propertyStruct *data,void* ud)
166166
167167int main (int argc, char **argv)
168168{
169- int sy=BORDER;
169+ int sy=BORDER;
170+ windowInitStruct *win;
170171
171172 apc=new LFSTK_applicationClass ();
172- //
173- // apc->globalLib->LFSTK_setGlobalString(NORMALCOLOUR,TYPEBUTTON,"pink");
174- // apc->globalLib->LFSTK_setGlobalString(-1,TYPEBUTTONTILE,"/home/keithhedger/Patterns/button-prelight.png");
175- // apc->globalLib->LFSTK_setGlobalString(ACTIVECOLOUR,TYPEBUTTON,"green");
176- // apc->globalLib->LFSTK_setGlobalString(ACTIVECOLOUR,TYPEFONTCOLOUR,"blue");
177- // apc->globalLib->LFSTK_setGlobalString(NORMALCOLOUR,TYPEWINDOW,"red");
178- // apc->globalLib->LFSTK_setGlobalString(-1,TYPEWINDOWTILE,"/home/keithhedger/Patterns/halloweenwood.jpg");//TODO//jpeg not working
179-
180- // apc->globalLib->LFSTK_setUseTheme(true);
181- // apc->globalLib->LFSTK_setGlobalString(ACTIVECOLOUR,TYPEWINDOW,"cyan");
182- // apc->globalLib->LFSTK_setGlobalString(PRELIGHTCOLOUR,TYPEWINDOW,"blue");
183- // apc->globalLib->LFSTK_setGlobalString(INACTIVECOLOUR,TYPEWINDOW,"yellow");
184-
185- apc->LFSTK_addWindow (NULL ,BOXLABEL," LFSTKExample" );
186173
174+ win=apc->LFSTK_getDefaultWInit ();
175+ win->windowName =BOXLABEL;
176+ win->windowType =win->app ->appAtomsHashed .at (LFSTK_UtilityClass::LFSTK_hashFromKey (" _NET_WM_WINDOW_TYPE_DIALOG" ));
177+ win->level =ABOVEALL;
178+ apc->LFSTK_addWindow (win,BOXLABEL);
187179 wc=apc->mainWindow ;
188180
189- // wc->LFSTK_setTile("/home/keithhedger/Desktop/001_wood_coldgrayfence_th.jpg",-1);//TODO//this works ?//poss set usetheme
190-
191181 wc->LFSTK_initDnD (false );
192182
193- // wc->LFSTK_setWindowColourName(NORMALCOLOUR,"pink");
194183 label=new LFSTK_labelClass (wc,BOXLABEL,BORDER,sy,DIALOGWIDTH-BORDER-BORDER,GADGETHITE,NorthGravity);
195184 label->LFSTK_setCairoFontDataParts (" sB" ,20 );
196185 sy+=YSPACING;
@@ -267,8 +256,6 @@ int main(int argc, char **argv)
267256 // leftButton->LFSTK_setTile("/home/keithhedger/Desktop/001_wood_coldgrayfence_th.jpg",-1);
268257 leftButton->LFSTK_setTile (" ./t2.jpg" ,-1 );
269258 leftButton->gadgetDetails .geomRelativeToMainWindow =true ;
270- // leftButton->LFSTK_setAlpha(1.0);
271- // fprintf(stderr,"leftButton tile=%i\n",leftButton->useTile);
272259 sy+=YSPACING+(GADGETWIDTH*2 );
273260
274261// centre image
@@ -312,8 +299,6 @@ int main(int argc, char **argv)
312299 popWindow->LFSTK_resizeWindow (poplabel->LFSTK_getTextRealWidth (" This is a mouse enter callback" ),GADGETHITE);
313300 popWindow->LFSTK_setWindowColourName (NORMALCOLOUR," #c0808080" );
314301
315- // wc->LFSTK_setTile("/home/keithhedger/Backgrounds/bc3h.png",-1);
316-
317302 int retval=apc->LFSTK_runApp ();
318303
319304 delete apc;
0 commit comments