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

Delete macro #46

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Version 1.1.0
* Widget::hasModalFocus has been renamed to Widget::isModalFocused.
* Widget::hasModalMouseInputFocus has been renamed to Widget::isModalMouseInputFocused.
* Widget::generateAction has been renamed to Widget::distributeActionEvent.
* DELETE is now undefined in Key.hpp if present. It should hopefully
take care of some problems with windows.h defining delete which
sometimes breaks Key.hpp.

Version 1.0.0
=============
Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from d0400d4714bcdad2d1f00283c80e77317147ea5c
* Continue rebasing from 063dc975e98dfc74c2565229ce175cccc70fa4dd
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
7 changes: 7 additions & 0 deletions include/guisan/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@

#include "guisan/platform.hpp"

// <windows.h> defines DELETE which breaks this file as we have a constant named
// DELETE, hence we undefine DELETE if it is defined and hope people don't use
// that windows define with Guisan.
#if defined(_WIN32) && defined(DELETE)
# undef DELETE
#endif

namespace gcn
{
/**
Expand Down
9 changes: 3 additions & 6 deletions include/guisan/opengl/openglimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@
#ifndef GCN_OPENGLIMAGE_HPP
#define GCN_OPENGLIMAGE_HPP

#if defined (_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined (DELETE)
#undef DELETE
#endif
#if defined(_WIN32)
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

#if defined (__APPLE__)
Expand Down