Hi Everybody,

Since Eric and Yann both expressed some interest in writing new client libs,
I thought I'd just toss some ideas out that might be applicable to cli_c2
and cli_c++.

First there are the two huge deficiencies in cli_c, that need to be fixed:
  - The client lib should not use global variables, so connections to
    multiple pgservers can be maintained
  - Thread safety, but (at least for cli_c2) no requirement to have thread
    support

Some API deficiencies I noticed:
  - pgInit is bad. Since it passes argc,argv instead of &argc,&argv it can't
    properly change argc when it removes arguments. The command line args
    could instead be passed back to the function that connects to a picogui
    server.
  - Structures and data buffers that are only valid until the next API call
    are confusing, and a source of bugs. These functions should IMHO return
    dynamically allocated buffers that the app is responsible for freeing.
  - pgSetIdle needs to be ditched in favor of a real timer callback system
  - Ditch pgCustomizeSelect in favor of a way to register callbacks for 
    activity on file descriptors
  - No more PGDEFAULT. There should be a cleaner syntax for setting widget
    parameters. This might be hard to do in C. In C++ maybe it could use
    operator overloading?
  - To allow the user to create custom widgets that act like server built-in
    widgets but operate on the client side, the client should use something
    higher level than a pghandle to represent widgets. Maybe handles in
    the client library would actually be structures allocated in client memory,
    that both contained the server handle and pointers to member functions. In
    cli_c++, this could just use a class of course.

To fully support multiple servers, there will need to be a server parameter
passed to each function. Alternatively, there could be a state machine like
in OpenGL?

Just some ideas...

--Micah

-- 
Only you can prevent creeping featurism!


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to