pb-win-notify

Developed or developing a new product in PureBasic? Tell the world about it.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: pb-win-notify

Post by Poshu »

You should rather thanks deseven :p
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

That's how github works, everyone can fork anything and improve it the way he likes :)
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

So.
I've incorporated everything Poshu suggested (thanks!) and also added some new features.
You can now change the width of the notification and create your own custom notification.

Image

More on that in the new example, example-custom.pb
fromVB
User
User
Posts: 82
Joined: Sun Jul 29, 2012 2:27 am

Re: pb-win-notify

Post by fromVB »

deseven wrote:My attempt to create a notification system.
Thanks deseven. Great code!

One question: what is CreateMutex used for in your code? :?
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

When you spawn a notification it actually happens in a different thread to speed things up. All animations and control also happen in another thread. But all those threads use one specific LinkedList called wnNotifications(), where notifications and their parameters are stored. To work with it simultaneously i use that mutex.
That approach is a bit complicated, but that's the best way i found.
Post Reply