mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
cleanup
This commit is contained in:
@@ -65,10 +65,6 @@
|
||||
#ifndef _MGUI_CONTROL_H
|
||||
#define _MGUI_CONTROL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "ctrl/ctrlhelper.h"
|
||||
|
||||
/**
|
||||
@@ -166,6 +162,10 @@ extern "C" {
|
||||
#include "ctrl/animation.h"
|
||||
#endif /* _MGCTRL_ANIMATION */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#ifndef EXT_ANIMATION_H
|
||||
#define EXT_ANIMATION_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -69,6 +69,17 @@
|
||||
#ifndef _MGUI_ENDIAN_RW_H
|
||||
#define _MGUI_ENDIAN_RW_H
|
||||
|
||||
/* The macros used to swap values */
|
||||
/* Try to use superfast macros on systems that support them */
|
||||
#ifdef linux
|
||||
#include <endian.h>
|
||||
#ifdef __arch__swab16
|
||||
#define ArchSwap16 __arch__swab16
|
||||
#endif
|
||||
#ifdef __arch__swab32
|
||||
#define ArchSwap32 __arch__swab32
|
||||
#endif
|
||||
#endif /* linux */
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@@ -404,18 +415,6 @@ MG_EXPORT int MGUI_RWgetc (MG_RWops* area);
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* The macros used to swap values */
|
||||
/* Try to use superfast macros on systems that support them */
|
||||
#ifdef linux
|
||||
#include <endian.h>
|
||||
#ifdef __arch__swab16
|
||||
#define ArchSwap16 __arch__swab16
|
||||
#endif
|
||||
#ifdef __arch__swab32
|
||||
#define ArchSwap32 __arch__swab32
|
||||
#endif
|
||||
#endif /* linux */
|
||||
|
||||
/* Use inline functions for compilers that support them, and static
|
||||
functions for those that do not. Because these functions become
|
||||
static for compilers that do not support inline functions, this
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
#ifndef _MGUI_GDI_H
|
||||
#define _MGUI_GDI_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "endianrw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -8385,9 +8390,6 @@ MG_EXPORT int GUIAPI GetTabbedTextExtentPoint (HDC hdc,
|
||||
|
||||
#ifdef _MGCHARSET_UNICODE
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* \fn int GUIAPI MB2WCEx (PLOGFONT log_font, void* dest, BOOL wc32, \
|
||||
* const unsigned char* mstr, int n)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define _MGUI_MINIGUI_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -173,8 +174,6 @@ MG_EXPORT RECT GUIAPI GetScreenRect (void);
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/**
|
||||
* \fn BOOL GUIAPI IsServer(void);
|
||||
* \brief Check whether the current process is the server of MiniGUI-Processes.
|
||||
|
||||
@@ -1440,7 +1440,7 @@ static LRESULT ListViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
{
|
||||
int mouseX = LOSWORD (lParam);
|
||||
int mouseY = HISWORD (lParam);
|
||||
PITEMDATA pi;
|
||||
PITEMDATA pi = NULL;
|
||||
int nCols;
|
||||
PLSTHDR p1;
|
||||
|
||||
@@ -1511,7 +1511,7 @@ static LRESULT ListViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
|
||||
RECT rect, rcClient;
|
||||
PLSTHDR p1;
|
||||
PITEMDATA pi;
|
||||
PITEMDATA pi = NULL;
|
||||
|
||||
GetClientRect (hWnd, &rcClient);
|
||||
|
||||
|
||||
@@ -3469,9 +3469,7 @@ BOOL GUIAPI ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow)
|
||||
/*************************** Main window creation ****************************/
|
||||
#ifdef _MGRM_THREADS
|
||||
int GUIAPI CreateThreadForMainWindow (pthread_t* thread,
|
||||
pthread_attr_t* attr,
|
||||
void * (*start_routine)(void *),
|
||||
void * arg)
|
||||
pthread_attr_t* attr, void * (*start_routine)(void *), void* arg)
|
||||
{
|
||||
pthread_attr_t new_attr;
|
||||
int ret;
|
||||
@@ -3504,7 +3502,7 @@ int GUIAPI WaitMainWindowClose (HWND hWnd, void** returnval)
|
||||
|
||||
return pthread_join (th, returnval);
|
||||
}
|
||||
#endif
|
||||
#endif /* _MGRM_THREADS */
|
||||
|
||||
void GUIAPI MainWindowThreadCleanup (HWND hMainWnd)
|
||||
{
|
||||
@@ -3526,7 +3524,7 @@ void GUIAPI MainWindowThreadCleanup (HWND hMainWnd)
|
||||
#endif
|
||||
|
||||
#ifdef __THREADX__
|
||||
/* to avoid threadx keep pWin's value,which will lead to wrong way */
|
||||
/* to avoid threadx keep pWin's value, which will lead to wrong way */
|
||||
memset (pWin, 0xcc, sizeof(MAINWIN));
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user