[request] AVEDESK 1.2 SDK

This request is personally to AVe. Tho I've PMed him lately, I'm still stuck. I know u'r busy now, friend, and this is just to remind. My desklets developement doesn't go since SDK 1.1 for Delphi is badly incomplete and I even don't know whether I can make a working desklet with it (I remember I tried but the HelloWorld desklet was 450 KB :) But that won't stop me). So I ask sir Andreas to release the long awaited SDK and to pay more attention to Delphians.

As my contribution here's the unit for Delphi which I am going to use as a base for desklets. I know its buggy, when I'll get a newer SDk, i'll update it

#270025

Okay, my new pc should come soon :) So I can pick this up after my exams are finished next week. Could you post DeskletSDK.pas for me, please? It's on a different machine >_

#270038

OK, I'll do it this night. I'm again at work now :)

P.S. Good luck with your exams, Andreas.

P.P.S. Here are files u'r asking for

#270194

Bump! Tiger is out and I'm still here sitting over the non-working nice hot desklet never ever seen here.

#273376

I promise I will spend friday all day on this and get it finished.

#273415

Thank you! And this friday is gonna be pretty hot for me - I am taking a part in some scenic action!!!

#273487

BUMP AGAIN!!! Andreas, you promised!

#276545

Yeah, I am working on it... but got so much other things to do as well :( I only have time to work on it on friday, so progress is pretty slow. What about I give you the avedesk sources so you can figure it out on your own? :P

#276572

I'd like only to know whether there are some new functions concerning the v.1.2 features (like ShowCase). I managed myself to get ObjectDock SDK, it makes many things clearer. Also, I've digged through RecycleBin Desklet sources in C++ and figured out many things. So my development goes on anyway. I don't think you should open the sources for me. Really.

Please, don't think that I abandone to your offer because I'm too lazy. I'm too busy rather. I'm a student of final grade and I must make a degree work to graduate. So i don't have much time also. Programming for Aqua-Soft is my nightly hobby to have some rest and satisfaction after a day of dull work.

And for now the only thing which I ask SDK for is to make the docs and tools more refined and to encourage other devs (and me also) to make more widgets

#276585

Aaahh.... The thread has drowned.

Andreas. I think that you don't realize, how much incomplete the Delphi SDK is. I cannot even make my onw property pages, cos there's no delphian equiuvalent to PROPSHEETPAGE structure.

There is only a TTabPage strcture and HPROPSHEETPAGE type which is alias to Cardinal (If I'm not very much mistaken). People start bothering me on SDK and Delphi tools for desklet developement, but I can't even make a working example for them.

I have now projects for three deskltes, that cannot be done through SysStats (that would be easier of course), and for not being unfounded I don't wish even to announce them here in forums. One of them happily stopped in debug mode (I had a lot of questions to you, but they all were solved by me myself with just thinking), now it just spawns a lot of bugs due to GDIPlus lib limitations and problems (I'm really working on it!). I made my custom properties dialog in that desklet (anyway Ticker sets most of its properties automatically without user's intervention). But the other two desklets hang out there awaiting for a good property pages, which I cannot make.

BTW: Another one desklet (fourth, this way) is announced somewhere here as K-let (aka A2K) - mini-Konfab-desklet which makes it possible to load the k-widgets into AveDesk. But it's too complex work which I wish to postpone for a summer (and I really liked the principles of Tiger Dashboard widgets, so I'd like to make them also loadable into it). This would seriously reduce the number of port requests (most of them stay unsatisfied, I think) and thus increase popularity of AveDesk itself (increasing the donation flow proportionally ;) ).

But still how can I do this all without good SDK ?!

You MUST do something!!

#289187

The Delphi SDK is coming soon :) pcm offered me to help me on it ^_^. The main problem is that I'm not really at home in Delphi, so I have a hard-time converting C to Delphi.

HPROPSHEETPAGE: that's a WINAPI thingy. I doubt delphi has support for it by using the standard TForm. So you have to default back to DIALOG resources plus using winapi functions.

more to come... gotta go quickly now :(...

#289195

I am working on trying to make the Delphi SDK work. I've already fixed a few things and add a couple of missing commands. I haven't come to the Property sheet, and I know that the Graphic part is broken. You can put graphice files but not create a graphic at runtime.

I'm sure I'll be able to fix most of the problems.

If you need property sheets now, I can try to jump to that problem next.

#289420

The Delphi SDK is coming soon :) pcm offered me to help me on it ^_^. The main problem is that I'm not really at home in Delphi, so I have a hard-time converting C to Delphi.

HPROPSHEETPAGE: that's a WINAPI thingy. I doubt delphi has support for it by using the standard TForm. So you have to default back to DIALOG resources plus using winapi functions.

more to come... gotta go quickly now :(...

If you have a small C++ sample that is used with AVE.. I can probably try to get something working.

#289502

Example DLGPROC:

//	This is a DLGPROC for the Label propertysheetpage.

int __stdcall IconConfigProc(HWND hDlg,UINT msg, WPARAM wParam, LPARAM lParam)

{

switch(msg)

{

case WM_INITDIALOG:

{

// store the FileDesklet-pointer of this desklet-instance in a WindowProperty, so

// we can use it in other calls



PROPSHEETPAGE* psp;

psp = (PROPSHEETPAGE*)lParam;

if(!psp)return FALSE;

SetProp(hDlg,_T("lpData"),(HANDLE)psp->lParam);

CPidlShortcutDesklet* lpData = (CPidlShortcutDesklet*)GetProp(hDlg,"lpData");

LoadIconDlgSettings(hDlg,lpData);

}

break;



case WM_USER_PATHCHANGED:

LoadIconDlgSettings(hDlg,(CPidlShortcutDesklet*)GetProp(hDlg,"lpData"));

break;







case WM_COMMAND:

switch(LOWORD(wParam))

{

case IDC_USESHELLIMAGES: case IDC_USECUSTOMIMAGES:

if(HIWORD(wParam)==BN_CLICKED)

{

PropSheet_Changed(GetParent(hDlg),hDlg);



std::map<HWND,std::wstring>* hwndMap = (std::map<HWND,std::wstring>* ) GetProp(hDlg,_T("ChildMap"));



if(hwndMap)

{

for(std::map<HWND,std::wstring>::iterator iter = hwndMap->begin(); iter != hwndMap->end(); ++iter)

{

HWND child = iter->first;



EnableWindow(child,IsDlgButtonChecked(hDlg,IDC_USECUSTOMIMAGES) );

}



}

}

break;





}

break;







case WM_NOTIFY:

NMHDR* nmhdr;

nmhdr = (NMHDR*) lParam;

if(!nmhdr)break;

switch(nmhdr->code)

{

// Apply is pressed, so commit the changes.

case PSN_APPLY:

{

CPidlShortcutDesklet* lpData = (CPidlShortcutDesklet*)GetProp(hDlg,_T("lpData"));

if(lpData)

{

lpData->SetUseCustomImages( IsDlgButtonChecked(hDlg,IDC_USECUSTOMIMAGES) == BST_CHECKED);



std::map<HWND,std::wstring>* hwndMap = (std::map<HWND,std::wstring>* ) GetProp(hDlg,_T("ChildMap"));



if(hwndMap)

{

for(std::map<HWND,std::wstring>::iterator iter = hwndMap->begin(); iter != hwndMap->end(); ++iter)

{

HWND child = iter->first;

std::wstring& keyName = iter->second;



WCHAR fname[MAX_PATH+2] = {0};

SendMessage(child,WM_GETIMAGE_FILENAME,MAX_PATH+2,(LPARAM)fname);

lpData->GetCustomImages()[keyName] = fname;



EnableWindow(child,lpData->GetUseCustomImages() ? TRUE : FALSE);

}



lpData->UpdateIcon();

}

}

}

break;

}

break;



case WM_DESTROY:

{

// remove the property from the window

CPidlShortcutDesklet* lpData = (CPidlShortcutDesklet*) RemoveProp(hDlg,"lpData");

if(lpData)

lpData->SetHwndIconSheet(NULL);

//RemoveProp(hDlg,_T("ChildIconHwnd"));

std::map<HWND,std::wstring>* hwndMap = (std::map<HWND,std::wstring>* ) RemoveProp(hDlg,_T("ChildMap"));

delete hwndMap;

}

break;

}

return FALSE;

}

Creating a propertysheet:

	psp.dwFlags = PSP_USETITLE; // flags

psp.hInstance = hInstance; // module where the dialog template is located in

psp.pszTitle = _T("Icon"); // title

psp.pszTemplate = MAKEINTRESOURCE(IDD_ICON); // the DIALOG resource ID

psp.pfnDlgProc = IconConfigProc; // the DlgProc function pointer

psp.lParam = reinterpret_cast<LPARAM>(this); // the param to pass to the dialog



HPROPSHEETPAGE = CreatePropertySheetPage(&psp); // make a propertysheet

#289512

Glad to see some life around my problem. Thank you, AVe & pcm!

#289785

Rimmer,

I got a property page to work in AveDesk. I got some code to display a TForm in the property page. I'm cleaning it all up and fixing up the events more so that it looks better. I'll post the stuff this week.. Hoping for Wednesday. But I promiss this week.

Also, I've removed the need for the extra DLL for GDIBmp converting. Its not needed for the setimage commands. So you don't need to package with the extra dll.

I'm still going accross each command and testing it in Delphi and doing small code examples for documentation.

But everything is going well.

#289818

Cool! Thanks a lot. Can't wait for a release!

#290005

Hi Rimmer.

As promissed, attached is the current SDK. It is not complete yet. I haven't completed testing all the commands. After doing lots of tests, I came across a few problems with the Delphi GDI+ objects and the property sheet.

You still need an external dll if your going to be using the following two commands. (DeskletLayerSetImage, DeskletSetImage). After lots of different methods an communcation with Andreas, this is work now with no problems. And with minimal speed loss in the conversion.

Property sheet is also working without any problem that I can see. I had a small problem with having multiple property sheets open and activationg the apply button. But that's all fixed now.

If you find ANY, problems with the SDK let me know. I'll fix problems first. :)

I'm still testing each command and doing a documentation examples. The current SDK doc. is still the old one. Once I'm done, I'll either update it with the permission of Andreas, or make a Delphi version of the doc.

Have a nice day

:)

DelphiDeskletSDK.zip

Attachment: DelphiDeskletSDK.zip

#291377

As promissed, attached is the current SDK. ...

Oh sir! Thank you SOOO MUCH!!!!!!!

#291440

love love love to pcm :)

#291609

even though i can`t program and thus can`t use the SDK, i realise how much it means to developers so....

THANK YOU PCM! :D

#291616

Well as the starter of all this I am glad to thank pcm one more time

#291736