Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/neroist/uing into main
Browse files Browse the repository at this point in the history
  • Loading branch information
neroist committed Feb 5, 2023
2 parents 7cad42a + b9265d3 commit 7af82f7
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 37 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2023

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OSX: `$ brew install gtk+3`

You should then be able to compile the sample code in the
[`examples/`](examples/)
directory and run the tests successfully.
directory and run the [tests](tests/) successfully.

## Static vs. dynamic linking

Expand Down
2 changes: 1 addition & 1 deletion examples/table.nim
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ proc modelCellValue(mh: ptr TableModelHandler, m: ptr rawui.TableModel, row, col
of COLUMN_ACTION:
result = newTableValue("Apply").impl
else:
result = newTableValue("row " & $row & "x col " & $col).impl
result = newTableValue("row " & $row & " x col " & $col).impl

proc modelSetCellValue(mh: ptr TableModelHandler, m: ptr rawui.TableModel, row, col: cint, val: ptr rawui.TableValue) {.cdecl.} =
if col == COLUMN_ACTION:
Expand Down
Binary file added res/winim32.res
Binary file not shown.
Binary file added res/winim64.res
Binary file not shown.
Binary file added res/winimvcc.res
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/config.nims
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
switch("path", "$projectDir")

when defined(linux):
--warnings:off
--warnings:off

#--d:useLibUiDll
73 changes: 40 additions & 33 deletions uing/rawui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,29 @@ else:
{.compile: ("./libui/unix/*.c", "unix_$#.obj").}

when defined(gcc) and defined(windows):
{.passL: r"-lwinspool".}
{.passL: r"-lcomdlg32".}
{.passL: r"-ladvapi32".}
{.passL: r"-lshell32".}
{.passL: r"-lole32".}
{.passL: r"-loleaut32".}

{.passL: r"-luuid".}
{.passL: r"-lcomctl32".}
{.passL: r"-ld2d1".}
{.passL: r"-ldwrite".}
{.passL: r"-luxTheme".}
{.passL: r"-lusp10".}
{.passL: r"-lgdi32".}
{.passL: r"-luser32".}
{.passL: r"-lkernel32".}
{.link: r"../res/resources.o".}
{.passL: "-lstdc++".}
{.passL: "-lwinspool".}
{.passL: "-lcomdlg32".}
{.passL: "-ladvapi32".}
{.passL: "-lshell32".}
{.passL: "-lole32".}
{.passL: "-loleaut32".}

{.passL: "-luuid".}
{.passL: "-lcomctl32".}
{.passL: "-ld2d1".}
{.passL: "-ldwrite".}
{.passL: "-luxTheme".}
{.passL: "-lusp10".}
{.passL: "-lgdi32".}
{.passL: "-luser32".}
{.passL: "-lkernel32".}

when defined(cpu64):
{.link: "../res/resources.o".} # resources.o is a 64-bit object file
{.link: "../res/winim64.res".}
else:
{.link: "../res/winim32.res".}

when defined(vcc):
{.passC: "/EHsc".}
Expand All @@ -95,23 +101,24 @@ else:
{.link: r"C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\" & arch & r"\UxTheme.lib".}
{.link: r"C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\" & arch & r"\Usp10.lib".}

{.link: r"kernel32.lib".}
{.link: r"user32.lib".}
{.link: r"gdi32.lib".}
{.link: r"winspool.lib".}
{.link: r"comdlg32.lib".}
{.link: r"advapi32.lib".}
{.link: r"shell32.lib".}
{.link: r"ole32.lib".}
{.link: r"oleaut32.lib".}
{.link: r"uuid.lib".}
{.link: r"comctl32.lib".}

{.link: r"d2d1.lib".}
{.link: r"dwrite.lib".}
{.link: r"UxTheme.lib".}
{.link: r"Usp10.lib".}
{.link: "kernel32.lib".}
{.link: "user32.lib".}
{.link: "gdi32.lib".}
{.link: "winspool.lib".}
{.link: "comdlg32.lib".}
{.link: "advapi32.lib".}
{.link: "shell32.lib".}
{.link: "ole32.lib".}
{.link: "oleaut32.lib".}
{.link: "uuid.lib".}
{.link: "comctl32.lib".}

{.link: "d2d1.lib".}
{.link: "dwrite.lib".}
{.link: "UxTheme.lib".}
{.link: "Usp10.lib".}
{.link: r"..\res\resources.res".}
{.link: r"..\res\winimvcc.res".}

type
ForEach* {.size: sizeof(cint).} = enum
Expand Down

0 comments on commit 7af82f7

Please sign in to comment.