Compare commits

...
29 Commits
Author SHA1 Message Date
Vincent Wei 6d287f72e3 change default exdriver for DRM engine: libhidrmdrivers-0.2.so.0 2020-03-27 16:46:20 +08:00
Vincent Wei bbac3b1796 fix compilation errors 2020-03-27 16:44:14 +08:00
Vincent Wei e25fbb39d0 for clients under MiniGUI-Processes, use the video information in shared resource segment to initialize the video 2020-03-27 16:28:30 +08:00
Vincent Wei 1b42c853ba change version to 4.0.7 2020-03-25 15:32:27 +08:00
Vincent Wei a932bc798e call EmptyClipRgn for the temporary clipping region 2020-03-25 15:32:16 +08:00
Vincent Wei 713fd0ccb8 reset olddownkey to zero when got a KEYUP event 2020-03-25 15:31:49 +08:00
Vincent Wei 1a63b30d32 use 0x01UL for shift 2020-03-25 15:31:31 +08:00
Vincent Wei 7ba6246dd1 fix typos 2020-03-25 15:31:14 +08:00
Vincent Wei 190b2fea97 release notes for 4.0.7 2020-03-22 13:21:56 +08:00
Vincent Wei f2c2c28e62 map hardware surface as scanout framebuffer for clients 2020-03-22 13:10:22 +08:00
Vincent Wei 837f2987fd remove conditional compilation for request ids 2020-03-22 13:09:42 +08:00
Vincent Wei 7de60f2b94 tune for call JoinLayer first 2020-03-22 13:09:18 +08:00
Vincent Wei 018340f42e check whether using external driver before calling flush_driver 2020-03-22 12:48:04 +08:00
Vincent Wei d4b226d2a5 fix a compilation error 2020-03-21 22:04:33 +08:00
Vincent Wei 699a68a9ac tune constant macros 2020-03-21 21:59:12 +08:00
Vincent Wei 5a6705d8bc copy chagnes from 5.0.0 to enhance DRM engine to support PROCS runmode 2020-03-21 21:30:31 +08:00
Vincent Wei e7cc2f1e35 change version to 4.0.7; DRM engine now support procs runmode 2020-03-21 21:29:44 +08:00
Vincent Wei 03b1dd9042 change version to 4.0.6 2020-03-12 11:16:59 +08:00
Vincent Wei 7651fbda35 handling mdev in INPUT structure 2020-03-12 11:15:59 +08:00
Vincent Wei 6927a22507 cleanup 2020-03-12 11:15:31 +08:00
Vincent Wei c640565f3b fix conditional compilation errors. 2020-03-12 11:15:17 +08:00
Vincent Wei c720b2a9ca Handle middle mouse button in Standalone and Processes runtime modes. 2020-03-12 11:14:40 +08:00
Vincent Wei 8b24b1243b bugfixing: Bad checking pci_accel_driver in FBCON engine 2020-03-12 11:14:04 +08:00
Vincent Wei d8b2895527 bugfixing: Bad checking cursor width and height in LoadCursorFromMem 2020-03-12 11:13:39 +08:00
Vincent Wei 2a4ead5e0f Call ThrowAwayMessages when failed to create a main window. 2020-03-12 11:13:20 +08:00
Vincent Wei 6f15548dc4 bugfixing: Bad handling of backspace character in SLEdit control. 2020-03-12 11:12:58 +08:00
Vincent Wei ef9048c582 restore mdev field in INPUT structure 2020-03-12 11:12:21 +08:00
Vincent Wei da15a1dbd5 change version to 4.0.6; make fbcon, console, imps2, textmode enabled by default 2020-03-12 11:11:55 +08:00
Vincent Wei 32aad95e7b notes for version 4.0.6 2020-03-12 11:10:27 +08:00
35 changed files with 2330 additions and 1759 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Processes)"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = v4.0.4 PROJECT_NUMBER = v4.0.7
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.4 OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.7
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and
+2 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Standalone)"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = v4.0.4 PROJECT_NUMBER = v4.0.7
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.4 OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.7
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and
+2 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Threads)"
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = v4.0.4 PROJECT_NUMBER = v4.0.7
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.4 OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.7
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and
+95 -388
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,8 +1,8 @@
Version 4.0.5 (2020/01/10) Version 4.0.7 (2020/03/30)
This release needs the following packages: This release needs the following packages:
- The resource package: `minigui-res-4.0.0.tar.gz` - The resource package: `minigui-res-4.0.0.tar.gz`
- The sample package: `mg-samples-4.0.1.tar.gz` - The sample package: `mg-samples-4.0.1.tar.gz`
- The test cases package: `mg-tests-4.0.4.tar.gz` - The test cases package: `mg-tests-4.0.7.tar.gz`
+27 -31
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT(libminigui, 4.0.5) AC_INIT(libminigui, 4.0.7)
AC_CONFIG_SRCDIR(src/main/main.c) AC_CONFIG_SRCDIR(src/main/main.c)
dnl Set various version strings - taken gratefully from the SDL sources dnl Set various version strings - taken gratefully from the SDL sources
@@ -16,9 +16,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
# #
MINIGUI_MAJOR_VERSION=4 MINIGUI_MAJOR_VERSION=4
MINIGUI_MINOR_VERSION=0 MINIGUI_MINOR_VERSION=0
MINIGUI_MICRO_VERSION=5 MINIGUI_MICRO_VERSION=7
MINIGUI_INTERFACE_AGE=1 MINIGUI_INTERFACE_AGE=0
MINIGUI_BINARY_AGE=1 MINIGUI_BINARY_AGE=0
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
AC_SUBST(MINIGUI_MAJOR_VERSION) AC_SUBST(MINIGUI_MAJOR_VERSION)
@@ -120,13 +120,13 @@ build_net_ial_engine="no"
dnl common IAL engines dnl common IAL engines
build_libinput_ial_engine="yes" build_libinput_ial_engine="yes"
build_console_ial_engine="no" build_console_ial_engine="yes"
build_console_ps2="no" build_console_ps2="no"
build_console_imps2="no" build_console_imps2="yes"
build_console_ms="no" build_console_ms="no"
build_console_ms3="no" build_console_ms3="no"
build_console_gpm="no" build_console_gpm="no"
build_text_mode="no" build_text_mode="yes"
dnl the customized ial engine dnl the customized ial engine
build_dlcustom_ial_engine="no" build_dlcustom_ial_engine="no"
@@ -265,7 +265,7 @@ enable_video_dfb_st7167="no"
enable_video_stgfb="no" enable_video_stgfb="no"
enable_video_drm="yes" enable_video_drm="yes"
enable_video_fbcon="no" enable_video_fbcon="yes"
enable_video_commlcd="no" enable_video_commlcd="no"
enable_video_shadow="no" enable_video_shadow="no"
enable_video_mlshadow="no" enable_video_mlshadow="no"
@@ -470,7 +470,7 @@ AC_ARG_ENABLE(libinputial,
build_libinput_ial_engine=$enableval) build_libinput_ial_engine=$enableval)
AC_ARG_ENABLE(consoleial, AC_ARG_ENABLE(consoleial,
[ --enable-consoleial build the console (Linux console) IAL engine <default=no>], [ --enable-consoleial build the console (Linux console) IAL engine <default=yes>],
build_console_ial_engine=$enableval) build_console_ial_engine=$enableval)
AC_ARG_ENABLE(consoleps2, AC_ARG_ENABLE(consoleps2,
@@ -478,7 +478,7 @@ AC_ARG_ENABLE(consoleps2,
build_console_ps2=$enableval) build_console_ps2=$enableval)
AC_ARG_ENABLE(consoleimps2, AC_ARG_ENABLE(consoleimps2,
[ --enable-consoleimps2 build the console engine subdriver for IntelligentMouse (IMPS/2) mouse <default=no>], [ --enable-consoleimps2 build the console engine subdriver for IntelligentMouse (IMPS/2) mouse <default=yes>],
build_console_imps2=$enableval) build_console_imps2=$enableval)
AC_ARG_ENABLE(consolems, AC_ARG_ENABLE(consolems,
@@ -494,7 +494,7 @@ AC_ARG_ENABLE(consolegpm,
build_console_gpm=$enableval) build_console_gpm=$enableval)
AC_ARG_ENABLE(textmode, AC_ARG_ENABLE(textmode,
[ --enable-textmode Linux system have console (text mode) on FrameBuffer <default=no>], [ --enable-textmode Linux system have console (text mode) on FrameBuffer <default=yes>],
build_text_mode=$enableval) build_text_mode=$enableval)
AC_ARG_ENABLE(rbfsupport, AC_ARG_ENABLE(rbfsupport,
@@ -885,26 +885,22 @@ CheckFBCON()
dnl Find the DRM includes dnl Find the DRM includes
CheckDRM() CheckDRM()
{ {
if test "x$runtime_mode" = "xprocs"; then AC_ARG_ENABLE(videodrm,
enable_video_drm="no; DRI engine does not support MiniGUI-Processes runtime mode currently" [ --enable-videodrm include Linux DRI NEWGAL engine <default=yes>],
else enable_video_drm=$enableval)
AC_ARG_ENABLE(videodrm, if test "x$enable_video_drm" = "xyes"; then
[ --enable-videodrm include Linux DRI NEWGAL engine <default=yes>], PKG_CHECK_MODULES(DRM, [libdrm >= 2.4], video_drm="yes",
enable_video_drm=$enableval) video_drm="no; Linux DRI NEWGAL engine requires libdrm 2.4+")
if test "x$enable_video_drm" = "xyes"; then if test "x$video_drm" = "xyes"; then
PKG_CHECK_MODULES(DRM, [libdrm >= 2.4], video_drm="yes", AC_DEFINE(_MGGAL_DRM, 1,
video_drm="no; Linux DRI NEWGAL engine requires libdrm 2.4+") [Define if include Linux DRI NEWGAL engine])
if test "x$video_drm" = "xyes"; then VIDEO_SUBDIRS="$VIDEO_SUBDIRS drm"
AC_DEFINE(_MGGAL_DRM, 1, VIDEO_DRIVERS="$VIDEO_DRIVERS drm/libvideo_drm.la"
[Define if include Linux DRI NEWGAL engine]) DEP_LIBS="$DEP_LIBS -ldrm -ldl"
VIDEO_SUBDIRS="$VIDEO_SUBDIRS drm" DRM_INC_DIR="`$PKG_CONFIG --variable includedir libdrm`/libdrm"
VIDEO_DRIVERS="$VIDEO_DRIVERS drm/libvideo_drm.la" AC_SUBST(DRM_INC_DIR)
DEP_LIBS="$DEP_LIBS -ldrm -ldl" else
DRM_INC_DIR="`$PKG_CONFIG --variable includedir libdrm`/libdrm" AC_MSG_WARN([$video_drm])
AC_SUBST(DRM_INC_DIR)
else
AC_MSG_WARN([$video_drm])
fi
fi fi
fi fi
} }
+1 -1
View File
@@ -55,7 +55,7 @@ dpi=96
# The filename of the shared library for the external driver. # The filename of the shared library for the external driver.
# The equivalent environment variable: MG_GAL_DRM_DRIVER # The equivalent environment variable: MG_GAL_DRM_DRIVER
exdriver=libhidrmdrivers.so.0 exdriver=libhidrmdrivers-0.2.so.0
#}} #}}
#{{ifdef _MGIAL_LIBINPUT #{{ifdef _MGIAL_LIBINPUT
+3
View File
@@ -234,6 +234,9 @@ typedef struct tagINPUT {
// New wait event method for getting extra input events; since 4.0.0 // New wait event method for getting extra input events; since 4.0.0
int (*wait_event_ex) (int maxfd, fd_set *in, fd_set *out, int (*wait_event_ex) (int maxfd, fd_set *in, fd_set *out,
fd_set *except, struct timeval *timeout, EXTRA_INPUT_EVENT* extra); fd_set *except, struct timeval *timeout, EXTRA_INPUT_EVENT* extra);
/* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
char* mdev;
} INPUT; } INPUT;
#ifdef __cplusplus #ifdef __cplusplus
+313 -84
View File
File diff suppressed because it is too large Load Diff
+49 -16
View File
@@ -13734,14 +13734,18 @@ MG_EXPORT int drmGetDeviceFD (GHANDLE video);
* THe struct type defines the DRM surface information. * THe struct type defines the DRM surface information.
*/ */
typedef struct _DrmSurfaceInfo { typedef struct _DrmSurfaceInfo {
/** The prime fd of the buffer object. */
int prime_fd;
/** The global name of the buffer object. */
uint32_t name;
/** The local handle of the buffer object. */ /** The local handle of the buffer object. */
uint32_t handle; uint32_t handle;
/** The buffer identifier. */ /** The prime fd of the buffer object. If it was no exported as a global
uint32_t id; buffer object, it has the value -1. */
int prime_fd;
/** The global name of the buffer object. It has the value 0 when it was
not expored as global buffer object. */
uint32_t name;
/** The frame buffer identifier. If the buffer was not added as
a frame buffer to the system, it has the value 0. */
uint32_t fb_id;
/** The width of the surface. */ /** The width of the surface. */
uint32_t width; uint32_t width;
/** The height of the surface. */ /** The height of the surface. */
@@ -13751,7 +13755,9 @@ typedef struct _DrmSurfaceInfo {
/** The DRM pixel format. */ /** The DRM pixel format. */
uint32_t drm_format; uint32_t drm_format;
/** Size in bytes of the buffer object. */ /** Size in bytes of the buffer object. */
unsigned long size; size_t size;
/** The offset from the buffer start to the real pixel data. */
off_t offset;
} DrmSurfaceInfo; } DrmSurfaceInfo;
/** /**
@@ -13773,15 +13779,24 @@ MG_EXPORT BOOL drmGetSurfaceInfo (GHANDLE video, HDC hdc, DrmSurfaceInfo* info);
* \param video The video handle. * \param video The video handle.
* \param name The name handle of the DRM surface. * \param name The name handle of the DRM surface.
* \param drm_format The DRM pixel format. * \param drm_format The DRM pixel format.
* \param offset The offset from the buffer start to the real pixel data.
* \param width The width of the DRM surface. * \param width The width of the DRM surface.
* \param height The height of the DRM surface. * \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface. * \param pitch The pitch (row stride) of the DRM surface.
* *
* \return The handle to the memory DC for success, HDC_INVALID for failure. * \return The handle to the memory DC for success, HDC_INVALID for failure.
*/ */
MG_EXPORT HDC drmCreateDCFromName (GHANDLE video, MG_EXPORT HDC drmCreateDCFromNameEx (GHANDLE video,
uint32_t name, uint32_t drm_format, uint32_t name, uint32_t drm_format, off_t offset,
unsigned int width, unsigned int height, uint32_t pitch); uint32_t width, uint32_t height, uint32_t pitch);
static inline HDC drmCreateDCFromName (GHANDLE video,
uint32_t name, uint32_t drm_format,
uint32_t width, uint32_t height, uint32_t pitch)
{
return drmCreateDCFromNameEx (video,
name, drm_format, 0, width, height, pitch);
}
/** /**
* This function creates a memory DC with a DRM surface which is created by * This function creates a memory DC with a DRM surface which is created by
@@ -13791,15 +13806,24 @@ MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
* \param prime_fd The PRIME file descriptor. * \param prime_fd The PRIME file descriptor.
* \param size The size of the DRM surface in bytes. * \param size The size of the DRM surface in bytes.
* \param drm_format The DRM pixel format. * \param drm_format The DRM pixel format.
* \param offset The offset from the buffer start to the real pixel data.
* \param width The width of the DRM surface. * \param width The width of the DRM surface.
* \param height The height of the DRM surface. * \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface. * \param pitch The pitch (row stride) of the DRM surface.
* *
* \return The handle to the memory DC for success, HDC_INVALID for failure. * \return The handle to the memory DC for success, HDC_INVALID for failure.
*/ */
MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video, MG_EXPORT HDC drmCreateDCFromPrimeFdEx (GHANDLE video,
int prime_fd, unsigned long size, uint32_t drm_format, int prime_fd, size_t size, uint32_t drm_format, off_t offset,
unsigned int width, unsigned int height, uint32_t pitch); uint32_t width, uint32_t height, uint32_t pitch);
static inline HDC drmCreateDCFromPrimeFd (GHANDLE video,
int prime_fd, size_t size, uint32_t drm_format,
uint32_t width, uint32_t height, uint32_t pitch)
{
return drmCreateDCFromPrimeFdEx (video,
prime_fd, size, drm_format, 0, width, height, pitch);
}
/** /**
* This function creates a memory DC with a DRM surface which is created by * This function creates a memory DC with a DRM surface which is created by
@@ -13809,15 +13833,24 @@ MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
* \param handle The handle of the DRM surface. * \param handle The handle of the DRM surface.
* \param size The size of the DRM surface in bytes. * \param size The size of the DRM surface in bytes.
* \param drm_format The DRM pixel format. * \param drm_format The DRM pixel format.
* \param offset The offset from the buffer start to the real pixel data.
* \param width The width of the DRM surface. * \param width The width of the DRM surface.
* \param height The height of the DRM surface. * \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface. * \param pitch The pitch (row stride) of the DRM surface.
* *
* \return The handle to the memory DC for success, HDC_INVALID for failure. * \return The handle to the memory DC for success, HDC_INVALID for failure.
*/ */
MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video, MG_EXPORT HDC drmCreateDCFromHandleEx (GHANDLE video,
uint32_t handle, unsigned long size, uint32_t drm_format, uint32_t handle, size_t size, uint32_t drm_format, off_t offset,
unsigned int width, unsigned int height, uint32_t pitch); uint32_t width, uint32_t height, uint32_t pitch);
static inline HDC drmCreateDCFromHandle (GHANDLE video,
uint32_t handle, size_t size, uint32_t drm_format,
uint32_t width, uint32_t height, uint32_t pitch)
{
return drmCreateDCFromHandleEx (video,
handle, size, drm_format, 0, width, height, pitch);
}
/** @} end of gdi_drm_fns */ /** @} end of gdi_drm_fns */
+6 -9
View File
@@ -175,15 +175,12 @@ int GUIAPI ClientRequestEx (const REQUEST* request, const void* ex_data, int ex_
if (mgIsServer) if (mgIsServer)
return -1; return -1;
#ifdef _MGGAL_MLSHADOW if (__mg_client_id == 0 &&
if ((request->id != REQID_MLSHADOW_CLIREQ) request->id != REQID_AUTHCLIENT &&
&& (__mg_client_id == 0 && request->id != REQID_JOINLAYER)) { request->id != REQID_GETSHAREDSURFACE &&
#elif defined(_MGGAL_NEXUS) request->id != REQID_NEXUS_CLIENT_GET_SURFACE &&
if ((request->id != REQID_NEXUS_CLIENT_GET_SURFACE) request->id != REQID_MLSHADOW_CLIREQ &&
&& (__mg_client_id == 0 && request->id != REQID_JOINLAYER)) { request->id != REQID_JOINLAYER) {
#else
if (__mg_client_id == 0 && request->id != REQID_JOINLAYER) {
#endif
fprintf (stderr, "CLIENT: please call JoinLayer first.\n"); fprintf (stderr, "CLIENT: please call JoinLayer first.\n");
exit (255); exit (255);
return -1; return -1;
+2 -1
View File
@@ -2147,7 +2147,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
return 0; return 0;
} }
if (wParam == '\b') { //backspace /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
if (charBuffer [0] == '\b') { //backspace
int del; int del;
if (sled->editPos == 0 && sled->selStart == sled->selEnd) if (sled->editPos == 0 && sled->selStart == sled->selEnd)
+3
View File
@@ -3824,6 +3824,9 @@ HWND GUIAPI CreateMainWindowEx (PMAINWINCREATE pCreateInfo,
return (HWND)pWin; return (HWND)pWin;
err: err:
/* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
ThrowAwayMessages ((HWND)pWin);
#ifdef _MGRM_THREADS #ifdef _MGRM_THREADS
if (pWin->pMessages && pWin->pHosting == NULL) { if (pWin->pMessages && pWin->pHosting == NULL) {
mg_FreeMsgQueueThisThread (); mg_FreeMsgQueueThisThread ();
+9 -5
View File
@@ -133,8 +133,7 @@
#include "linux-libinput.h" #include "linux-libinput.h"
#endif #endif
#define LEN_ENGINE_NAME 16 #define LEN_MTYPE_NAME 23
#define LEN_MTYPE_NAME 16
static INPUT inputs [] = static INPUT inputs [] =
{ {
@@ -291,7 +290,8 @@ int mg_InitIAL (void)
return ERR_NO_MATCH; return ERR_NO_MATCH;
} }
//strcpy (__mg_cur_input->mdev, mdev); /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
__mg_cur_input->mdev = strdup (mdev);
if (!IAL_InitInput (__mg_cur_input, mdev, mtype)) { if (!IAL_InitInput (__mg_cur_input, mdev, mtype)) {
_ERR_PRINTF ("IAL: Failed to initialize the IAL engine: %s.\n", __mg_cur_input->id); _ERR_PRINTF ("IAL: Failed to initialize the IAL engine: %s.\n", __mg_cur_input->id);
@@ -306,8 +306,12 @@ int mg_InitIAL (void)
void mg_TerminateIAL (void) void mg_TerminateIAL (void)
{ {
if (__mg_cur_input && __mg_cur_input->term_input) { if (__mg_cur_input) {
IAL_TermInput (); if (__mg_cur_input->mdev)
free (__mg_cur_input->mdev);
if (__mg_cur_input->term_input)
IAL_TermInput ();
} }
} }
+21 -10
View File
@@ -75,32 +75,43 @@
#define REQID_HWSURFACE 0x0013 #define REQID_HWSURFACE 0x0013
#ifdef _MGHAVE_CLIPBOARD
#define REQID_CLIPBOARD 0x0014 #define REQID_CLIPBOARD 0x0014
#endif
#ifdef _MGGAL_MLSHADOW
#define REQID_MLSHADOW_CLIREQ 0x0015 #define REQID_MLSHADOW_CLIREQ 0x0015
#endif
#define REQID_ZORDERMASKRECTOP 0x0016 #define REQID_ZORDERMASKRECTOP 0x0016
#ifdef _MGGAL_NEXUS
#define REQID_NEXUS_CLIENT_GET_SURFACE 0x0017 #define REQID_NEXUS_CLIENT_GET_SURFACE 0x0017
#endif
#ifdef _MGGAL_SIGMA8654
#define REQID_SIGMA8654_CLIENT_GET_SURFACE 0x0018 #define REQID_SIGMA8654_CLIENT_GET_SURFACE 0x0018
#endif
#define REQID_GETIMEPOS 0x0019 #define REQID_GETIMEPOS 0x0019
#define REQID_SETIMEPOS 0x001A #define REQID_SETIMEPOS 0x001A
#define REQID_COPYCURSOR 0x001B #define REQID_COPYCURSOR 0x001B
// Since 4.0.7: Authenticate client
#define REQID_AUTHCLIENT 0x001C
// Since 4.0.7: Get shared surface
#define REQID_GETSHAREDSURFACE 0x001D
// for sharedfb schema
#define SYSSF_REAL_SCREEN "syssf-real-screen"
/* /*
* XXX: To fellows who need to add a new REQID, please make sure your new ID _less_ than MAX_SYS_REQID (defined in /include/minigui.h). * XXX: To fellows who need to add a new REQID, please make sure your
* new ID _less_ than MAX_SYS_REQID (defined in /include/minigui.h).
*/ */
/* Since 4.0.7 */
typedef struct _SharedSurfInfo {
uint32_t flags; // the flags of the surface
uint32_t width, height;
uint32_t pitch;
uint32_t name; // when use flink name
uint32_t drm_format; // DRM pixel format
size_t size; // whole size of the surface
off_t offset; // offset of pixel data
} SHAREDSURFINFO;
typedef struct JoinLayerInfo typedef struct JoinLayerInfo
{ {
+2 -2
View File
@@ -639,14 +639,14 @@ AlertDesktopTimerEvent (void)
static inline void static inline void
SetMsgQueueTimerFlag (PMSGQUEUE pMsgQueue, int slot) SetMsgQueueTimerFlag (PMSGQUEUE pMsgQueue, int slot)
{ {
pMsgQueue->TimerMask |= (0x01 << slot); pMsgQueue->TimerMask |= (0x01UL << slot);
POST_MSGQ (pMsgQueue); POST_MSGQ (pMsgQueue);
} }
static inline void static inline void
RemoveMsgQueueTimerFlag (PMSGQUEUE pMsgQueue, int slot) RemoveMsgQueueTimerFlag (PMSGQUEUE pMsgQueue, int slot)
{ {
pMsgQueue->TimerMask &= ~(0x01 << slot); pMsgQueue->TimerMask &= ~(0x01UL << slot);
} }
BOOL mg_InitTimer (void); BOOL mg_InitTimer (void);
+32 -1
View File
@@ -57,6 +57,14 @@
#include "gdi.h" #include "gdi.h"
#define LEN_SO_NAME 127 // name length of a shared object (library)
#define LEN_DEVICE_NAME 127
#define LEN_EXDRIVER_NAME LEN_SO_NAME
#define LEN_ENGINE_NAME 23
#define LEN_VIDEO_MODE 31
#define LEN_MTYPE_NAME 23
#define LEN_FOURCC_FORMAT 7
#define DISABLE_THREADS #define DISABLE_THREADS
#define GAL_mutex int #define GAL_mutex int
@@ -757,7 +765,7 @@ extern GAL_Surface* __gal_screen;
#define GAL_BMask(surface) (surface->format->Bmask) #define GAL_BMask(surface) (surface->format->Bmask)
#define GAL_AMask(surface) (surface->format->Amask) #define GAL_AMask(surface) (surface->format->Amask)
extern int mg_InitGAL (void); extern int mg_InitGAL (char* engine, char* mode);
/* Since 4.0.0; suspend/resume video device, for switching virtual terminals */ /* Since 4.0.0; suspend/resume video device, for switching virtual terminals */
extern int GAL_SuspendVideo(void); extern int GAL_SuspendVideo(void);
@@ -778,6 +786,29 @@ extern BYTE* gal_PutPixelKeyAlpha (GAL_Surface* dst,
#define mg_TerminateGAL GAL_VideoQuit #define mg_TerminateGAL GAL_VideoQuit
#ifdef _MGRM_PROCESSES
/* Since 4.0.7: copy video information to the shared resource segment */
BOOL GAL_CopyVideoInfoToSharedRes (void);
#endif /* _MGRM_PROCESSES */
#ifdef _MGGAL_DRM
/* functions implemented in DRM engine. */
BOOL __drm_get_surface_info (GAL_Surface *surface, DrmSurfaceInfo* info);
int __drm_auth_client (int, uint32_t);
GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
uint32_t name, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video,
int prime_fd, size_t size, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
#endif /* defined _MGGAL_DRM */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
+37
View File
@@ -88,10 +88,30 @@ inline static key_t get_sem_key_for_layers (void)
return (key_t)(IPC_KEY_BASE + 0x03); return (key_t)(IPC_KEY_BASE + 0x03);
} }
/* constants for engine name and video mode */
#define LEN_SO_NAME 127 // name length of a shared object (library)
#define LEN_DEVICE_NAME 127
#define LEN_EXDRIVER_NAME LEN_SO_NAME
#define LEN_ENGINE_NAME 23
#define LEN_VIDEO_MODE 31
#define LEN_MTYPE_NAME 23
#define LEN_FOURCC_FORMAT 7
typedef struct tagG_RES { typedef struct tagG_RES {
int semid; int semid;
int shmid; int shmid;
/* information of NEWGAL engine; since 4.0.7 */
char video_engine [LEN_ENGINE_NAME + 1];
char video_mode [LEN_VIDEO_MODE + 1];
char video_device [LEN_DEVICE_NAME + 1];
int video_dpi, video_hres, video_vres, video_depth;
Uint32 video_rmask, video_gmask, video_bmask, video_amask;
#ifdef _MGGAL_DRM
char video_exdriver [LEN_EXDRIVER_NAME + 1];
Uint32 video_drm_format;
#endif
int nr_layers; int nr_layers;
int semid_layer; int semid_layer;
@@ -150,6 +170,23 @@ typedef struct tagG_RES {
} G_RES; } G_RES;
typedef G_RES* PG_RES; typedef G_RES* PG_RES;
#define SHAREDRES_VIDEO_ENGINE (((PG_RES)mgSharedRes)->video_engine)
#define SHAREDRES_VIDEO_MODE (((PG_RES)mgSharedRes)->video_mode)
#define SHAREDRES_VIDEO_DEVICE (((PG_RES)mgSharedRes)->video_device)
#define SHAREDRES_VIDEO_DPI (((PG_RES)mgSharedRes)->video_dpi)
#define SHAREDRES_VIDEO_HRES (((PG_RES)mgSharedRes)->video_hres)
#define SHAREDRES_VIDEO_VRES (((PG_RES)mgSharedRes)->video_vres)
#define SHAREDRES_VIDEO_DEPTH (((PG_RES)mgSharedRes)->video_depth)
#define SHAREDRES_VIDEO_RMASK (((PG_RES)mgSharedRes)->video_rmask)
#define SHAREDRES_VIDEO_GMASK (((PG_RES)mgSharedRes)->video_gmask)
#define SHAREDRES_VIDEO_BMASK (((PG_RES)mgSharedRes)->video_bmask)
#define SHAREDRES_VIDEO_AMASK (((PG_RES)mgSharedRes)->video_amask)
#ifdef _MGGAL_DRM
#define SHAREDRES_VIDEO_EXDRIVER (((PG_RES)mgSharedRes)->video_exdriver)
#define SHAREDRES_VIDEO_DRM_FORMAT (((PG_RES)mgSharedRes)->video_drm_format)
#endif
#define SHAREDRES_TIMER_COUNTER (((PG_RES)mgSharedRes)->timer_counter) #define SHAREDRES_TIMER_COUNTER (((PG_RES)mgSharedRes)->timer_counter)
#define SHAREDRES_TICK_ON_LOCKSEM (((PG_RES)mgSharedRes)->tick_on_locksem) #define SHAREDRES_TICK_ON_LOCKSEM (((PG_RES)mgSharedRes)->tick_on_locksem)
#define SHAREDRES_TIMEOUT (((PG_RES)mgSharedRes)->timeout) #define SHAREDRES_TIMEOUT (((PG_RES)mgSharedRes)->timeout)
+2 -1
View File
@@ -189,7 +189,8 @@ static HCURSOR load_cursor_from_mem (const void* area)
p += sizeof (DWORD32); p += sizeof (DWORD32);
imagew = MGUI_ReadLE32Mem (&p); imagew = MGUI_ReadLE32Mem (&p);
imageh = MGUI_ReadLE32Mem (&p); imageh = MGUI_ReadLE32Mem (&p);
if (imagew > 32 || imageh > 32) { /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
if (imagew != CURSORWIDTH || imageh != (CURSORHEIGHT*2)) {
goto error; goto error;
} }
+2
View File
@@ -458,6 +458,7 @@ BOOL kernel_GetLWEvent (int event, PLWEVENT lwe)
#endif #endif
ke->event = KE_KEYUP; ke->event = KE_KEYUP;
ke->scancode = i; ke->scancode = i;
olddownkey = 0;
break; break;
} }
} }
@@ -762,6 +763,7 @@ BOOL kernel_GetLWEvent (int event, PLWEVENT lwe)
if(oldkeystate[i] && !keystate[i]) { if(oldkeystate[i] && !keystate[i]) {
ke->event = KE_KEYUP; ke->event = KE_KEYUP;
ke->scancode = i; ke->scancode = i;
olddownkey = 0;
break; break;
} }
} }
+22 -2
View File
@@ -108,6 +108,8 @@ void kernel_ShowCursorForGDI(BOOL fShow, void* pdc)
int InitGUI (int argc, const char* agr[]) int InitGUI (int argc, const char* agr[])
{ {
char engine [LEN_ENGINE_NAME + 1];
char mode [LEN_VIDEO_MODE + 1];
int step = 1; int step = 1;
__mg_quiting_stage = _MG_QUITING_STAGE_RUNNING; __mg_quiting_stage = _MG_QUITING_STAGE_RUNNING;
@@ -135,7 +137,7 @@ int InitGUI (int argc, const char* agr[])
step++; step++;
/* Init GAL engine. */ /* Init GAL engine. */
switch (mg_InitGAL ()) { switch (mg_InitGAL (engine, mode)) {
case ERR_CONFIG_FILE: case ERR_CONFIG_FILE:
err_message (step, "Reading configuration failure!"); err_message (step, "Reading configuration failure!");
return step; return step;
@@ -302,6 +304,8 @@ static BOOL InstallSEGVHandler (void)
int InitGUI (int argc, const char* agr[]) int InitGUI (int argc, const char* agr[])
{ {
char engine [LEN_ENGINE_NAME + 1];
char mode [LEN_VIDEO_MODE + 1];
int step = 1; int step = 1;
__mg_quiting_stage = _MG_QUITING_STAGE_RUNNING; __mg_quiting_stage = _MG_QUITING_STAGE_RUNNING;
@@ -379,7 +383,7 @@ int InitGUI (int argc, const char* agr[])
#endif #endif
/* Init GAL engine. */ /* Init GAL engine. */
switch (mg_InitGAL ()) { switch (mg_InitGAL (engine, mode)) {
case ERR_CONFIG_FILE: case ERR_CONFIG_FILE:
err_message (step, "Reading configuration failure!"); err_message (step, "Reading configuration failure!");
return step; return step;
@@ -444,6 +448,22 @@ int InitGUI (int argc, const char* agr[])
} }
atexit (kernel_UnloadSharedResource); atexit (kernel_UnloadSharedResource);
SHAREDRES_TERMIOS = savedtermio; SHAREDRES_TERMIOS = savedtermio;
/* Since 4.0.7
* Copy the video engine information to the shared resource segement
*/
strncpy (SHAREDRES_VIDEO_ENGINE, engine, LEN_ENGINE_NAME);
strncpy (SHAREDRES_VIDEO_MODE, mode, LEN_VIDEO_MODE);
SHAREDRES_VIDEO_DPI = __gal_screen->dpi;
SHAREDRES_VIDEO_HRES = __gal_screen->w;
SHAREDRES_VIDEO_VRES = __gal_screen->h;
SHAREDRES_VIDEO_DEPTH = __gal_screen->format->BitsPerPixel;
SHAREDRES_VIDEO_RMASK = __gal_screen->format->Rmask;
SHAREDRES_VIDEO_GMASK = __gal_screen->format->Gmask;
SHAREDRES_VIDEO_BMASK = __gal_screen->format->Bmask;
SHAREDRES_VIDEO_AMASK = __gal_screen->format->Amask;
GAL_CopyVideoInfoToSharedRes();
} }
step++; step++;
+3 -1
View File
@@ -419,6 +419,8 @@ static BOOL InstallSEGVHandler (void)
int GUIAPI InitGUI (int args, const char *agr[]) int GUIAPI InitGUI (int args, const char *agr[])
{ {
char engine [LEN_ENGINE_NAME + 1];
char mode [LEN_VIDEO_MODE + 1];
int step = 0; int step = 0;
__mg_quiting_stage = _MG_QUITING_STAGE_RUNNING; __mg_quiting_stage = _MG_QUITING_STAGE_RUNNING;
@@ -464,7 +466,7 @@ int GUIAPI InitGUI (int args, const char *agr[])
} }
step++; step++;
switch (mg_InitGAL ()) { switch (mg_InitGAL (engine, mode)) {
case ERR_CONFIG_FILE: case ERR_CONFIG_FILE:
fprintf (stderr, fprintf (stderr,
"KERNEL>InitGUI: Reading configuration failure!\n"); "KERNEL>InitGUI: Reading configuration failure!\n");
+1498 -1080
View File
File diff suppressed because it is too large Load Diff
+9 -19
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2019, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2019 ~ 2020, Beijing FMSoft Technologies Co., Ltd.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -55,13 +55,18 @@
/* Private display data */ /* Private display data */
#define LEN_DEVICE_NAME 31
typedef struct drm_mode_info DrmModeInfo; typedef struct drm_mode_info DrmModeInfo;
typedef struct GAL_PrivateVideoData { typedef struct GAL_PrivateVideoData {
char dev_name[LEN_DEVICE_NAME + 1]; char* dev_name;
char* ex_driver;
GAL_Surface* real_screen;
int dev_fd; int dev_fd;
/* capabilities */
uint32_t scanout_buff_id;
/* the global names of real screen and shadow screen */
uint32_t real_name;
uint32_t cap_dumb:1;
void* exdrv_handle; void* exdrv_handle;
DrmDriverOps* driver_ops; DrmDriverOps* driver_ops;
@@ -70,23 +75,8 @@ typedef struct GAL_PrivateVideoData {
DrmModeInfo* mode_list; DrmModeInfo* mode_list;
GAL_Rect** modes; GAL_Rect** modes;
int bpp;
uint32_t width;
uint32_t height;
uint32_t pitch;
uint32_t size;
uint32_t scanout_buff_id;
uint8_t* scanout_fb;
DrmModeInfo* saved_info; DrmModeInfo* saved_info;
drmModeCrtc* saved_crtc; drmModeCrtc* saved_crtc;
/* only valid when using DUMB frame buffer */
uint32_t handle;
/* only valid when using DRM driver */
uint32_t console_buff_id;
} DrmVideoData; } DrmVideoData;
#endif /* _NEWGAL_DRIVIDEO_H */ #endif /* _NEWGAL_DRIVIDEO_H */
+4 -2
View File
@@ -707,7 +707,8 @@ static GAL_Surface *FB_SetVideoMode(_THIS, GAL_Surface *current,
} }
#ifdef _MGHAVE_PCIACCESS #ifdef _MGHAVE_PCIACCESS
if (pci_accel_driver) /* Init accelerated hardware via pciaccess */ /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
if (pci_accel_driver > 0) /* Init accelerated hardware via pciaccess */
FB_InitPCIAccelDriver (this, current); FB_InitPCIAccelDriver (this, current);
#endif #endif
@@ -1196,7 +1197,8 @@ static void FB_VideoQuit(_THIS)
} }
#ifdef _MGHAVE_PCIACCESS #ifdef _MGHAVE_PCIACCESS
if (pci_accel_driver) { /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
if (pci_accel_driver > 0) {
FB_CleanupPCIAccelDriver (this); FB_CleanupPCIAccelDriver (this);
pci_accel_driver = 0; pci_accel_driver = 0;
} }
-10
View File
@@ -74,16 +74,6 @@ struct GAL_PrivateVideoData {
int saved_cmaplen; int saved_cmaplen;
__u16 *saved_cmap; __u16 *saved_cmap;
#if 0
int current_vt;
int saved_vt;
int keyboard_fd;
int saved_kbd_mode;
struct termios saved_kbd_termios;
int mouse_fd;
#endif
#ifdef _MGHAVE_PCIACCESS #ifdef _MGHAVE_PCIACCESS
int pci_accel_driver; int pci_accel_driver;
#endif #endif
+77 -28
View File
@@ -61,11 +61,13 @@
#include "misc.h" #include "misc.h"
#include "license.h" #include "license.h"
#ifdef _MGRM_PROCESSES
#include "sharedres.h"
#endif
GAL_Surface* __gal_screen; GAL_Surface* __gal_screen;
#define LEN_ENGINE_NAME 10 #define LEN_MODE LEN_VIDEO_MODE
#define LEN_MODE 20
BOOL GAL_ParseVideoMode (const char* mode, int* w, int* h, int* depth) BOOL GAL_ParseVideoMode (const char* mode, int* w, int* h, int* depth)
{ {
@@ -87,20 +89,11 @@ BOOL GAL_ParseVideoMode (const char* mode, int* w, int* h, int* depth)
return TRUE; return TRUE;
} }
int mg_InitGAL (void) static void get_engine_from_etc (char* engine)
{ {
int i;
int w, h, depth;
char engine [LEN_ENGINE_NAME + 1];
char mode [LEN_MODE + 1];
#if defined (WIN32) || !defined(__NOUNIX__) #if defined (WIN32) || !defined(__NOUNIX__)
char* env_value; char* env_value;
#endif
LICENSE_CHECK_CUSTIMER_ID ();
#ifndef __NOUNIX__
if ((env_value = getenv ("MG_GAL_ENGINE"))) { if ((env_value = getenv ("MG_GAL_ENGINE"))) {
strncpy (engine, env_value, LEN_ENGINE_NAME); strncpy (engine, env_value, LEN_ENGINE_NAME);
engine [LEN_ENGINE_NAME] = '\0'; engine [LEN_ENGINE_NAME] = '\0';
@@ -109,7 +102,7 @@ int mg_InitGAL (void)
#endif #endif
#ifndef _MG_MINIMALGDI #ifndef _MG_MINIMALGDI
if (GetMgEtcValue ("system", "gal_engine", engine, LEN_ENGINE_NAME) < 0) { if (GetMgEtcValue ("system", "gal_engine", engine, LEN_ENGINE_NAME) < 0) {
return ERR_CONFIG_FILE; engine [0] = '\0';
} }
#else /* _MG_MINIMALGDI */ #else /* _MG_MINIMALGDI */
# ifdef _MGGAL_PCXVFB # ifdef _MGGAL_PCXVFB
@@ -118,23 +111,75 @@ int mg_InitGAL (void)
strcpy(engine, "dummy"); strcpy(engine, "dummy");
# endif # endif
#endif /* _MG_MINIMALGDI */ #endif /* _MG_MINIMALGDI */
}
static void get_mode_from_etc (const char* engine, char* mode)
{
#if defined (WIN32) || !defined(__NOUNIX__)
char* env_value;
if ((env_value = getenv ("MG_DEFAULTMODE"))) {
strncpy (mode, env_value, LEN_VIDEO_MODE);
mode [LEN_VIDEO_MODE] = '\0';
}
else
#endif
if (GetMgEtcValue (engine, "defaultmode", mode, LEN_VIDEO_MODE) < 0)
if (GetMgEtcValue ("system", "defaultmode", mode, LEN_VIDEO_MODE) < 0)
mode [0] = '\0';
}
static int get_dpi_from_etc (const char* engine)
{
int dpi;
if (GetMgEtcIntValue (engine, "dpi", &dpi) < 0)
dpi = GDCAP_DPI_DEFAULT;
else if (dpi < GDCAP_DPI_MINIMAL)
dpi = GDCAP_DPI_MINIMAL;
return dpi;
}
int mg_InitGAL (char* engine, char* mode)
{
int i;
int w, h, depth;
#ifdef _MGRM_PROCESSES
if (mgIsServer) {
get_engine_from_etc (engine);
}
else {
strncpy (engine, SHAREDRES_VIDEO_ENGINE, LEN_ENGINE_NAME);
engine [LEN_ENGINE_NAME] = '\0';
strncpy (mode, SHAREDRES_VIDEO_MODE, LEN_VIDEO_MODE);
mode [LEN_VIDEO_MODE] = '\0';
#ifdef _MGSCHEMA_COMPOSITING
need_set_mode = FALSE;
#endif
}
#else
get_engine_from_etc (engine);
#endif /* _MGRM_PROCESSES */
if (engine[0] == 0) {
return ERR_CONFIG_FILE;
}
if (GAL_VideoInit (engine, 0)) { if (GAL_VideoInit (engine, 0)) {
GAL_VideoQuit (); GAL_VideoQuit ();
fprintf (stderr, "NEWGAL: Does not find matched engine: %s.\n", engine); fprintf (stderr, "NEWGAL: Does not find matched engine: %s.\n", engine);
return ERR_NO_MATCH; return ERR_NO_MATCH;
} }
#if defined (WIN32) || !defined(__NOUNIX__) get_mode_from_etc (engine, mode);
if ((env_value = getenv ("MG_DEFAULTMODE"))) {
strncpy (mode, env_value, LEN_MODE); if (mode[0] == 0) {
mode [LEN_MODE] = '\0'; return ERR_CONFIG_FILE;
} }
else
#endif
if (GetMgEtcValue (engine, "defaultmode", mode, LEN_MODE) < 0)
if (GetMgEtcValue ("system", "defaultmode", mode, LEN_MODE) < 0)
return ERR_CONFIG_FILE;
if (!GAL_ParseVideoMode (mode, &w, &h, &depth)) { if (!GAL_ParseVideoMode (mode, &w, &h, &depth)) {
GAL_VideoQuit (); GAL_VideoQuit ();
@@ -159,10 +204,14 @@ int mg_InitGAL (void)
} }
#endif #endif
if (GetMgEtcIntValue (engine, "dpi", &__gal_screen->dpi) < 0) #ifdef _MGRM_PROCESSES
__gal_screen->dpi = GDCAP_DPI_DEFAULT; if (mgIsServer)
else if (__gal_screen->dpi < GDCAP_DPI_MINIMAL) __gal_screen->dpi = get_dpi_from_etc (engine);
__gal_screen->dpi = GDCAP_DPI_MINIMAL; else
__gal_screen->dpi = SHAREDRES_VIDEO_DPI;
#else /* defined _MGRM_PROCESSES */
__gal_screen->dpi = get_dpi_from_etc (engine);
#endif /* not defined _MGRM_PROCESSES */
for (i = 0; i < 17; i++) { for (i = 0; i < 17; i++) {
SysPixelIndex [i] = GAL_MapRGB (__gal_screen->format, SysPixelIndex [i] = GAL_MapRGB (__gal_screen->format,
+3 -1
View File
@@ -102,10 +102,10 @@ struct GAL_VideoDevice {
GAL_Surface *(*SetVideoMode)(_THIS, GAL_Surface *current, GAL_Surface *(*SetVideoMode)(_THIS, GAL_Surface *current,
int width, int height, int bpp, Uint32 flags); int width, int height, int bpp, Uint32 flags);
#if 0
/* Toggle the fullscreen mode */ /* Toggle the fullscreen mode */
int (*ToggleFullScreen)(_THIS, int on); int (*ToggleFullScreen)(_THIS, int on);
#if 0
/* This is called after the video mode has been set, to get the /* This is called after the video mode has been set, to get the
initial mouse state. It should queue events as necessary to initial mouse state. It should queue events as necessary to
properly represent the current mouse focus and position. properly represent the current mouse focus and position.
@@ -141,6 +141,8 @@ struct GAL_VideoDevice {
GAL_VideoInfo info; GAL_VideoInfo info;
#ifndef _MGRM_THREADS #ifndef _MGRM_THREADS
/* Copy video information to shared resource segment */
void (*CopyVideoInfoToSharedRes)(_THIS);
/* Request a surface in video memory */ /* Request a surface in video memory */
void (*RequestHWSurface)(_THIS, const REQ_HWSURFACE* request, REP_HWSURFACE* reply); void (*RequestHWSurface)(_THIS, const REQ_HWSURFACE* request, REP_HWSURFACE* reply);
#endif #endif
+12
View File
@@ -1406,3 +1406,15 @@ int GAL_SuspendVideo(void)
return 0; return 0;
} }
#ifdef _MGRM_PROCESSES
BOOL GAL_CopyVideoInfoToSharedRes (void)
{
if (__mg_current_video && __mg_current_video->CopyVideoInfoToSharedRes) {
__mg_current_video->CopyVideoInfoToSharedRes(__mg_current_video);
return TRUE;
}
return FALSE;
}
#endif /* _MGRM_PROCESSES */
+35 -52
View File
@@ -175,7 +175,7 @@ static BOOL RestrictControlECRGNEx (RECT* minimal,
rc.bottom = (maskrect + idx)->bottom + pCtrl->top + off_y; rc.bottom = (maskrect + idx)->bottom + pCtrl->top + off_y;
AddClipRect (ergn, &rc); AddClipRect (ergn, &rc);
idx = (maskrect + idx)->next; idx = (maskrect + idx)->next;
}while (idx != 0); } while (idx != 0);
IntersectClipRect (ergn, minimal); IntersectClipRect (ergn, minimal);
} }
@@ -467,7 +467,6 @@ BOOL dc_GenerateECRgn(PDC pdc, BOOL fForce)
PCLIPRECT pcr; PCLIPRECT pcr;
PCONTROL pCtrl; PCONTROL pCtrl;
RECT minimal; RECT minimal;
CLIPRGN ergn;
/* is global clip region is empty? */ /* is global clip region is empty? */
if ((!fForce) && (!dc_IsVisible (pdc))) if ((!fForce) && (!dc_IsVisible (pdc)))
@@ -522,6 +521,7 @@ BOOL dc_GenerateECRgn(PDC pdc, BOOL fForce)
pCtrl = gui_Control (pdc->hwnd); pCtrl = gui_Control (pdc->hwnd);
if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) { if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) {
CLIPRGN ergn;
InitClipRgn (&ergn, &__mg_FreeClipRectList); InitClipRgn (&ergn, &__mg_FreeClipRectList);
if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) { if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) {
ClipRgnIntersect (&pdc->ecrgn, &pdc->ecrgn, &ergn); ClipRgnIntersect (&pdc->ecrgn, &pdc->ecrgn, &ergn);
@@ -530,6 +530,7 @@ BOOL dc_GenerateECRgn(PDC pdc, BOOL fForce)
else { else {
EmptyClipRgn (&pdc->ecrgn); EmptyClipRgn (&pdc->ecrgn);
} }
EmptyClipRgn (&ergn);
} }
else { else {
IntersectClipRect (&pdc->ecrgn, &minimal); IntersectClipRect (&pdc->ecrgn, &minimal);
@@ -1728,7 +1729,6 @@ static CB_COMP_SETPIXEL draw_pixel_ops [NR_ROPS][NR_PIXEL_LEN] =
static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient) static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient)
{ {
PCONTROL pCtrl; PCONTROL pCtrl;
CLIPRGN ergn;
pdc->hwnd = hWnd; pdc->hwnd = hWnd;
@@ -1793,8 +1793,8 @@ static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient)
pCtrl = gui_Control (pdc->hwnd); pCtrl = gui_Control (pdc->hwnd);
if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) {
{ CLIPRGN ergn;
InitClipRgn (&ergn, &__mg_FreeClipRectList); InitClipRgn (&ergn, &__mg_FreeClipRectList);
if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) { if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) {
@@ -1804,6 +1804,8 @@ static void dc_InitDC (PDC pdc, HWND hWnd, BOOL bIsClient)
else { else {
EmptyClipRgn (&pdc->ecrgn); EmptyClipRgn (&pdc->ecrgn);
} }
EmptyClipRgn (&ergn);
} }
else { else {
IntersectClipRect (&pdc->ecrgn, &minimal); IntersectClipRect (&pdc->ecrgn, &minimal);
@@ -2107,7 +2109,6 @@ void GUIAPI ReleaseDC (HDC hDC)
if (pWin && pWin->privCDC == hDC) { if (pWin && pWin->privCDC == hDC) {
RECT minimal; RECT minimal;
PCONTROL pCtrl; PCONTROL pCtrl;
CLIPRGN ergn;
/* for private DC, we reset the clip region info. */ /* for private DC, we reset the clip region info. */
/* houhh 20090113, for private dc with secondaryDC, pGCRInfo is NULL. */ /* houhh 20090113, for private dc with secondaryDC, pGCRInfo is NULL. */
@@ -2127,6 +2128,7 @@ void GUIAPI ReleaseDC (HDC hDC)
pCtrl = gui_Control (pdc->hwnd); pCtrl = gui_Control (pdc->hwnd);
if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) { if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) {
CLIPRGN ergn;
InitClipRgn (&ergn, &__mg_FreeClipRectList); InitClipRgn (&ergn, &__mg_FreeClipRectList);
if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) { if (RestrictControlECRGNEx (&minimal, pCtrl, &ergn)) {
ClipRgnIntersect (&pdc->ecrgn, &pdc->ecrgn, &ergn); ClipRgnIntersect (&pdc->ecrgn, &pdc->ecrgn, &ergn);
@@ -2135,6 +2137,7 @@ void GUIAPI ReleaseDC (HDC hDC)
else { else {
EmptyClipRgn (&pdc->ecrgn); EmptyClipRgn (&pdc->ecrgn);
} }
EmptyClipRgn (&ergn);
} }
else { else {
IntersectClipRect (&pdc->ecrgn, &minimal); IntersectClipRect (&pdc->ecrgn, &minimal);
@@ -2574,7 +2577,6 @@ BOOL dc_GenerateMemDCECRgn(PDC pdc, BOOL fForce)
{ {
PCONTROL pCtrl; PCONTROL pCtrl;
RECT minimal; RECT minimal;
CLIPRGN ergn;
PCLIPRECT pcr; PCLIPRECT pcr;
/* is global clip region is empty? */ /* is global clip region is empty? */
@@ -2610,6 +2612,7 @@ BOOL dc_GenerateMemDCECRgn(PDC pdc, BOOL fForce)
/* restrict control's effective region. */ /* restrict control's effective region. */
pCtrl = gui_Control (pdc->hwnd); pCtrl = gui_Control (pdc->hwnd);
if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) { if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) {
CLIPRGN ergn;
InitClipRgn (&ergn, &__mg_FreeClipRectList); InitClipRgn (&ergn, &__mg_FreeClipRectList);
if (RestrictControlMemDCECRGNEx (&minimal, pCtrl, &ergn)) { if (RestrictControlMemDCECRGNEx (&minimal, pCtrl, &ergn)) {
@@ -2619,6 +2622,7 @@ BOOL dc_GenerateMemDCECRgn(PDC pdc, BOOL fForce)
else { else {
EmptyClipRgn (&pdc->ecrgn); EmptyClipRgn (&pdc->ecrgn);
} }
EmptyClipRgn (&ergn);
} }
else { else {
IntersectClipRect (&pdc->ecrgn, &minimal); IntersectClipRect (&pdc->ecrgn, &minimal);
@@ -2642,7 +2646,6 @@ HDC GetSecondarySubDC (HDC secondary_dc, HWND hwnd_child, BOOL client)
int off_x, off_y; int off_x, off_y;
PCONTROL pCtrl; PCONTROL pCtrl;
RECT minimal; RECT minimal;
CLIPRGN ergn;
pdc_parent = dc_HDC2PDC (secondary_dc); pdc_parent = dc_HDC2PDC (secondary_dc);
@@ -2716,6 +2719,7 @@ HDC GetSecondarySubDC (HDC secondary_dc, HWND hwnd_child, BOOL client)
pCtrl = gui_Control (pdc->hwnd); pCtrl = gui_Control (pdc->hwnd);
if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) { if (pCtrl && !(pCtrl->dwExStyle & WS_EX_CTRLASMAINWIN)) {
CLIPRGN ergn;
InitClipRgn (&ergn, &__mg_FreeClipRectList); InitClipRgn (&ergn, &__mg_FreeClipRectList);
if (RestrictControlMemDCECRGNEx (&minimal, pCtrl, &ergn)) { if (RestrictControlMemDCECRGNEx (&minimal, pCtrl, &ergn)) {
@@ -2725,6 +2729,7 @@ HDC GetSecondarySubDC (HDC secondary_dc, HWND hwnd_child, BOOL client)
else { else {
EmptyClipRgn (&pdc->ecrgn); EmptyClipRgn (&pdc->ecrgn);
} }
EmptyClipRgn (&ergn);
} }
else { else {
IntersectClipRect (&pdc->ecrgn, &minimal); IntersectClipRect (&pdc->ecrgn, &minimal);
@@ -3754,10 +3759,7 @@ MG_EXPORT GHANDLE GetVideoHandle (HDC hdc)
#ifdef _MGGAL_DRM #ifdef _MGGAL_DRM
/* implemented in DRI engine. */ BOOL drmGetSurfaceInfo (GHANDLE video, HDC hdc, DrmSurfaceInfo* info)
BOOL __drm_get_surface_info (GAL_Surface *surface, DrmSurfaceInfo* info);
MG_EXPORT BOOL drmGetSurfaceInfo (GHANDLE video, HDC hdc, DrmSurfaceInfo* info)
{ {
PDC pdc = dc_HDC2PDC (hdc); PDC pdc = dc_HDC2PDC (hdc);
if (pdc->surface->video != (GHANDLE)video) if (pdc->surface->video != (GHANDLE)video)
@@ -3766,14 +3768,8 @@ MG_EXPORT BOOL drmGetSurfaceInfo (GHANDLE video, HDC hdc, DrmSurfaceInfo* info)
return __drm_get_surface_info(pdc->surface, info); return __drm_get_surface_info(pdc->surface, info);
} }
/* implemented in DRI engine. */ HDC drmCreateDCFromNameEx (GHANDLE video, uint32_t name, uint32_t drm_format,
GAL_Surface* __drm_create_surface_from_name (GHANDLE video, off_t offset, uint32_t width, uint32_t height, uint32_t pitch)
uint32_t name, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch);
MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
uint32_t name, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch)
{ {
PDC pmem_dc = NULL; PDC pmem_dc = NULL;
GAL_Surface* surface; GAL_Surface* surface;
@@ -3783,7 +3779,7 @@ MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
LOCK (&__mg_gdilock); LOCK (&__mg_gdilock);
surface = __drm_create_surface_from_name (video, name, surface = __drm_create_surface_from_name (video, name,
drm_format, width, height, pitch); drm_format, offset, width, height, pitch);
UNLOCK (&__mg_gdilock); UNLOCK (&__mg_gdilock);
if (!surface) { if (!surface) {
@@ -3797,16 +3793,14 @@ MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
pmem_dc->DataType = TYPE_HDC; pmem_dc->DataType = TYPE_HDC;
pmem_dc->DCType = TYPE_MEMDC; pmem_dc->DCType = TYPE_MEMDC;
pmem_dc->inuse = TRUE; pmem_dc->inuse = TRUE;
pmem_dc->surface = surface; pmem_dc->surface = surface;
dc_InitDC (pmem_dc, HWND_DESKTOP, FALSE); dc_InitDC (pmem_dc, HWND_NULL, FALSE);
InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList);
MAKE_REGION_INFINITE(&pmem_dc->lcrgn); MAKE_REGION_INFINITE(&pmem_dc->lcrgn);
InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList);
pmem_dc->pGCRInfo = NULL;
pmem_dc->oldage = 0;
pmem_dc->DevRC.left = 0; pmem_dc->DevRC.left = 0;
pmem_dc->DevRC.top = 0; pmem_dc->DevRC.top = 0;
@@ -3819,14 +3813,9 @@ MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
return (HDC)pmem_dc; return (HDC)pmem_dc;
} }
/* implemented in DRI engine. */ HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t drm_format, off_t offset,
uint32_t handle, unsigned long size, uint32_t drm_format, uint32_t width, uint32_t height, uint32_t pitch)
unsigned int width, unsigned int height, uint32_t pitch);
MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video,
uint32_t handle, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch)
{ {
PDC pmem_dc = NULL; PDC pmem_dc = NULL;
GAL_Surface* surface; GAL_Surface* surface;
@@ -3836,7 +3825,7 @@ MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video,
LOCK (&__mg_gdilock); LOCK (&__mg_gdilock);
surface = __drm_create_surface_from_handle (video, handle, size, surface = __drm_create_surface_from_handle (video, handle, size,
drm_format, width, height, pitch); drm_format, offset, width, height, pitch);
UNLOCK (&__mg_gdilock); UNLOCK (&__mg_gdilock);
if (!surface) { if (!surface) {
@@ -3850,16 +3839,14 @@ MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video,
pmem_dc->DataType = TYPE_HDC; pmem_dc->DataType = TYPE_HDC;
pmem_dc->DCType = TYPE_MEMDC; pmem_dc->DCType = TYPE_MEMDC;
pmem_dc->inuse = TRUE; pmem_dc->inuse = TRUE;
pmem_dc->surface = surface; pmem_dc->surface = surface;
dc_InitDC (pmem_dc, HWND_DESKTOP, FALSE); dc_InitDC (pmem_dc, HWND_NULL, FALSE);
InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList);
MAKE_REGION_INFINITE(&pmem_dc->lcrgn); MAKE_REGION_INFINITE(&pmem_dc->lcrgn);
InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList);
pmem_dc->pGCRInfo = NULL;
pmem_dc->oldage = 0;
pmem_dc->DevRC.left = 0; pmem_dc->DevRC.left = 0;
pmem_dc->DevRC.top = 0; pmem_dc->DevRC.top = 0;
@@ -3872,14 +3859,9 @@ MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video,
return (HDC)pmem_dc; return (HDC)pmem_dc;
} }
/* implemented in DRI engine. */ HDC drmCreateDCFromPrimeFdEx (GHANDLE video, int prime_fd, size_t size,
GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video, uint32_t drm_format, off_t offset,
int prime_fd, unsigned long size, uint32_t drm_format, uint32_t width, uint32_t height, uint32_t pitch)
unsigned int width, unsigned int height, uint32_t pitch);
MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
int prime_fd, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch)
{ {
PDC pmem_dc = NULL; PDC pmem_dc = NULL;
GAL_Surface* surface; GAL_Surface* surface;
@@ -3887,9 +3869,12 @@ MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
if (!(pmem_dc = malloc (sizeof(DC)))) if (!(pmem_dc = malloc (sizeof(DC))))
return HDC_INVALID; return HDC_INVALID;
if (size == 0) {
}
LOCK (&__mg_gdilock); LOCK (&__mg_gdilock);
surface =__drm_create_surface_from_prime_fd (video, prime_fd, size, surface =__drm_create_surface_from_prime_fd (video, prime_fd, size,
drm_format, width, height, pitch); drm_format, offset, width, height, pitch);
UNLOCK (&__mg_gdilock); UNLOCK (&__mg_gdilock);
if (!surface) { if (!surface) {
@@ -3903,16 +3888,14 @@ MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
pmem_dc->DataType = TYPE_HDC; pmem_dc->DataType = TYPE_HDC;
pmem_dc->DCType = TYPE_MEMDC; pmem_dc->DCType = TYPE_MEMDC;
pmem_dc->inuse = TRUE; pmem_dc->inuse = TRUE;
pmem_dc->surface = surface; pmem_dc->surface = surface;
dc_InitDC (pmem_dc, HWND_DESKTOP, FALSE); dc_InitDC (pmem_dc, HWND_NULL, FALSE);
InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->lcrgn, &__mg_FreeClipRectList);
MAKE_REGION_INFINITE(&pmem_dc->lcrgn); MAKE_REGION_INFINITE(&pmem_dc->lcrgn);
InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList); InitClipRgn (&pmem_dc->ecrgn, &__mg_FreeClipRectList);
pmem_dc->pGCRInfo = NULL;
pmem_dc->oldage = 0;
pmem_dc->DevRC.left = 0; pmem_dc->DevRC.left = 0;
pmem_dc->DevRC.top = 0; pmem_dc->DevRC.top = 0;
@@ -3925,4 +3908,4 @@ MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
return (HDC)pmem_dc; return (HDC)pmem_dc;
} }
#endif #endif /* _MGGAL_DRM */
+30
View File
@@ -601,6 +601,34 @@ static int req_hw_surface (int cli, int clifd, void* buff, size_t len)
extern int clipboard_op (int cli, int clifd, void* buff, size_t len); extern int clipboard_op (int cli, int clifd, void* buff, size_t len);
#endif #endif
static int authenticate_client (int cli, int clifd, void* buff, size_t len)
{
int auth_result = 1;
#ifdef _MGGAL_DRM
uint32_t magic;
extern int __drm_auth_client(int, uint32_t);
magic = *(uint32_t*)buff;
auth_result = __drm_auth_client (cli, magic);
#endif
return ServerSendReply (clifd, &auth_result, sizeof (int));
}
/* get the rendering surface */
static int get_shared_surface (int cli, int clifd, void* buff, size_t len)
{
SHAREDSURFINFO info = { 0, 0 };
#ifdef _MGGAL_DRM
const char* name = buff;
extern int __drm_get_shared_screen_surface (const char*, SHAREDSURFINFO*);
__drm_get_shared_screen_surface (name, &info);
#endif
return ServerSendReply (clifd, &info, sizeof (SHAREDSURFINFO));
}
static REQ_HANDLER handlers [MAX_REQID] = static REQ_HANDLER handlers [MAX_REQID] =
{ {
load_cursor, load_cursor,
@@ -646,6 +674,8 @@ static REQ_HANDLER handlers [MAX_REQID] =
get_ime_targetinfo, get_ime_targetinfo,
set_ime_targetinfo, set_ime_targetinfo,
copy_cursor, copy_cursor,
authenticate_client,
get_shared_surface,
}; };
BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler) BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler)
+12 -3
View File
@@ -166,21 +166,30 @@ static void ParseEvent (PMSGQUEUE msg_que, int event)
case ME_LEFTDOWN: case ME_LEFTDOWN:
Msg.message = MSG_LBUTTONDOWN; Msg.message = MSG_LBUTTONDOWN;
break; break;
case ME_RIGHTDOWN:
Msg.message = MSG_RBUTTONDOWN;
break;
case ME_LEFTUP: case ME_LEFTUP:
Msg.message = MSG_LBUTTONUP; Msg.message = MSG_LBUTTONUP;
break; break;
case ME_LEFTDBLCLICK: case ME_LEFTDBLCLICK:
Msg.message = MSG_LBUTTONDBLCLK; Msg.message = MSG_LBUTTONDBLCLK;
break; break;
case ME_RIGHTDOWN:
Msg.message = MSG_RBUTTONDOWN;
break;
case ME_RIGHTUP: case ME_RIGHTUP:
Msg.message = MSG_RBUTTONUP; Msg.message = MSG_RBUTTONUP;
break; break;
case ME_RIGHTDBLCLICK: case ME_RIGHTDBLCLICK:
Msg.message = MSG_RBUTTONDBLCLK; Msg.message = MSG_RBUTTONDBLCLK;
break; break;
case ME_MIDDLEDOWN:
Msg.message = MSG_MBUTTONDOWN;
break;
case ME_MIDDLEUP:
Msg.message = MSG_MBUTTONUP;
break;
case ME_MIDDLEDBLCLICK:
Msg.message = MSG_MBUTTONDBLCLK;
break;
} }
if (__mg_do_drag_drop_window (Msg.message, me->x, me->y)) { if (__mg_do_drag_drop_window (Msg.message, me->x, me->y)) {
+9
View File
@@ -162,6 +162,15 @@ static void ParseEvent (PMSGQUEUE msg_que, int event)
case ME_RIGHTDBLCLICK: case ME_RIGHTDBLCLICK:
Msg.message = MSG_RBUTTONDBLCLK; Msg.message = MSG_RBUTTONDBLCLK;
break; break;
case ME_MIDDLEDOWN:
Msg.message = MSG_MBUTTONDOWN;
break;
case ME_MIDDLEUP:
Msg.message = MSG_MBUTTONUP;
break;
case ME_MIDDLEDBLCLICK:
Msg.message = MSG_MBUTTONDBLCLK;
break;
} }
Msg.lParam = MAKELONG (me->x, me->y); Msg.lParam = MAKELONG (me->x, me->y);
+1 -1
View File
@@ -74,7 +74,7 @@ const int __mg_cursors_offset [] = {
766*11 + 326*9 + 518*2, 766*11 + 326*9 + 518*2,
}; };
const const unsigned char __mg_cursors_data[] = { const unsigned char __mg_cursors_data[] = {
#ifdef __TARGET_FMSOFT__ #ifdef __TARGET_FMSOFT__
0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x20, 0x20, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x20, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02,
+3 -3
View File
@@ -85,9 +85,9 @@
BOOL sysres_init_inner_resource() BOOL sysres_init_inner_resource()
{ {
#ifdef _MGINCORE_RES #ifdef _MGINCORE_RES
AddInnerRes(__mgir_bmp_inner_res, TABLESIZE(__mgir_bmp_inner_res), FALSE); AddInnerRes((INNER_RES*)__mgir_bmp_inner_res, TABLESIZE(__mgir_bmp_inner_res), FALSE);
AddInnerRes(__mgir_icon_inner_res, TABLESIZE(__mgir_icon_inner_res),FALSE); AddInnerRes((INNER_RES*)__mgir_icon_inner_res, TABLESIZE(__mgir_icon_inner_res),FALSE);
AddInnerRes(__mgir_font_inner_res, TABLESIZE(__mgir_font_inner_res),FALSE); AddInnerRes((INNER_RES*)__mgir_font_inner_res, TABLESIZE(__mgir_font_inner_res),FALSE);
#endif #endif
return TRUE; return TRUE;
} }