mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
win32: Define COBJMACROS via project argument
We use it everywhere, so it makes sense to enable it everywhere. For anyone not in the know, defining COBJMACROS makes Micrsoft headers for COM objects provide C macros so that instead of having to call foo->lpVtbl->Release(); to unref a COM object, one can call IFoo_Release (foo); Note that thes macros are implemented with inheritance as Release() is defined on the IUnknown base interface (MS' equivalent to GObject) and would otherwise require IUnknown_Release ((IUnknown *) foo); That line works, too - but it is not necessary.
This commit is contained in:
parent
ef839e6505
commit
2ed6867084
@ -267,9 +267,6 @@ Otherwise it's similar to how the clipboard works. Only the DnD server
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* For C-style COM wrapper macros */
|
||||
#define COBJMACROS
|
||||
|
||||
/* for CIDA */
|
||||
#include <shlobj.h>
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "gdkglversionprivate.h"
|
||||
|
||||
/* Used for active language or text service change notifications */
|
||||
#define COBJMACROS
|
||||
#include <msctf.h>
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
|
@ -192,9 +192,6 @@
|
||||
#define INITGUID
|
||||
#endif
|
||||
|
||||
/* For C-style COM wrapper macros */
|
||||
#define COBJMACROS
|
||||
|
||||
#include "gdkdrag.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkwin32.h"
|
||||
|
@ -36,9 +36,6 @@
|
||||
#define INITGUID
|
||||
#endif
|
||||
|
||||
/* For C-style COM wrapper macros */
|
||||
#define COBJMACROS
|
||||
|
||||
#include "gdkdropprivate.h"
|
||||
|
||||
#include "gdkdrag.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
#endif
|
||||
#define WINVER 0x0603
|
||||
#define _WIN32_WINNT 0x0603
|
||||
#define COBJMACROS
|
||||
#include "config.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "gtkfilechoosernativeprivate.h"
|
||||
#include "gtknativedialogprivate.h"
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
#include "config.h"
|
||||
|
||||
#include <math.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
@ -63,6 +63,7 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
if host_machine.system() == 'windows'
|
||||
add_project_arguments(['-DUNICODE',
|
||||
'-D_UNICODE',
|
||||
'-DCOBJMACROS',
|
||||
'-D_WIN32_WINNT=_WIN32_WINNT_WIN7'], language: 'c')
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user