Skip to content

Commit c0aabfa

Browse files
authored
Merge pull request sciter-sdk#1 from AshfordN/move-SciterResourceType-definitions
Move SciterResourceType definitions
2 parents 71154e5 + 9ea1950 commit c0aabfa

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

request.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@ import (
4040
"unsafe"
4141
)
4242

43+
/** Resource data type.
44+
* Used by SciterDataReadyAsync() function.
45+
**/
46+
type SciterResourceType uint32
47+
48+
// typedef enum SciterResourceType
49+
const (
50+
RT_DATA_HTML SciterResourceType = iota
51+
RT_DATA_IMAGE
52+
RT_DATA_STYLE
53+
RT_DATA_CURSOR
54+
RT_DATA_SCRIPT
55+
RT_DATA_RAW
56+
RT_DATA_FONT
57+
RT_DATA_SOUND // wav bytes
58+
59+
RT_DATA_FORCE_DWORD = 0xffffffff
60+
)
61+
4362
type REQUEST_RESULT int32
4463

4564
// enum REQUEST_RESULT

types.go

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ type PhaseMask uint32
9090

9191
// enum PHASE_MASK
9292
const (
93-
BUBBLING = 0 // bubbling (emersion) phase
94-
SINKING = 0x8000 // capture (immersion) phase, this flag is or'ed with EVENTS codes below
95-
HANDLED = 0x10000 // a bubbling event consumed by some element
93+
BUBBLING = 0 // bubbling (emersion) phase
94+
SINKING = 0x8000 // capture (immersion) phase, this flag is or'ed with EVENTS codes below
95+
HANDLED = 0x10000 // a bubbling event consumed by some element
9696
SINKING_HANDLED = 0x18000 // a sinking event consumed by some child element
9797
// see: http://www.w3.org/TR/xml-events/Overview.html#s_intro
9898
)
@@ -461,7 +461,7 @@ const (
461461
T_ANGLE // double, radians
462462
T_COLOR // [unsigned] INT, ABGR
463463
T_ENUM
464-
T_ASSET // sciter::om::iasset* add_ref'ed pointer
464+
T_ASSET // sciter::om::iasset* add_ref'ed pointer
465465
)
466466

467467
// enum VALUE_UNIT_TYPE
@@ -811,9 +811,10 @@ type GestureParams struct {
811811
}
812812

813813
type SomEvents uint32
814+
814815
const (
815816
SOM_GET_PASSPORT = 0
816-
SOM_GET_ASSET = 1
817+
SOM_GET_ASSET = 1
817818
)
818819

819820
type SomParams C.SOM_PARAMS
@@ -887,20 +888,19 @@ const (
887888
SC_POSTED_NOTIFICATION = 0x06
888889

889890
/**This notification is sent when the engine encounters critical rendering error: e.g. DirectX gfx driver error.
890-
Most probably bad gfx drivers.
891+
Most probably bad gfx drivers.
891892
892-
* \param lParam #LPSCN_GRAPHICS_CRITICAL_FAILURE
893-
*
894-
**/
893+
* \param lParam #LPSCN_GRAPHICS_CRITICAL_FAILURE
894+
*
895+
**/
895896
SC_GRAPHICS_CRITICAL_FAILURE = 0x07
896897

897-
898898
/**This notification is sent when the engine needs keyboard to be present on screen
899-
E.g. when <input|text> gets focus
899+
E.g. when <input|text> gets focus
900900
901-
* \param lParam #LPSCN_KEYBOARD_REQUEST
902-
*
903-
**/
901+
* \param lParam #LPSCN_KEYBOARD_REQUEST
902+
*
903+
**/
904904
SC_KEYBOARD_REQUEST = 0x08
905905

906906
/**This notification is sent when the engine needs some area to be redrawn
@@ -1022,21 +1022,6 @@ func (s *ScnLoadData) SetData(data []byte) {
10221022
s.outDataSize = C.UINT(len(data))
10231023
}
10241024

1025-
/** Resource data type.
1026-
* Used by SciterDataReadyAsync() function.
1027-
**/
1028-
type SciterResourceType uint32
1029-
1030-
// typedef enum SciterResourceType
1031-
const (
1032-
RT_DATA_HTML SciterResourceType = iota
1033-
RT_DATA_IMAGE
1034-
RT_DATA_STYLE
1035-
RT_DATA_CURSOR
1036-
RT_DATA_SCRIPT
1037-
RT_DATA_RAW
1038-
)
1039-
10401025
/**This structure is used by #SCN_DATA_LOADED notification.
10411026
*\copydoc SCN_DATA_LOADED
10421027
**/
@@ -1281,19 +1266,19 @@ type CallbackHandler struct {
12811266
OnPostedNotification func(params *ScnPostedNotification) int
12821267

12831268
/**This notification is sent when the engine encounters critical rendering error: e.g. DirectX gfx driver error.
1284-
Most probably bad gfx drivers.
1269+
Most probably bad gfx drivers.
12851270
1286-
* \param lParam #LPSCN_GRAPHICS_CRITICAL_FAILURE
1287-
*
1288-
**/
1271+
* \param lParam #LPSCN_GRAPHICS_CRITICAL_FAILURE
1272+
*
1273+
**/
12891274
OnGraphicsCriticalFailure func() int
12901275

12911276
/**This notification is sent when the engine needs keyboard to be present on screen
1292-
E.g. when <input|text> gets focus
1277+
E.g. when <input|text> gets focus
12931278
1294-
* \param lParam #LPSCN_KEYBOARD_REQUEST
1295-
*
1296-
**/
1279+
* \param lParam #LPSCN_KEYBOARD_REQUEST
1280+
*
1281+
**/
12971282
OnKeyboardRequest func(params *ScnKeyboardRequest) int
12981283

12991284
/**This notification is sent when the engine needs some area to be redrawn
@@ -1352,10 +1337,10 @@ const (
13521337

13531338
SCITER_ALPHA_WINDOW = 12 // hWnd, value - TRUE/FALSE - window uses per pixel alpha (e.g. WS_EX_LAYERED/UpdateLayeredWindow() window)
13541339

1355-
SCITER_SET_INIT_SCRIPT = 13 // hWnd - N/A , value LPCSTR - UTF-8 encoded script source to be loaded into each view before any other script execution.
1356-
// The engine copies this string inside the call.
1340+
SCITER_SET_INIT_SCRIPT = 13 // hWnd - N/A , value LPCSTR - UTF-8 encoded script source to be loaded into each view before any other script execution.
1341+
// The engine copies this string inside the call.
13571342

1358-
SCITER_SET_MAIN_WINDOW = 14 // hWnd, value - TRUE/FALSE - window is main, will destroy all other dependent windows on close
1343+
SCITER_SET_MAIN_WINDOW = 14 // hWnd, value - TRUE/FALSE - window is main, will destroy all other dependent windows on close
13591344

13601345
SCITER_SET_MAX_HTTP_DATA_LENGTH = 15 // hWnd - N/A , value - max request length in megabytes (1024*1024 bytes)
13611346
)

0 commit comments

Comments
 (0)