Merge lp://staging/~smspillaz/compiz-libcompizconfig/ccs-object into lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~smspillaz/compiz-libcompizconfig/ccs-object |
Merge into: | lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8 |
Diff against target: |
690 lines (+613/-1) 6 files modified
CMakeLists.txt (+1/-0) include/ccs.h (+101/-1) src/CMakeLists.txt (+3/-0) src/main.c (+179/-0) tests/CMakeLists.txt (+56/-0) tests/test-ccs-object.cpp (+273/-0) |
To merge this branch: | bzr merge lp://staging/~smspillaz/compiz-libcompizconfig/ccs-object |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury | Needs Fixing | ||
Alan Griffiths | Pending | ||
Review via email: mp+104864@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-05-04.
Description of the change
This is all about bug 990690.
!! - It probably isn't a good idea to test this branch in isolation, as it is part of a pipeline to get compiz-
lp:~smspillaz/compiz-libcompizconfig/setting-mock
lp:~smspillaz/compiz-compizconfig-python/compiz-compizconfig-python.setting-api
lp:~smspillaz/compiz-compizconfig-gconf/compiz-compizconfig-gconf.adapt-to-new-interfaces
.. that's all !!
This branch introduces some preliminary work in a series of branches to get libcompizconfig under test. In order to test the objects properly, we need to abstract away their interfaces into replacable structs so you can test the interaction between the various classes.
This would be awkward to do correctly if we didn't have a suitable object system to handle interface implementation, referencing, private storage etc.
As such, a new struct CCSObject is introduced. It is similar in design to GObject, but with a much smaller feature set centered mostly around the handling of interfaces and composition / indirection. A type registrar is also included (also very simple).
Tests are included.
Unmerged revisions
- 441. By Sam Spilsbury
-
Also test for free
- 440. By Sam Spilsbury
-
Added a free thread
- 439. By Sam Spilsbury
-
Lose the ;
- 438. By Sam Spilsbury
-
Fix potential macro problems
- 437. By Sam Spilsbury
-
Free interfaces once objects are removed
- 436. By Sam Spilsbury
-
Don't use reserved name
- 435. By Sam Spilsbury
-
Make the CCSObject API a bit more typesafe
- 434. By Sam Spilsbury
-
Don't reallocate all the time. Also handle realloc failures better
- 433. By Sam Spilsbury
-
Added a simple type registrar
- 432. By Sam Spilsbury
-
Added a ccsObjectFinalize function which frees everything in CCSObject storage
I know it is common (and may be a project style) but there is no advantage to having different names to refer to the same thing in different namespaces. That is not:
typedef struct _CCSObject CCSObject;
struct _CCSObject
{
...
};
but:
typedef struct CCSObject
{
...
} CCSObject;