see changelogs

This commit is contained in:
K D Hedger
2024-04-21 16:24:21 +01:00
parent d63571a212
commit c913beea0a
15 changed files with 125 additions and 30 deletions

View File

@ -1,4 +1,5 @@
0.2.0
Better display of transparent BG image.
Added optional background image to dock.
Fixed finding desktop files.
Minor fix for launchers.

View File

@ -1 +1 @@
COMMONSRC = ../src/globals.cpp ../src/calendar.cpp ../src/callbacks.cpp ../src/clock.cpp ../src/desktopSwitcher.cpp ../src/launchers.cpp ../src/taskBar.cpp ../src/slider.cpp ../src/main.cpp
COMMONSRC = ../src/calendar.cpp ../src/callbacks.cpp ../src/clock.cpp ../src/desktopSwitcher.cpp ../src/globals.cpp ../src/launchers.cpp ../src/main.cpp ../src/slider.cpp ../src/taskBar.cpp

View File

@ -139,12 +139,12 @@ void setGadgetDetails(LFSTK_gadgetClass *gadget)
gadget->LFSTK_setAlpha(1.0);
gadget->LFSTK_setStyle(BEVELNONE);
if(useBG==true)
{
gadget->LFSTK_setTile(dockBGImage.c_str(),-1);
gadget->gadgetDetails.geomRelativeToMainWindow=true;
}
else
// if(useBG==true)
// {
// gadget->LFSTK_setTile(dockBGImage.c_str(),-1);
// gadget->gadgetDetails.geomRelativeToMainWindow=true;
// }
// else
{
gadget->LFSTK_setTile(NULL,0);
gadget->LFSTK_setGadgetColours(GADGETBG,"#00000000","#00000000","#00000000","#00000000");

View File

@ -330,14 +330,17 @@ int main(int argc,char **argv)
if(useBG==true)
{
dockWindow->LFSTK_setTile(dockBGImage.c_str(),-1);
//dockWindow->LFSTK_setTile(dockBGImage.c_str(),-1);
dockBGWindow->LFSTK_showWindow(true);
//dockBGWindow->LFSTK_setKeepAbove(true);
//dockWindow->LFSTK_setKeepAbove(true);
}
else
dockWindow->LFSTK_setTile(NULL,0);
//else
// dockWindow->LFSTK_setTile(NULL,0);
dockWindow->LFSTK_showWindow(true);
dockWindow->LFSTK_setKeepAbove(true);
//dockWindow->LFSTK_showWindow(true);
//dockWindow->LFSTK_setKeepAbove(true);
//dockBGWindow->LFSTK_setKeepAbove(true);
if(useTaskBar==true)
updateTaskBar(true);

View File

@ -1,4 +1,7 @@
0.6.1
Vairous build files tweaks.
Added mouse enter/exit call backs to image class.
Fixed cairo surface sizes.
Gadget and window tile fixes.
Fixes to find class.
Minor tweaks to LFSTKFindClass.

View File

@ -1,3 +1,4 @@
#ACLOCAL_AMFLAGS = "-I m4"
AUTOMAKE_OPTIONS = subdir-objects
include ../flagsandlibs

View File

@ -1572,6 +1572,10 @@ void LFSTK_gadgetClass::LFSTK_setTile(const char *path,int size)
{
if((this->gadgetDetails.gadgetGeom.w!=0) && (this->gadgetDetails.gadgetGeom.h!=0))
cairo_xlib_surface_set_size(this->sfc,cairo_image_surface_get_width(tempimage)+1,cairo_image_surface_get_height(tempimage)+1);
if((cairo_xlib_surface_get_width(this->sfc)==0) || (cairo_xlib_surface_get_height(this->sfc)==0))
cairo_xlib_surface_set_size(this->sfc,this->gadgetDetails.gadgetGeom.w,this->gadgetDetails.gadgetGeom.h);
this->pattern=cairo_pattern_create_for_surface(tempimage);
cairo_surface_destroy(tempimage);
cairo_pattern_set_extend(pattern,CAIRO_EXTEND_REPEAT);

View File

@ -31,6 +31,46 @@ LFSTK_imageClass::LFSTK_imageClass()
{
}
/**
* Mouse exit callback.
* \param e XButtonEvent passed from mainloop->listener.
* \return Return true if event fully handeled or false to pass it on.
*/
bool LFSTK_imageClass::mouseExit(XButtonEvent *e)
{
bool retval=true;
this->keyEvent=NULL;
//no callbacks
if((this->callBacks.runTheCallback==false) || (this->isActive==false) )
return(true);
if((this->callBacks.validCallbacks & MOUSEEXITCB) && (this->noRunCB==false))
retval=this->callBacks.mouseExitCallback(this,this->callBacks.mouseMoveUserData);
return(retval);
}
/**
* Mouse enter callback.
* \param e XButtonEvent passed from mainloop->listener.
* \return Return true if event fully handeled or false to pass it on.
*/
bool LFSTK_imageClass::mouseEnter(XButtonEvent *e)
{
bool retval=true;
this->keyEvent=NULL;
//no callbacks
if((this->callBacks.runTheCallback==false) || (this->isActive==false) )
return(true);
if((this->callBacks.validCallbacks & MOUSEENTERCB) && (this->noRunCB==false))
retval=this->callBacks.mouseEnterCallback(this,this->callBacks.mouseMoveUserData);
return(retval);
}
/**
* Mouse up callback.
* \param e XButtonEvent passed from mainloop->listener.
@ -123,7 +163,8 @@ LFSTK_imageClass::LFSTK_imageClass(LFSTK_windowClass* parentwc,const char* image
this->gc=XCreateGC(this->wc->app->display,this->window,0,NULL);
this->wc->globalLib->LFSTK_setCairoSurface(this->wc->app->display,this->window,this->wc->app->visual,&this->sfc,&this->cr,w,h);
this->LFSTK_setCairoFontData();
XSelectInput(this->wc->app->display,this->window,ButtonPressMask|ButtonReleaseMask|ExposureMask|ButtonMotionMask);
XSelectInput(this->wc->app->display,this->window,ButtonPressMask|ButtonReleaseMask|ExposureMask|ButtonMotionMask| EnterWindowMask | LeaveWindowMask);
// long gadgetEventMask=(ButtonReleaseMask | ButtonPressMask | ExposureMask | EnterWindowMask | LeaveWindowMask|ButtonMotionMask|FocusChangeMask|KeyReleaseMask|KeyPressMask);
this->ml->function=&LFSTK_lib::LFSTK_gadgetEvent;
this->ml->gadget=this;

View File

@ -36,7 +36,8 @@ class LFSTK_imageClass : public LFSTK_gadgetClass
LFSTK_imageClass(LFSTK_windowClass* parentwc,const char* imagepath,int x,int y,unsigned w,unsigned h,int gravity,bool scale);
bool mouseUp(XButtonEvent *e);
bool mouseEnter(XButtonEvent *e);
bool mouseExit(XButtonEvent *e);
void LFSTK_clearWindow(void);
cairo_surface_t *shapesfc=NULL;

View File

@ -5,7 +5,6 @@ EXTRA_DIST = lfstk.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lfstk.pc
DISTCLEANFILES = lfstk.pc
#ACLOCAL_AMFLAGS = "-I m4"
.PHONY: docs
@ -22,9 +21,8 @@ docs-install:
docs-uninstall:
rm -rv $(DESTDIR)$(docdir)
remake:
$(shell ./remakesourcelist)
purge:
rm $(DESTDIR)${libdir}/liblfstoolkit.*||true
rm -r $(DESTDIR)${includedir}/lfstk||true
#ACLOCAL_AMFLAGS = "-I m4"

View File

@ -1,4 +1,5 @@
m4_define([LFSTOOLKIT_MAJ_N],[0])
m4_define([LFSTOOLKIT_MIN_N],[6])
m4_define([LFSTOOLKIT_REV_N],[1])
@ -11,10 +12,11 @@ AC_INIT([LFSToolKit],[LFSTOOLKIT_MAJ_N.LFSTOOLKIT_MIN_N.LFSTOOLKIT_REV_N],[PROJ]
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
#AC_CONFIG_MACRO_DIRS()
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE
AC_PROG_CC
#AC_PROG_CC
LT_INIT([disable-static])

View File

@ -26,7 +26,7 @@ exit $retval
#include "lfstk/LFSTKGlobals.h"
#define BOXLABEL "Examples"
#define MAKEFLAGS "-j10"
#define MAKEFLAGS "-j10 --output-sync"
LFSTK_applicationClass *apc=NULL;
LFSTK_windowClass *wc=NULL;

View File

@ -82,6 +82,7 @@ bool contextCB(void *p,void* ud)
bool mouseUpCB(void *p,void* ud)
{
geometryStruct geom;
fprintf(stderr,"mouseUpCB\n");
if(p!=NULL)
{
static_cast<LFSTK_imageClass*>(p)->LFSTK_getGeom(&geom);
@ -94,6 +95,47 @@ bool mouseUpCB(void *p,void* ud)
return(true);
}
bool mouseDownCB(void *p,void* ud)
{
geometryStruct geom;
fprintf(stderr,"mouseDownCB\n");
// if(p!=NULL)
// {
// static_cast<LFSTK_imageClass*>(p)->LFSTK_getGeom(&geom);
////DEBUGFUNC("%b",static_cast<LFSTK_imageClass*>(p)->isDoubleClick);
// if(static_cast<LFSTK_imageClass*>(p)->isDoubleClick==true)
// fprintf(stderr,"double click x=%i y=%i\n",geom.x,geom.y);
// // else
// // fprintf(stderr,"x=%i y=%i\n",geom.x,geom.y);
// }
return(true);
}
bool moveCB(LFSTK_gadgetClass*p,void* ud)
{
if(ud!=NULL)
{
XEvent event;
geometryStruct geom;
printf(">>>Mouse In %s<<<\n",(const char*)ud);
//p->LFSTK_getGeomWindowRelative(&geom,apc->rootWindow);
//popWindow->LFSTK_moveWindow(geom.x,geom.y-GADGETHITE,true);
//popWindow->LFSTK_showWindow();
//popWindow->LFSTK_clearWindow(true);
}
return(true);
}
bool exitCB(LFSTK_gadgetClass*p,void* ud)
{
if(ud!=NULL)
{
printf(">>>Mouse Out %s<<<\n",(const char*)ud);
//popWindow->LFSTK_hideWindow();
}
return(true);
}
int main(int argc, char **argv)
{
int sy=BORDER;
@ -118,7 +160,8 @@ int main(int argc, char **argv)
// tux->LFSTK_setLimits(10,-1,440,-1);
// tux->LFSTK_setLimits(-1,10,-1,440);
tux->LFSTK_setLimits(10,10,440,120);
tux->LFSTK_setMouseCallBack(NULL,mouseUpCB,NULL);
tux->LFSTK_setMouseCallBack(mouseDownCB,mouseUpCB,NULL);
tux->LFSTK_setMouseMoveCallBack(moveCB,exitCB,USERDATA("Left Enter/Exit"));
sy+=YSPACING*3;
@ -168,7 +211,7 @@ int main(int argc, char **argv)
win->w=200;
win->h=200;
win->wc=wc;
win->windowType=apc->appAtomsHashed.at(LFSTK_UtilityClass::LFSTK_hashFromKey("_NET_WM_WINDOW_TYPE_TOOL"));
win->windowType=apc->appAtomsHashed.at(LFSTK_UtilityClass::LFSTK_hashFromKey("_NET_WM_WINDOW_TYPE_NORMAL"));
win->decorated=false;
win->overRide=true;

View File

@ -1,6 +1,4 @@
SUBDIRS = LFSWM2/app
remake:
$(shell ./remakesourcelist)

12
makeall
View File

@ -96,22 +96,22 @@ deploy ()
{
runCommand "make distclean"||true
runCommand "./autogen.sh --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX}"
runCommand "make $MAKEFLAGS"||make -j1||exit 100
runCommand "make install"
runCommand "make $MAKEFLAGS --output-sync"||"make -j1 --output-sync"||exit 100
runCommand "make install --output-sync"
}
deploytest ()
{
runCommand "make distclean"||true
runCommand "./autogen.sh --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX}"
runCommand "make $MAKEFLAGS"||make -j1||exit 100
runCommand "make install DESTDIR=/tmp/lfsdesktop-deploy"
runCommand "make $MAKEFLAGS --output-sync"||"make -j1 --output-sync"||exit 100
runCommand "make install DESTDIR=/tmp/lfsdesktop-deploy --output-sync"
}
makeit ()
{
runCommand "./autogen.sh --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX}"
runCommand "make $MAKEFLAGS"||make -j1||exit 100
runCommand "make $MAKEFLAGS --output-sync"||"make -j1 --output-sync"||exit 100
}
makelocal ()
@ -126,7 +126,7 @@ makelocal ()
export CFLAGS CXXFLAGS
runCommand "./autogen.sh --prefix=/usr"
fi
runCommand "make $MAKEFLAGS"
runCommand "make $MAKEFLAGS --output-sync"
}
ownit ()