Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Add bindings to GetWindowPosition #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zbaylin
Copy link
Member

@zbaylin zbaylin commented Oct 21, 2019

This is to help with creating a draggable title bar

CAMLlocal1(ret);
ret = caml_alloc(2, 0);

Store_field(ret, 0, x);
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be Store_field(ret, 0, Val_int(x))? I recall sometimes that there would be issues with this - see resdl_SDL_GetWindowSize/resdl_SDL_GetDrawableSize?

Copy link
Member

@bryphe bryphe left a comment

Choose a reason for hiding this comment

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

Thanks for making this change, @zbaylin ! Looks great overall - I just had one piece of feedback - it looks like the int values might not make it to the OCaml side in all cases / platforms - I think it needs to be wrapped in a Val_int.

Otherwise, looks great! Thank you for adding this!

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

Successfully merging this pull request may close these issues.

2 participants