mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-25 00:56:35 +00:00
Minor code compaction (following #296)
This commit is contained in:
parent
9a97ef673e
commit
48ed0a10d7
20
imgui.cpp
20
imgui.cpp
@ -8706,19 +8706,19 @@ void ImGui::Color(const char* prefix, unsigned int v)
|
|||||||
// PLATFORM DEPENDANT HELPERS
|
// PLATFORM DEPENDANT HELPERS
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS)
|
#if defined(_WIN32) && !defined(_WINDOWS_) && (!defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) || !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS))
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#ifndef _WINDOWS_
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Win32 API clipboard implementation
|
||||||
|
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS)
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma comment(lib, "user32")
|
#pragma comment(lib, "user32")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Win32 API clipboard implementation
|
|
||||||
static const char* GetClipboardTextFn_DefaultImpl()
|
static const char* GetClipboardTextFn_DefaultImpl()
|
||||||
{
|
{
|
||||||
static char* buf_local = NULL;
|
static char* buf_local = NULL;
|
||||||
@ -8743,7 +8743,6 @@ static const char* GetClipboardTextFn_DefaultImpl()
|
|||||||
return buf_local;
|
return buf_local;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Win32 API clipboard implementation
|
|
||||||
static void SetClipboardTextFn_DefaultImpl(const char* text)
|
static void SetClipboardTextFn_DefaultImpl(const char* text)
|
||||||
{
|
{
|
||||||
if (!OpenClipboard(NULL))
|
if (!OpenClipboard(NULL))
|
||||||
@ -8786,14 +8785,9 @@ static void SetClipboardTextFn_DefaultImpl(const char* text)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Win32 API IME support (for Asian languages, etc.)
|
||||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS)
|
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS)
|
||||||
|
|
||||||
#ifndef _WINDOWS_
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
#include <imm.h>
|
#include <imm.h>
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma comment(lib, "imm32")
|
#pragma comment(lib, "imm32")
|
||||||
|
Loading…
Reference in New Issue
Block a user