Requires the libnotify and devel files...
It looks like:

which will (if no gadget or window is specified) pops up in the lower right corner
or like this if a gadget is specified (a WindowID will work too)

An example:
Code: Select all
#NOTIFY_URGENCY_LOW = 0;, /**< Low urgency. */
#NOTIFY_URGENCY_NORMAL = 1;, /**< Normal urgency. */
#NOTIFY_URGENCY_CRITICAL = 2;, /**< Critical urgency. */
Procedure mycallback()
; if the notification is clicked somwhere, this code will be executed...
EndProcedure
pgm.s=ProgramFilename()
notify_init_(@pgm); necessary to init the notification server for your program
hwnd=OpenWindow(0,200,100,500,350,"")
CreateGadgetList(WindowID(0))
ButtonGadget(1,10,10,100,30,"Test")
mn=notify_show("titel","body",50,#NOTIFY_URGENCY_NORMAL,GadgetID(1)); the notification is added to a gadget
; mn=notify_show("titel","body",50,2,0); use this line to see the difference
;if you need an action when the notification is clicked
action.s="default"
label.s="clicked"
notify_add_action(mn,@action,@label,@mycallback(),0,0)
;---------------------
CloseGadgetList()
Repeat
ev=WaitWindowEvent(1)
ForEver
End
http://home.arcor.de/x-linux/pure/notify/notify_lib (copy it to purebasic/purelibraries/userlibraries
and the source:
http://home.arcor.de/x-linux/pure/notify/notify_lib.pb
there is a further commant in the lib notify_close(*notify) which is not used in the example...
I guess, you can see how it works.. otherwise questions are welcome as well as suggestions and comments...