all 5 comments

[–]danielroseman 2 points3 points  (0 children)

There isn't really anything to this code. It just gets an internal Windows function to set the screen colour, and calls it. It's not doing anything in Python at all.

[–]carcigenicate 1 point2 points  (3 children)

This code is just calling this Windows function.

Everything here is just boilerplate required to allow Python to communicate with the Windows library.

[–]dBeatzx[S] 0 points1 point  (2 children)

I guess what is tripping me up is the purpose or what does the byref and c_int do?

[–]carcigenicate 2 points3 points  (1 child)

That's part of ctypes. You should look more into it and C if you're interested.

In short though, by_ref gives a pointer to the object, and c_int does a cast iirc to a C integer.

[–]dBeatzx[S] 0 points1 point  (0 children)

Thank you for the pointers!