Writing plugins - How to questions..
Started by mark76uk


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


16 posts in this topic
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
04-20-2003, 11:39 AM -
#1
I'm thinking of beginning programming again.

My experience:
Complex BASIC from the ages of 10 to 18 (i'm 26 now.)
Making heavy modifications to PERL scripts.
Read the JAVA manual from start to finish.
I have no experience with Windows programming.


What exactly is the relationship between a plugin and True
Launch Bar?

Do you think plugins can be written with Borland Delphi or
Borland C++ Builder? I'm looking at those as a beginning, as I
learn well from examples.

I found a tlbpdk.zip through the forum search, but I don't
even know what the filetypes are (.cpp .h .ncb .sln)!!

Perhaps you should consider adding a plugins spec to the
TrueSoft website. I think you may get more contributors if
the information is available.

/Mark
shapeshifter
Senior Member
****


0
658 posts 24 threads Joined: Sep 2002
04-20-2003, 02:38 PM -
#2
Quote:I don't even know what the filetypes are (.cpp .h .ncb .sln)!!

I don't know about the last 2, but .cpp is a standard C++ file, and .h is a C++ header file (function and variable declarations, usualy). Both are unformated text.

By the way, I might be interested in developing plugins, too, but I don't know where to start. I've done windows programming with Visual C++, but I've never written a .dll, so I'm not sure how that works.
Yuri Kobets
Posting Freak
*****


10
6,204 posts 427 threads Joined: Jan 2002
04-20-2003, 03:51 PM -
#3
.ncb - internal MS Visual C++ file
.sln - project (solution) file for MS Visual C++

Quote:By the way, I might be interested in developing plugins, too, but I don't know where to start. I've done windows programming with Visual C++, but I've never written a .dll, so I'm not sure how that works.
It is not so difficult Wink VC have templates so you can begin with them. Or take any sample project from TLB PDK and use it as template for your project. TLB uses COM technology for plugins. All you need is to implement ITlbButton interface. All methods of ITlbButton have good names (like OnLButtonDown). If you have any questions let me know I'll help you.

Quote:Do you think plugins can be written with Borland Delphi or Borland C++ Builder?
I guess Dephi and Borland C++ Builder can do this work too but I do not know these products well enough. So I cannot recommend you something Sad
The TORDEX Team
http://www.tordex.com
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
04-20-2003, 05:57 PM -
#4
Can I ask what the plugin relys on True Launch Bar for?

Graphics
Does TLB simply allocate a square of bar for the plugin icon to
appear in?.. or is it a complex interaction, where TLB does the
actual display of various component icons on behalf of the plugin?

I assume plugin configuration dialogues are entirely
independant of TLB?

User Input
Does TLB pass mouse click data to the plugin (say for the
Winamp plugin, where there are various buttons?) Or is the
plugin detecting and acting on these by itself?

Thanks /Mark
Yuri Kobets
Posting Freak
*****


10
6,204 posts 427 threads Joined: Jan 2002
04-21-2003, 02:17 PM -
#5
Quote:Graphics
Does TLB simply allocate a square of bar for the plugin icon to
appear in?.. or is it a complex interaction, where TLB does the
actual display of various component icons on behalf of the plugin?
Here is definition of draw function:
Code:
STDMETHODIMP ITlbButton::Draw(HANDLE hDC, RECT *rcItem)
To draw button you implement this function. hDC is a handle to a device context (DC). rcItem is poiter to the RECT struct where you must draw your button. All is simple Wink

Code:
Does TLB pass mouse click data to the plugin (say for the
Winamp plugin, where there are various buttons?)  Or is the
plugin detecting and acting on these by itself?
The same way. ITlbButton interface have some functions to handle mouse events:
Code:
STDMETHODIMP OnMouseOver(long keys, int x, int y);
STDMETHODIMP OnMouseLeave(long keys);
STDMETHODIMP OnMouseEnter(long keys, int x, int y);
STDMETHODIMP OnLButtonDown(long key, int x, int y);
STDMETHODIMP OnLButtonUp(long key, int x, int y);
TLB call these functions to notify plugin about mouse events.

Quote:I assume plugin configuration dialogues are entirely
independant of TLB?
All dialogs and windows are independant of TLB. The only thing TLB supply plugins is stream to save and load data of plugins:
Code:
STDMETHODIMP Load(IStream *data);
STDMETHODIMP Save(IStream *data);
Also note that plugin does not have own window.
The TORDEX Team
http://www.tordex.com
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
04-21-2003, 03:13 PM -
#6
It's all very interesting. I expect that a person would need
plenty more details if they wanted to write a plugin though.

Would you like True Launch Bar to have many contributors?

Like CoolMon, Winamp or Macromedia Exchange for example?
With many people producing plugins in their spare time.

Personally, I would like to see all programs supported like
that. I'm still hoping that we'll be able to write True Launch
Bar plugins in a scripting language
someday.

It would certainly set True Launch Bar success on an upward
curve.
[Image: graphs.gif]

/Mark
BarryJ
Junior Member
**


0
11 posts 2 threads Joined: Dec 2002
04-24-2003, 07:52 PM -
#7
I like the graphic demonstration. I too would like to make plugins and have tried, but I appear to be not familiar enough with COM.
PsychoMark
Member
***


0
122 posts 9 threads Joined: Jan 2003
04-25-2003, 05:24 AM -
#8
As I announced earlier in another thread, I've been working on a Delphi implementation for a TLB plugin. Today I picked it up again and converted the RegisterPlugin function... it does write the correct registry keys now, but TLB won't recognize the plugin yet.. don't know if a restart is required? The UnregisterPlugin function hasn't been converted either, although it's not that much work... I just want the registration to work first Smile.

If anyone's interested in the code so far, leave a message and I'll post it...
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
04-25-2003, 05:33 AM -
#9
Quote:If anyone's interested in the code so far, leave a message and I'll post it...
Thanks, it would be good to see for when I get started with Delphi. You think Delphi is a good way to go? or maybe I'd be better going straight to the hard stuff with C++?

/Mark
PsychoMark
Member
***


0
122 posts 9 threads Joined: Jan 2003
04-25-2003, 05:41 AM -
#10
Delphi is my way to go, don't know about yours Smile. Been working with it for the last couple of years now, and in that time it has become my fulltime job... the only downside I can think of is the fact that TLB and it's samples are written in C++, but that's just a matter of getting this baby running Smile


I've attached the code so far, hope I didn't miss anything. It's by far not what I want it to be when it comes to clean code and reusability, hardcoded some things in there, but that's of later concern...
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
04-28-2003, 09:58 AM -
#11
Quote:Delphi is my way to go, don't know about yours Smile

Smile I guess I was checking to see if you had any regrets
about choosing to learn Delphi. Like maybe you can't do this
or that with it. Perhaps there is no integrated hoof polish
dispenser, something like that.

Anyhow, it seems you are pleased.

Thanks
/Mark
PsychoMark
Member
***


0
122 posts 9 threads Joined: Jan 2003
04-28-2003, 11:01 AM -
#12
There are only a few things which you can't do using Delphi alone, and that is, for example, writing a device driver. As for the other 99.99999%, it does a great job... and in fact, most things MS promises with .Net have already been implemented in Delphi years ago...


...but in the end, it's a matter of personal preference, can't argue that. The fact is that Delphi is a powerful language, the Pascal code is very clean, the compiler takes a few seconds to build multi-megabyte application (compare that to C compilers which take several minutes) and runtime speed is about the same (not counting the overhead of the component library, which takes away speed slightly for easier use, but at the lowest level there are no differences)...
Guest
Guest


 
05-04-2003, 09:21 PM -
#13
Hey yall...

I love seeing people gettin into plugins. I have grown out of programming now (ha, im only 20) but still love helping people. If you have any non-super-complex problems - as I havent programmed in about a year, or better yet, want me to make skins for your plugins I'd be happy to help. I, by nature am a graphic designer, not a programmer, so... yeah, keep that in mind.

btw - what happened to <!-- w --><a class="postlink" href="http://www.tsoftcentral.com/skinslib">www.tsoftcentral.com/skinslib</a><!-- w --> ?? its not working for me... just got a 404 on tsoft and the truelaunch doman for /skinslib just wanting to find some new skins!

oh yeah, drop me an msn if yer bored - I usually am: <!-- e --><a href="mailto:l7studios@hotmail.com">l7studios@hotmail.com</a><!-- e -->
Dracula
Senior Member
****


0
407 posts 28 threads Joined: Dec 2002
05-06-2003, 12:42 PM -
#14
PsychoMark, please keep me (us?) informed about your progress with the Delphi PDK... does TrueLaunchBar recognize the DLL yet?

I must admit I have zero experience with making or converting these kinds of frameworks, but I could definitely use it for development of a plugin.

In my opinion it would be great if more people could create plugins for TLB, although then they won't always be of the same quality we get from Yuri Smile But I recall a poll some time ago in which Yuri asked for what was more important to the users, plugin development or TLB improvement. If more people would create plugins, he could focus more on TLB (if he wanted of course :p)...
Windows 7, IE 9.0, Shell 6.0.6000.16386, TLB 4.2.3 beta
PsychoMark
Member
***


0
122 posts 9 threads Joined: Jan 2003
05-12-2003, 02:11 AM -
#15
I haven't been able to make more progress, but I'll post updates as soon as they're available of course Smile. Yes, lower quality plugins may be released, but the good thing about plugins is: you don't have to use them Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)