Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added helper macros. #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

BradWBeer
Copy link
Contributor

I added with-surface, with-context-from-surface and with-surface-and-context macros which I use to make life easier with cl-pango. cl-pango was a part of clinch, but I'm moving it away so it's useful to other libraries. I've used these macros in clinch and they help prevent errors when transient creating surfaces.

Currently I export these symbols through cl-pango in an (in-package ..) and (export ...). This shouldn't be an issue considering it's an experimental library.


(progn (surface-finish ,var-name)
(destroy ,var-name))))))

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should optionally not destroy the surface (maybe use &key not &optional for further extension). Also, there's no (defvar *surface*) afaict, which there probably should be, even if it's not really used elsewhere else (yet!).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I must have defvared surface somewhere in cl-pango. I also wanted to discuss with-context. It seems like the context should be destroyed at the end. Whatever the case, with-context and with-surface should work the same to limit surprises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants