Merge lp://staging/~smspillaz/compiz-libcompizconfig/context-funcs-behind-interface into lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp://staging/~smspillaz/compiz-libcompizconfig/context-funcs-behind-interface
Merge into: lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8
Prerequisite: lp://staging/~smspillaz/compiz-libcompizconfig/refactor-context
Diff against target: 855 lines (+333/-87)
4 files modified
include/ccs.h (+55/-5)
src/ccs-private.h (+4/-2)
src/compiz.cpp (+14/-2)
src/main.c (+260/-78)
To merge this branch: bzr merge lp://staging/~smspillaz/compiz-libcompizconfig/context-funcs-behind-interface
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Fixing
Review via email: mp+104807@code.staging.launchpad.net

This proposal supersedes a proposal from 2012-04-29.

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-libcompizconfig under test. If you want to test the result of this work, you should probably look at testing

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 converts the context object to use the base object in its implementation and indirects all of the context object's api through an interface.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

GET_INTERFACE seems overcomplicated and error prone. It requires the first two parameters to match up - when in every use the second is a second macro with no other use that calls a third with the first parameter. Confused?

Current usage: GET_INTERFACE (CCSContextInterface, CCS_CONTEXT_INTERFACE_TYPE, context))
Suggest usage: GET_INTERFACE (CCSContextInterface, context))

Current #define GET_INTERFACE(CType,IType, o) (CType *) ccsObjectGetInterface ((CCSObject *) o, IType)
Suggest #define GET_INTERFACE(CType, o) (CType*)ccsObjectGetInterface((CCSObject*) o, GET_INTERFACE_TYPE(CType))

And get rid of CCS_CONTEXT_INTERFACE_TYPE which is then unused.

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> GET_INTERFACE seems overcomplicated and error prone. It requires the first
> two parameters to match up - when in every use the second is a second macro
> with no other use that calls a third with the first parameter. Confused?
>
> Current usage: GET_INTERFACE (CCSContextInterface, CCS_CONTEXT_INTERFACE_TYPE,
> context))
> Suggest usage: GET_INTERFACE (CCSContextInterface, context))
>
>
> Current #define GET_INTERFACE(CType,IType, o) (CType *) ccsObjectGetInterface
> ((CCSObject *) o, IType)
> Suggest #define GET_INTERFACE(CType, o)
> (CType*)ccsObjectGetInterface((CCSObject*) o, GET_INTERFACE_TYPE(CType))
>
> And get rid of CCS_CONTEXT_INTERFACE_TYPE which is then unused.

I'm a bit confused - how would GET_INTERFACE_TYPE(CCSContext) be able to replace CCS_CONTEXT_INTERFACE_TYPE ? There's no templates available so we can't do it that way ....

448. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

449. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

450. By Sam Spilsbury

Merge

451. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Looks basically OK, but there are merge conflicts with pre-requisites

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

The conflicts seem to be gone now

452. By Sam Spilsbury

Move null check

Unmerged revisions

452. By Sam Spilsbury

Move null check

451. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

450. By Sam Spilsbury

Merge

449. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

448. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

447. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

446. By Sam Spilsbury

Remove usage #define

445. By Sam Spilsbury

Simplify dynamic context interface

444. By Sam Spilsbury

Make it work with the new API

443. By Sam Spilsbury

Merged refactor-context into context-funcs-behind-interface.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches