Apr 042009
 

I just checked in new codes of PPCam to SVN on sourceforge.net, I guess I won’t spend too much time on visual effect in the future, so what we have now is most likely what we have all the time:

  • no Windows gadget, i.e. no toolbox, no menu, no border, no title bar
  • semi-transparent effect, means you can still read content on windows below PPCam
  • Moving by any point, means you can click on any position of the window and drag & drop the window to the new place, this is a must as it does not have title bar for this

Note that this is data driven 😉 , I learnt the idea from previous music player project – you can just provide a bmp file, and the application will take top-left point as “transparent sample”, then any points in the bmp that has the same color as top-left point will be treated as transparent. This feature makes really easier to change the look and feel.

Other than these visible changes, that are some codes related changes, may or may not be that interesting:

  • Added win32api.ads to include those Win32 APIs that the project needs to use, but are missing in win32ada binding
  • PPCam now becomes a dummy top level package, it used to have those data conversion functions but obviously I can use those from win32ada
  • Added a bmp to the source, this is the bmp I used to debug/demo
  • I’m trying to turn some functions to procedures whenever I don’t need a return code, I think this is another C habit needs to be changed

There will be couple of parts of features to be done in the coming days

  1. Include vfw features, I haven’t got any idea so far
  2. Pop-up menus for the interface to let user enter user name/password/server name, etc
  3. Network, UDP only, then later on I need to have P2P based on it
  4. Server, another GNAT Ada program that will be running on a server to handle authentication, port discovery, etc

I believe this project will be running pretty long thinking of how much I have to learn, if I can make a workable version by June I will be super happy.

I will try to check in at least every week so to make the project active, I will also post documents (svn first, web site later) so to make it possible for others to understand the whole project well.

Apr 042009
 

I was running into really weird problem that program SIGSEGV, after (quite a while) debug, I found the problem is, R’size attribute is in bit, instead of byte, after changing codes from R’size to R’size/8, everything works.

It … just proved I’m well trained by C/C++, mistakes I ever made include:

  • Assume strings are ended with nul
  • Assume backslash needs to be escaped
  • Assume “or” is bit-wise operation
  • Assume R’Size returns value in byte

Could be more, but these are what I can recall.

Now I can move on with PPCam again, let’s see when will be the next blocker.

 Posted by at 21:52
Apr 042009
 

Slowly, I found more and more evidence that win32ada is based on really old Win32 APIs, be more precisely, it may support Windows 95 but definitely not Windows NT 4.0. I believe the mainstream Windows platform today is XP, with some Vista, so win32ada misses a lot.

I was thinking to create a new package to include those missing APIs that are necessary to my project, but turned out sometime it is impossible – some structures are not 4.0 compatible, so most likely I am still programming for Windows 95.

Now I am, seriously, thinking about creating my own binding, which supports modern Windows APIs, either Vista, or 2008. I can start with manually creating bindings that my project needs, then after making sure I’m doing the right thing, I can run those tools to create full set binding in a (semi-) automatic way.

I will try to avoid layered packages, as I don’t want to do “use” unless it is really necessary (such as “use type” for operators), but remembering where the definition comes from is really tough – WinUser? WinDef? WinGDI? I think they are just C functions stay in same name space, so should be safe to put them in same package.

I know it will be a super big package, but I don’t think people even want to know about it.

Apr 042009
 

The interface is neat, but it seems trying to load too much data from internet, which makes things way too slow.

Again, this can be explained in a “our” way, that is, I am not the targeted user. I have a feeling that RIM is just trying to boost its Bold’s sale, which has wifi support, a bigger screen, and, I believe, a faster processor.

Anyway I don’t want to get a new phone in near future, and whenever it will be, I will still pick a phone with qwerty keyboard instead of a big, crappy touch screen.

 Posted by at 11:09