-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathWrapPointList.h
More file actions
80 lines (68 loc) · 1.93 KB
/
Copy pathWrapPointList.h
File metadata and controls
80 lines (68 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright © 2014 CCP ehf.
#pragma once
#ifndef WrapPointList_H
#define WrapPointList_H
#include "localization.h"
#ifdef _WIN32
// -------------------------------------------------------------
// Description:
// Provides extended information from the script analysis.
// -------------------------------------------------------------
struct ItemRun
{
SCRIPT_ANALYSIS analysis; // http://msdn.microsoft.com/en-us/library/dd368797.aspx
int charPos;
int len; // length of run in WCHARs
};
#endif
// -------------------------------------------------------------
// Description:
// A Collator performs locale-sensitive string comparisons.
// -------------------------------------------------------------
BLUE_CLASS( WrapPointList) : public IRoot
{
public:
EXPOSE_TO_BLUE();
#ifdef _WIN32
WrapPointList( IRoot* lockobj = 0 );
~WrapPointList();
const SCRIPT_LOGATTR& operator[]( const size_t index ) const
{
return m_wrapPointList[index];
}
size_t Size() const
{
return m_wrapPointListCount;
}
#elif defined(__APPLE__)
CFStringRef GetCoreString() const
{
return m_coreString;
}
CFLocaleRef GetCoreLocale() const
{
return m_coreLocale;
}
#endif
friend PyObject* Py__init__(PyObject *self, PyObject *args);
private:
#ifdef _WIN32
void MergeSimpleScripts();
void BuildItemRunList();
bool TextAnalyze( WCHAR* wstr, size_t wlen, SCRIPT_CONTROL* scriptControl, SCRIPT_STATE* scriptState );
SCRIPT_LOGATTR* m_wrapPointList;
size_t m_wrapPointListCount;
// The itemRun list that will be converted into the WrapPointList
int m_itemRunCount;
ItemRun* m_itemRunList;
// List of script items, will be converted into an ItemRun list
SCRIPT_ITEM* m_tempItemList;
int m_tempItemCount;
int m_tempItemAllocLen;
#elif defined(__APPLE__)
AutoReleaseCF<CFStringRef> m_coreString;
AutoReleaseCF<CFLocaleRef> m_coreLocale;
#endif
};
TYPEDEF_BLUECLASS( WrapPointList );
#endif // WrapPointList_H