mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2026-01-08 17:34:46 +08:00
!30 Remove audio, optimize header guard
!30 Remove audio, optimize header guard
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
#ifdef GUILITE_ON
|
||||
#if (defined __linux__) || (defined __APPLE__)
|
||||
|
||||
#include "../../core_include/api.h"
|
||||
#include "../../core_include/audio.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef void(*ANDROID_PLAY_WAV)(const char* fileName);
|
||||
ANDROID_PLAY_WAV gAndroidPlayWav;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AUDIO_TYPE type;
|
||||
}AUDIO_REQUEST;
|
||||
|
||||
static c_fifo s_request_fifo;
|
||||
|
||||
static void* render_thread(void* param)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
AUDIO_REQUEST request;
|
||||
s_request_fifo.read(&request, sizeof(request));
|
||||
|
||||
if (AUDIO_MAX <= request.type)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(gAndroidPlayWav)
|
||||
{
|
||||
gAndroidPlayWav("heart_beat.wav");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void c_audio::init()
|
||||
{
|
||||
static bool s_flag = false;
|
||||
if (s_flag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned long pid;
|
||||
create_thread(&pid, 0, render_thread, 0);
|
||||
s_flag = true;
|
||||
}
|
||||
|
||||
int c_audio::play(AUDIO_TYPE type)
|
||||
{
|
||||
if (AUDIO_MAX <= type)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
AUDIO_REQUEST request;
|
||||
request.type = type;
|
||||
s_request_fifo.write(&request, sizeof(request));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,252 +0,0 @@
|
||||
#ifdef GUILITE_ON
|
||||
#if (defined _WIN32) || (defined WIN32) || (defined _WIN64) || (defined WIN64)
|
||||
|
||||
#include <windows.h>
|
||||
#include <Audioclient.h>
|
||||
#include <mmdeviceapi.h>
|
||||
|
||||
#include "../../core_include/api.h"
|
||||
#include "../../core_include/audio.h"
|
||||
|
||||
#ifndef AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM
|
||||
#define AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM 0x80000000
|
||||
#endif
|
||||
#define AUDIO_CHANNELS_MONO 1
|
||||
#define AUDIO_SAMPLE_RATE 44000
|
||||
#define AUDIO_BITS 16
|
||||
#define AUDIO_BLOCK_ALIGN (AUDIO_CHANNELS_MONO * (AUDIO_BITS >> 3))
|
||||
#define AUDIO_BYTE_RATE (AUDIO_SAMPLE_RATE * AUDIO_BLOCK_ALIGN)
|
||||
#define AUDIO_OUTPUT_BUF_LEN (10000000 * 5) //5 seconds long.
|
||||
|
||||
#define CHECK_ERROR(ret) if(ret != 0){ASSERT(false);}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AUDIO_TYPE type;
|
||||
}AUDIO_REQUEST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BYTE* p_data;
|
||||
int size;
|
||||
}WAV_RESOURCE;
|
||||
|
||||
static WAV_RESOURCE s_wav_resource[AUDIO_MAX];
|
||||
static c_fifo s_request_fifo;
|
||||
static IAudioClient* s_audio_client;
|
||||
static IAudioRenderClient* s_audio_render_client;
|
||||
static HANDLE s_audio_event;
|
||||
|
||||
//Should be call by UWP, and UWP create audio client.
|
||||
void set_audio_client(IAudioClient* audio_client)
|
||||
{
|
||||
s_audio_client = audio_client;
|
||||
}
|
||||
|
||||
static WAVEFORMATEX s_wav_format = {
|
||||
WAVE_FORMAT_PCM,
|
||||
AUDIO_CHANNELS_MONO,
|
||||
AUDIO_SAMPLE_RATE,
|
||||
AUDIO_BYTE_RATE,
|
||||
AUDIO_BLOCK_ALIGN,
|
||||
AUDIO_BITS,
|
||||
0
|
||||
};
|
||||
|
||||
static int register_wav_resouce(AUDIO_TYPE type, const wchar_t* wav_path)
|
||||
{
|
||||
if (s_wav_resource[type].p_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* hFile = CreateFile(wav_path, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if (INVALID_HANDLE_VALUE == hFile)
|
||||
{
|
||||
log_out("Open wave file failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
LARGE_INTEGER ret;
|
||||
GetFileSizeEx(hFile, &ret);
|
||||
int size = ret.LowPart;
|
||||
|
||||
if (INVALID_SET_FILE_POINTER == SetFilePointer(hFile, 0x2C, 0, FILE_BEGIN))
|
||||
{
|
||||
ASSERT(false);
|
||||
return -2;
|
||||
}
|
||||
size -= 0x2C;
|
||||
|
||||
BYTE* p_data = (BYTE*)malloc(size);
|
||||
DWORD read_num;
|
||||
ReadFile(hFile, p_data, size, &read_num, 0);
|
||||
|
||||
s_wav_resource[type].p_data = p_data;
|
||||
s_wav_resource[type].size = size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int load_wav_chunk(BYTE* p_des, int des_size, BYTE* p_src, int src_size)
|
||||
{
|
||||
if (des_size <= 0 || src_size <= 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int write_size = (src_size > des_size) ? des_size : src_size;
|
||||
memcpy(p_des, p_src, write_size);
|
||||
memset(p_des + write_size, 0, (des_size - write_size));
|
||||
return write_size;
|
||||
}
|
||||
|
||||
static int play_wav(BYTE* p_data, int size)
|
||||
{
|
||||
if (0 == p_data || 0 >= size)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
UINT32 bufferFrameCount;
|
||||
UINT32 numFramesAvailable;
|
||||
UINT32 numFramesPadding;
|
||||
BYTE* p_buffer = 0;
|
||||
int ret = s_audio_client->GetBufferSize(&bufferFrameCount);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
int offset = 0;
|
||||
while (WaitForSingleObject(s_audio_event, INFINITE) == WAIT_OBJECT_0)
|
||||
{
|
||||
ret = s_audio_client->GetCurrentPadding(&numFramesPadding);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
numFramesAvailable = bufferFrameCount - numFramesPadding;
|
||||
if (numFramesAvailable < 1600)
|
||||
{
|
||||
Sleep(10);
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = s_audio_render_client->GetBuffer(numFramesAvailable, &p_buffer);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
ret = load_wav_chunk(p_buffer, numFramesAvailable * s_wav_format.nBlockAlign, p_data + offset, (size - offset));
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
s_audio_render_client->ReleaseBuffer((ret / s_wav_format.nBlockAlign), 0);
|
||||
offset += ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
s_audio_render_client->ReleaseBuffer(0, AUDCLNT_BUFFERFLAGS_SILENT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void* render_thread(void* param)
|
||||
{
|
||||
s_audio_client->Start();
|
||||
while (true)
|
||||
{
|
||||
AUDIO_REQUEST request;
|
||||
s_request_fifo.read(&request, sizeof(request));
|
||||
|
||||
if (AUDIO_MAX <= request.type)
|
||||
{
|
||||
ASSERT(false);
|
||||
continue;
|
||||
}
|
||||
play_wav(s_wav_resource[request.type].p_data, s_wav_resource[request.type].size);
|
||||
}
|
||||
s_audio_client->Stop();
|
||||
}
|
||||
|
||||
static int init_audio_client()
|
||||
{
|
||||
if (s_audio_client)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//For desktop only, could not pass Windows Store certification.
|
||||
/*
|
||||
int ret = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
IMMDeviceEnumerator *pEnumerator = nullptr;
|
||||
ret = CoCreateInstance(__uuidof(MMDeviceEnumerator), 0,
|
||||
CLSCTX_ALL, __uuidof(IMMDeviceEnumerator),
|
||||
(void**)&pEnumerator);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
IMMDevice* audio_output_device;
|
||||
pEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &audio_output_device);
|
||||
if (0 == audio_output_device)
|
||||
{
|
||||
ASSERT(false);
|
||||
}
|
||||
|
||||
ret = audio_output_device->Activate(__uuidof(IAudioClient), CLSCTX_ALL, 0, (void**)&s_audio_client);
|
||||
CHECK_ERROR(ret);
|
||||
return 0;
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
|
||||
void c_audio::init()
|
||||
{
|
||||
static bool s_flag = false;
|
||||
if (s_flag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
register_wav_resouce(AUDIO_HEART_BEAT, L"heart_beat.wav");
|
||||
|
||||
if (0 > init_audio_client())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int ret = s_audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
|
||||
AUDIO_OUTPUT_BUF_LEN * 2, 0, &s_wav_format, 0);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
//s_audio_event = CreateEventEx(0, 0, 0, EVENT_ALL_ACCESS);
|
||||
s_audio_event = CreateEvent(0, 0, 0, 0);
|
||||
ret = s_audio_client->SetEventHandle(s_audio_event);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
ret = s_audio_client->GetService(__uuidof(IAudioRenderClient), (void**)&s_audio_render_client);
|
||||
CHECK_ERROR(ret);
|
||||
|
||||
unsigned long pid;
|
||||
create_thread(&pid, 0, render_thread, 0);
|
||||
s_flag = true;
|
||||
}
|
||||
|
||||
int c_audio::play(AUDIO_TYPE type)
|
||||
{
|
||||
if (AUDIO_MAX <= type)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
init();
|
||||
if (!s_audio_client || !s_audio_render_client)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
||||
AUDIO_REQUEST request;
|
||||
request.type = type;
|
||||
s_request_fifo.write(&request, sizeof(request));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_API_H
|
||||
#define GUILITE_CORE_INCLUDE_API_H
|
||||
#pragma once
|
||||
|
||||
#define REAL_TIME_TASK_CYCLE_MS 50
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
@@ -103,4 +102,3 @@ public:
|
||||
int m_right;
|
||||
int m_bottom;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_AUDIO_H
|
||||
#define GUILITE_CORE_INCLUDE_AUDIO_H
|
||||
|
||||
enum AUDIO_TYPE
|
||||
{
|
||||
AUDIO_HEART_BEAT,
|
||||
AUDIO_ALARM,
|
||||
AUDIO_MAX
|
||||
};
|
||||
|
||||
class c_audio
|
||||
{
|
||||
public:
|
||||
static int play(AUDIO_TYPE type);
|
||||
private:
|
||||
static void init();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_BITMAP_H
|
||||
#define GUILITE_CORE_INCLUDE_BITMAP_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/resource.h"
|
||||
@@ -92,5 +91,3 @@ public:
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_CMD_TARGET_H
|
||||
#define GUILITE_CORE_INCLUDE_CMD_TARGET_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
|
||||
@@ -133,5 +132,3 @@ private:
|
||||
static unsigned short ms_user_map_size;
|
||||
GL_DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_DISPLAY_H
|
||||
#define GUILITE_CORE_INCLUDE_DISPLAY_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -653,5 +652,3 @@ inline int c_display::swipe_surface(c_surface* s0, c_surface* s1, int x0, int x1
|
||||
m_phy_write_index++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_RESOURCE_H
|
||||
#define GUILITE_CORE_INCLUDE_RESOURCE_H
|
||||
#pragma once
|
||||
|
||||
//BITMAP
|
||||
typedef struct struct_bitmap_info
|
||||
@@ -24,5 +23,3 @@ typedef struct struct_font_info
|
||||
unsigned int count;
|
||||
LATTICE* lattice_array;
|
||||
} FONT_INFO;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_THEME_H
|
||||
#define GUILITE_CORE_INCLUDE_THEME_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/resource.h"
|
||||
@@ -118,5 +117,3 @@ private:
|
||||
static const BITMAP_INFO* s_bmp_map[BITMAP_MAX];
|
||||
static unsigned int s_color_map[COLOR_MAX];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_WND_H
|
||||
#define GUILITE_CORE_INCLUDE_WND_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -524,4 +523,3 @@ private:
|
||||
c_wnd(const c_wnd &win);
|
||||
c_wnd& operator=(const c_wnd &win);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_CORE_INCLUDE_WORD_H
|
||||
#define GUILITE_CORE_INCLUDE_WORD_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/resource.h"
|
||||
@@ -298,5 +297,3 @@ private:
|
||||
return utf8_bytes;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@ echo "Build header-only library: GuiLite.h"
|
||||
|
||||
# build GuiLiteRaw.h
|
||||
cd core_include
|
||||
cat api.h cmd_target.h resource.h theme.h display.h word.h bitmap.h wnd.h audio.h > core.h
|
||||
cat api.h cmd_target.h resource.h theme.h display.h word.h bitmap.h wnd.h > core.h
|
||||
mv core.h ../
|
||||
|
||||
cd ../widgets_include
|
||||
@@ -11,7 +11,6 @@ mv widgets.h ../
|
||||
|
||||
cd ..
|
||||
cat core.h widgets.h > GuiLiteRaw.h
|
||||
rm core.h widgets.h
|
||||
|
||||
# build GuiLiteRaw.cpp
|
||||
cd core
|
||||
@@ -28,17 +27,20 @@ mv widgets.cpp ../
|
||||
|
||||
cd ..
|
||||
cat core.cpp adapter.cpp widgets.cpp > GuiLiteRaw.cpp
|
||||
rm core.cpp adapter.cpp widgets.cpp
|
||||
|
||||
# remove include core_include widgets_include from GuiLiteRaw.h
|
||||
sed '/^#include.*core_include\|widgets_include.*/d' GuiLiteRaw.h > GuiLiteNoInclude.h
|
||||
sed -i '/^#include.*core_include\|widgets_include.*/d' GuiLiteRaw.h
|
||||
# remove all #pragma once
|
||||
sed -i '/^#pragma once/d' GuiLiteRaw.h
|
||||
# add #pragma once for 1st line
|
||||
sed -i '1 s/^/#pragma once\n/' GuiLiteRaw.h
|
||||
|
||||
# remove include core_include widgets_include from GuiLiteRaw.cpp
|
||||
sed '/^#include.*core_include\|widgets_include.*/d' GuiLiteRaw.cpp > GuiLiteNoInclude.cpp
|
||||
sed -i '/^#include.*core_include\|widgets_include.*/d' GuiLiteRaw.cpp
|
||||
|
||||
# Delete empty lines or blank lines
|
||||
sed '/^$/d' GuiLiteNoInclude.h > GuiLite.h
|
||||
sed '/^$/d' GuiLiteNoInclude.cpp > GuiLite.cpp
|
||||
sed '/^$/d' GuiLiteRaw.h > GuiLite.h
|
||||
sed '/^$/d' GuiLiteRaw.cpp > GuiLite.cpp
|
||||
|
||||
# Append GuiLite.cpp to GuiLite.h
|
||||
cat GuiLite.cpp >> GuiLite.h
|
||||
@@ -47,10 +49,10 @@ cat GuiLite.cpp >> GuiLite.h
|
||||
echo '#include "GuiLite.h"' > test.cpp
|
||||
gcc -c -D GUILITE_ON test.cpp
|
||||
|
||||
# clean
|
||||
rm GuiLiteRaw.h GuiLiteNoInclude.h GuiLiteRaw.cpp GuiLiteNoInclude.cpp GuiLite.cpp test.cpp
|
||||
mv GuiLite.h ../
|
||||
|
||||
echo "Done!"
|
||||
echo "You could find GuiLite.h in root folder"
|
||||
./.sync.sh GuiLite-header
|
||||
|
||||
# clean
|
||||
rm *.h *.cpp *.o
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_BUTTON_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_BUTTON_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -98,5 +97,3 @@ protected:
|
||||
return c_wnd::on_navigate(key);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_DIALOG_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_DIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -127,5 +126,3 @@ private:
|
||||
}
|
||||
static DIALOG_ARRAY ms_the_dialogs[SURFACE_CNT_MAX];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_EDIT_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_EDIT_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -199,5 +198,3 @@ private:
|
||||
char m_str_input[MAX_EDIT_STRLEN];
|
||||
char m_str[MAX_EDIT_STRLEN];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_KEYBOARD_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_KEYBOARD_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/resource.h"
|
||||
@@ -238,5 +237,3 @@ protected:
|
||||
c_word::draw_string_in_rect(m_surface, m_z_order, letter, rect, m_font_type, m_font_color, GL_ARGB(0, 0, 0, 0), m_attr);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* KEYBOARD_H_ */
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_LABEL_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_LABEL_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -32,5 +31,3 @@ protected:
|
||||
m_font_type = c_theme::get_font(FONT_DEFAULT);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_LIST_BOX_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_LIST_BOX_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -234,5 +233,3 @@ private:
|
||||
c_rect m_list_wnd_rect; //rect relative to parent wnd.
|
||||
c_rect m_list_screen_rect; //rect relative to physical screen(frame buffer)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_SLIDE_GROUP_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_SLIDE_GROUP_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/display.h"
|
||||
@@ -361,4 +360,3 @@ inline void c_slide_group::on_touch(int x, int y, TOUCH_ACTION action)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_SPINBOX_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_SPINBOX_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -103,4 +102,3 @@ inline void c_spin_button::on_touch(int x, int y, TOUCH_ACTION action)
|
||||
}
|
||||
c_button::on_touch(x, y, action);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_TABLE_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_TABLE_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/resource.h"
|
||||
@@ -113,4 +112,3 @@ protected:
|
||||
unsigned int m_row_height[MAX_ROW_NUM];
|
||||
unsigned int m_col_width[MAX_COL_NUM];
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_WAVE_BUFFER_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_WAVE_BUFFER_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include <string.h>
|
||||
@@ -119,5 +118,3 @@ private:
|
||||
short m_read_cache_sum;
|
||||
unsigned int m_refresh_sequence;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_WAVE_CTRL_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_WAVE_CTRL_H
|
||||
#pragma once
|
||||
|
||||
#include "../core_include/api.h"
|
||||
#include "../core_include/cmd_target.h"
|
||||
@@ -278,4 +277,3 @@ private:
|
||||
unsigned char m_frame_len_map[64];
|
||||
unsigned char m_frame_len_map_index;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user