* Reorganize the whole ReactOS codebase into a new layout. Discussing it will only waste time, so we better have it then talk about it after.

* Put ntoskrnl and ntdll in the same folder, because they both start with nt.
* Place hal next to acpi, they both deal with hardware stuff.
* Move mountmgr next to usb drivers.
* Put the rtl next to the crt, and share as much as possible between the two.
* I'm just kidding, you know, April's fool and all ;)

Here's the real deal:

[WIN32SS]
* And finally, integrate win32k itself into the new file layout. Now the subsystem modules are located close to each other (like gdi32 and ntgdi, or user32 and ntuser).
* Thanks go to the subsystem team for coming up with this nice layout, hopefully this will scale to the whole codebase layout soon.
* Special thanks to Smiley for coming up with this cool idea :)

svn path=/trunk/; revision=56311
This commit is contained in:
Amine Khaldi 2012-04-01 20:42:43 +00:00
parent 85434c6c85
commit e19d519f52
268 changed files with 328 additions and 337 deletions

View File

@ -1,3 +1,2 @@
add_subdirectory(csrss)
add_subdirectory(win32k)

View File

@ -1,226 +0,0 @@
set (USE_DIBLIB FALSE)
spec2def(win32k.sys win32k.spec ADD_IMPORTLIB)
include_directories(
.
include
${REACTOS_SOURCE_DIR}/ntoskrnl/include
${REACTOS_SOURCE_DIR}/lib/3rdparty/freetype/include
${REACTOS_SOURCE_DIR}/include/reactos/subsys
${REACTOS_SOURCE_DIR}/include/reactos/drivers)
add_definitions(
-DLANGPACK
-D_WIN32K_)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dib)
list(APPEND GENDIB_FILES
${CMAKE_CURRENT_BINARY_DIR}/dib/dib8gen.c
${CMAKE_CURRENT_BINARY_DIR}/dib/dib16gen.c
${CMAKE_CURRENT_BINARY_DIR}/dib/dib32gen.c)
add_custom_command(
OUTPUT ${GENDIB_FILES}
COMMAND native-gendib ${CMAKE_CURRENT_BINARY_DIR}/dib
DEPENDS native-gendib)
list(APPEND SOURCE
dib/alphablend.c
dib/dib1bpp.c
dib/dib4bpp.c
dib/dib8bpp.c
dib/dib16bpp.c
dib/dib24bpp.c
dib/dib32bpp.c
dib/floodfill.c
dib/stretchblt.c
eng/alphablend.c
eng/bitblt.c
eng/engbrush.c
eng/engevent.c
eng/clip.c
eng/debug.c
#eng/drvdbg.c
eng/device.c
eng/driverobj.c
eng/error.c
eng/float.c
eng/gradient.c
eng/lineto.c
eng/ldevobj.c
eng/mapping.c
eng/mem.c
eng/engmisc.c
eng/mouse.c
eng/paint.c
eng/pdevobj.c
eng/perfcnt.c
eng/rlecomp.c
eng/semaphor.c
eng/sort.c
eng/string.c
eng/stretchblt.c
eng/surface.c
eng/transblt.c
eng/engwindow.c
eng/xlate.c
main/dllmain.c
misc/driver.c
misc/file.c
misc/math.c
misc/rtlstr.c
misc/copy.c
misc/registry.c
misc/usrheap.c
ntddraw/ddraw.c
ntddraw/dd.c
ntddraw/ddsurf.c
ntddraw/d3d.c
ntddraw/dvp.c
ntddraw/mocomp.c
ntddraw/eng.c
ntddraw/dxeng.c
ntuser/accelerator.c
ntuser/callback.c
ntuser/callproc.c
ntuser/caret.c
ntuser/class.c
ntuser/clipboard.c
ntuser/csr.c
ntuser/cursoricon.c
ntuser/defwnd.c
ntuser/desktop.c
ntuser/display.c
ntuser/event.c
ntuser/focus.c
ntuser/guicheck.c
ntuser/hook.c
ntuser/hotkey.c
ntuser/input.c
ntuser/keyboard.c
ntuser/kbdlayout.c
ntuser/menu.c
ntuser/message.c
ntuser/metric.c
ntuser/misc.c
ntuser/monitor.c
ntuser/mouse.c
ntuser/msgqueue.c
ntuser/ntstubs.c
ntuser/ntuser.c
ntuser/painting.c
ntuser/prop.c
ntuser/scrollbar.c
ntuser/session.c
ntuser/simplecall.c
ntuser/sysparams.c
ntuser/timer.c
ntuser/useratom.c
ntuser/vis.c
ntuser/windc.c
ntuser/window.c
ntuser/winpos.c
ntuser/winsta.c
ntuser/object.c
objects/arc.c
objects/bezier.c
objects/bitblt.c
objects/bitmaps.c
objects/brush.c
objects/cliprgn.c
objects/coord.c
objects/dcattr.c
objects/dclife.c
objects/dcobjs.c
objects/dcstate.c
objects/dcutil.c
objects/device.c
objects/dibobj.c
objects/drawing.c
objects/fillshap.c
objects/font.c
objects/freetype.c
objects/gdibatch.c
objects/gdidbg.c
objects/gdiobj.c
objects/gdipool.c
objects/icm.c
objects/line.c
objects/metafile.c
objects/palette.c
objects/path.c
objects/pen.c
objects/polyfill.c
objects/print.c
objects/rect.c
objects/region.c
objects/stockobj.c
objects/text.c
objects/wingl.c
objects/xformobj.c
stubs/stubs.c
stubs/umpdstubs.c
win32k.rc)
if (USE_DIBLIB)
add_definitions(
-D_USE_DIBLIB_)
list(APPEND SOURCE
dib/dib_new.c
eng/bitblt_new.c)
else()
list(APPEND SOURCE
dib/dib.c
eng/copybits.c
${GENDIB_FILES})
endif()
if(ARCH MATCHES i386)
list(APPEND SOURCE
dib/i386/dib24bpp_hline.s
dib/i386/dib32bpp_hline.s
dib/i386/dib32bpp_colorfill.s
eng/i386/floatobj.S
misc/i386/cos_asm.s
misc/i386/sin_asm.s
misc/i386/atan2_asm.s
misc/i386/floor_asm.s
misc/i386/ceil_asm.s)
else()
list(APPEND SOURCE
dib/dib24bppc.c
dib/dib32bppc.c)
endif()
add_library(win32k SHARED
${CMAKE_CURRENT_BINARY_DIR}/win32k.def
${SOURCE})
set_module_type(win32k kernelmodedriver)
target_link_libraries(win32k
${PSEH_LIB}
dxguid
libcntpr)
if (USE_DIBLIB)
target_link_libraries(win32k
diblib)
endif()
add_importlibs(win32k ntoskrnl hal ftfd)
add_pch(win32k pch.h)
add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all)
add_library(win32ksys sys-stubs.S)
set_source_files_properties(sys-stubs.S PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/w32ksvc.h)
if (USE_DIBLIB)
add_subdirectory(diblib)
endif()

View File

@ -1,105 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Graphics Subsystem
* FILE: subsys/win32k/include/win32k.h
* PURPOSE: Internal Win32K Header
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
*/
/* INCLUDES ******************************************************************/
#pragma once
#if 0
#ifndef _MSC_VER
#define PLACE_IN_SECTION(s) __attribute__((section(s)))
#define INIT_FUNCTION PLACE_IN_SECTION("INIT")
#else
#define INIT_FUNCTION
#endif
#else
#define INIT_FUNCTION
#endif
/* Enable debugging features */
#define GDI_DEBUG 0
#define DBG_ENABLE_EVENT_LOGGING 0
#define DBG_ENABLE_SERVICE_HOOKS 0
/* Misc headers */
#include <include/win32kdebug.h>
#include <include/mmcopy.h>
#include <include/tags.h>
#include <include/rect.h>
#include <include/misc.h>
/* Internal NtGdi Headers */
typedef struct _DC *PDC;
#include <include/gdiobj.h>
#include <include/surface.h>
#include <include/pdevobj.h>
#include <include/ldevobj.h>
#include <include/xformobj.h>
#include <include/bitmaps.h>
#include <include/engobjects.h>
#include <include/eng.h>
#include <include/brush.h>
#include <include/color.h>
#include <include/driverobj.h>
#include <include/palette.h>
#include <include/region.h>
#include <include/dc.h>
#include <include/dib.h>
#include <include/xlateobj.h>
#include <include/cliprgn.h>
#include <include/inteng.h>
#include <include/intgdi.h>
#include <include/intddraw.h>
#include <include/paint.h>
#include <include/text.h>
#include <include/engevent.h>
#include <include/device.h>
#include <include/pen.h>
#include <include/cliprgn.h>
#include <include/coord.h>
#include <include/gdifloat.h>
#include <include/path.h>
#include <include/floatobj.h>
#include <dib/dib.h>
#include <include/mouse.h>
/* Internal NtUser Headers */
typedef struct _DESKTOP *PDESKTOP;
#include <include/win32.h>
#include <include/object.h>
#include <include/ntuser.h>
#include <include/cursoricon.h>
#include <include/accelerator.h>
#include <include/hook.h>
#include <include/clipboard.h>
#include <include/winsta.h>
#include <include/msgqueue.h>
#include <include/desktop.h>
#include <include/dce.h>
#include <include/focus.h>
#include <include/hotkey.h>
#include <include/input.h>
#include <include/menu.h>
#include <include/monitor.h>
#include <include/timer.h>
#include <include/caret.h>
#include <include/painting.h>
#include <include/class.h>
#include <include/window.h>
#include <include/sysparams.h>
#include <include/prop.h>
#include <include/guicheck.h>
#include <include/useratom.h>
#include <include/vis.h>
#include <include/userfuncs.h>
#include <include/scroll.h>
#include <include/csr.h>
#include <include/winpos.h>
#include <include/callback.h>
#include <include/gdidebug.h>

View File

@ -1,6 +1,222 @@
set(USE_DIBLIB FALSE)
add_subdirectory(drivers)
add_subdirectory(gdi/diblib)
add_subdirectory(gdi/gdi32)
add_subdirectory(reactx)
add_subdirectory(user/user32)
add_subdirectory(user/win32csr)
spec2def(win32k.sys win32k.spec ADD_IMPORTLIB)
include_directories(
.
include
${REACTOS_SOURCE_DIR}/ntoskrnl/include
${REACTOS_SOURCE_DIR}/lib/3rdparty/freetype/include
${REACTOS_SOURCE_DIR}/include/reactos/subsys
${REACTOS_SOURCE_DIR}/include/reactos/drivers)
add_definitions(
-DLANGPACK
-D_WIN32K_)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib)
list(APPEND GENDIB_FILES
${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib8gen.c
${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib16gen.c
${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib32gen.c)
add_custom_command(
OUTPUT ${GENDIB_FILES}
COMMAND native-gendib ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib
DEPENDS native-gendib)
list(APPEND SOURCE
gdi/dib/alphablend.c
gdi/dib/dib1bpp.c
gdi/dib/dib4bpp.c
gdi/dib/dib8bpp.c
gdi/dib/dib16bpp.c
gdi/dib/dib24bpp.c
gdi/dib/dib32bpp.c
gdi/dib/floodfill.c
gdi/dib/stretchblt.c
gdi/eng/alphablend.c
gdi/eng/bitblt.c
gdi/eng/engbrush.c
gdi/eng/engevent.c
gdi/eng/clip.c
gdi/eng/debug.c
gdi/eng/device.c
gdi/eng/driverobj.c
gdi/eng/error.c
gdi/eng/float.c
gdi/eng/gradient.c
gdi/eng/lineto.c
gdi/eng/ldevobj.c
gdi/eng/mapping.c
gdi/eng/mem.c
gdi/eng/engmisc.c
gdi/eng/mouse.c
gdi/eng/paint.c
gdi/eng/pdevobj.c
gdi/eng/perfcnt.c
gdi/eng/rlecomp.c
gdi/eng/semaphor.c
gdi/eng/sort.c
gdi/eng/string.c
gdi/eng/stretchblt.c
gdi/eng/surface.c
gdi/eng/transblt.c
gdi/eng/engwindow.c
gdi/eng/xlate.c
user/ntuser/main.c
user/ntuser/misc/file.c
user/ntuser/misc/math.c
user/ntuser/misc/rtlstr.c
user/ntuser/misc/copy.c
user/ntuser/misc/registry.c
user/ntuser/misc/usrheap.c
reactx/ntddraw/ddraw.c
reactx/ntddraw/dd.c
reactx/ntddraw/ddsurf.c
reactx/ntddraw/d3d.c
reactx/ntddraw/dvp.c
reactx/ntddraw/mocomp.c
reactx/ntddraw/eng.c
reactx/ntddraw/dxeng.c
user/ntuser/accelerator.c
user/ntuser/callback.c
user/ntuser/callproc.c
user/ntuser/caret.c
user/ntuser/class.c
user/ntuser/clipboard.c
user/ntuser/csr.c
user/ntuser/cursoricon.c
user/ntuser/defwnd.c
user/ntuser/desktop.c
user/ntuser/display.c
user/ntuser/event.c
user/ntuser/focus.c
user/ntuser/guicheck.c
user/ntuser/hook.c
user/ntuser/hotkey.c
user/ntuser/input.c
user/ntuser/keyboard.c
user/ntuser/kbdlayout.c
user/ntuser/menu.c
user/ntuser/message.c
user/ntuser/metric.c
user/ntuser/misc.c
user/ntuser/monitor.c
user/ntuser/mouse.c
user/ntuser/msgqueue.c
user/ntuser/ntstubs.c
user/ntuser/ntuser.c
user/ntuser/painting.c
user/ntuser/prop.c
user/ntuser/scrollbar.c
user/ntuser/session.c
user/ntuser/simplecall.c
user/ntuser/sysparams.c
user/ntuser/timer.c
user/ntuser/useratom.c
user/ntuser/vis.c
user/ntuser/windc.c
user/ntuser/window.c
user/ntuser/winpos.c
user/ntuser/winsta.c
user/ntuser/object.c
gdi/ntgdi/arc.c
gdi/ntgdi/bezier.c
gdi/ntgdi/bitblt.c
gdi/ntgdi/bitmaps.c
gdi/ntgdi/brush.c
gdi/ntgdi/cliprgn.c
gdi/ntgdi/coord.c
gdi/ntgdi/dcattr.c
gdi/ntgdi/dclife.c
gdi/ntgdi/dcobjs.c
gdi/ntgdi/dcstate.c
gdi/ntgdi/dcutil.c
gdi/ntgdi/device.c
gdi/ntgdi/dibobj.c
gdi/ntgdi/drawing.c
gdi/ntgdi/fillshap.c
gdi/ntgdi/font.c
gdi/ntgdi/freetype.c
gdi/ntgdi/gdibatch.c
gdi/ntgdi/gdidbg.c
gdi/ntgdi/gdiobj.c
gdi/ntgdi/gdipool.c
gdi/ntgdi/icm.c
gdi/ntgdi/line.c
gdi/ntgdi/metafile.c
gdi/ntgdi/palette.c
gdi/ntgdi/path.c
gdi/ntgdi/pen.c
gdi/ntgdi/polyfill.c
gdi/ntgdi/print.c
gdi/ntgdi/rect.c
gdi/ntgdi/region.c
gdi/ntgdi/stockobj.c
gdi/ntgdi/text.c
gdi/ntgdi/wingl.c
gdi/ntgdi/xformobj.c
gdi/eng/stubs.c
gdi/eng/umpdstubs.c
win32k.rc)
if(USE_DIBLIB)
add_definitions(-D_USE_DIBLIB_)
list(APPEND SOURCE
gdi/dib/dib_new.c
gdi/eng/bitblt_new.c)
else()
list(APPEND SOURCE
gdi/dib/dib.c
gdi/eng/copybits.c
${GENDIB_FILES})
endif()
if(ARCH MATCHES i386)
list(APPEND SOURCE
gdi/dib/i386/dib24bpp_hline.s
gdi/dib/i386/dib32bpp_hline.s
gdi/dib/i386/dib32bpp_colorfill.s
gdi/eng/i386/floatobj.S
user/ntuser/misc/i386/cos_asm.s
user/ntuser/misc/i386/sin_asm.s
user/ntuser/misc/i386/atan2_asm.s
user/ntuser/misc/i386/floor_asm.s
user/ntuser/misc/i386/ceil_asm.s)
else()
list(APPEND SOURCE
gdi/dib/dib24bppc.c
gdi/dib/dib32bppc.c)
endif()
add_library(win32k SHARED
${CMAKE_CURRENT_BINARY_DIR}/win32k.def
${SOURCE})
set_module_type(win32k kernelmodedriver)
target_link_libraries(win32k
${PSEH_LIB}
dxguid
libcntpr)
if(USE_DIBLIB)
target_link_libraries(win32k diblib)
endif()
add_importlibs(win32k ntoskrnl hal ftfd)
add_pch(win32k pch.h)
add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all)
add_library(win32ksys sys-stubs.S)
set_source_files_properties(sys-stubs.S PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/w32ksvc.h)

View File

@ -9,7 +9,7 @@
/* INCLUDES *******************************************************************/
#include "videoprt.h"
#include "../../subsystems/win32/win32k/include/engevent.h"
#include "../../gdi/eng/engevent.h"
/* PUBLIC FUNCTIONS ***********************************************************/

Some files were not shown because too many files have changed in this diff Show More