mirror of
				https://github.com/Drezil/dear-implot.hs.git
				synced 2025-10-31 13:11:06 +01:00 
			
		
		
		
	lifted to imgui 1.89.7 & implot master (1.89.7 fixes)
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -4,4 +4,4 @@ | ||||
| 	branch = v0.13 | ||||
| [submodule "dear-imgui.hs"] | ||||
| 	path = dear-imgui.hs | ||||
| 	url = https://github.com/drezil/dear-imgui.hs | ||||
| 	url = https://github.com/haskell-game/dear-imgui.hs | ||||
|   | ||||
 Submodule dear-imgui.hs updated: cf166acda9...6ccb09a7da
									
								
							| @@ -46,7 +46,7 @@ library | ||||
|     DearImGui.Generator.Types | ||||
|     DearImGui.Structs | ||||
|     DearImGui.Enums | ||||
|     DearImGui.Context | ||||
|     DearImGui.Raw.Context | ||||
|   hs-source-dirs: | ||||
|     src | ||||
|   default-language: | ||||
| @@ -65,7 +65,7 @@ library | ||||
|     implot/implot_demo.cpp | ||||
|     implot/implot_items.cpp | ||||
|   cxx-options: | ||||
|     -std=c++11 | ||||
|     -std=c++11 -DIMGUI_DEFINE_MATH_OPERATORS | ||||
|   extra-libraries: | ||||
|     stdc++ | ||||
|   include-dirs: | ||||
| @@ -83,7 +83,7 @@ library | ||||
|   build-depends: base | ||||
|                , StateVar | ||||
|                , containers | ||||
|                , dear-imgui == 2.1.0 | ||||
|                , dear-imgui == 2.1.3 | ||||
|                , inline-c | ||||
|                , inline-c-cpp | ||||
|                , managed | ||||
|   | ||||
							
								
								
									
										2
									
								
								implot
									
									
									
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								implot
									
									
									
									
									
								
							 Submodule implot updated: e80e42e8b4...cc5e1daa5c
									
								
							| @@ -1 +0,0 @@ | ||||
| ../../dear-imgui.hs/src/DearImGui/Context.hs | ||||
| @@ -24,6 +24,8 @@ import Data.Traversable | ||||
|   ( for ) | ||||
| import Foreign.Storable | ||||
|   ( Storable ) | ||||
| import Data.Coerce | ||||
|   ( coerce ) | ||||
|  | ||||
| -- containers | ||||
| import Data.Map.Strict | ||||
| @@ -165,7 +167,7 @@ declareEnumeration finiteEnumName countName ( Enumeration {..} ) = do | ||||
|       pure ( finiteEnumInst : ) | ||||
|     else pure id | ||||
|  | ||||
|   synonyms <- for patterns \ ( patternName, patternValue, CommentText _patDoc ) -> do | ||||
|   synonyms <- for patterns \ ( patternName, patternValue, CommentText patDoc ) -> do | ||||
|     let | ||||
|       patNameStr :: String | ||||
|       patNameStr = Text.unpack patternName | ||||
| @@ -173,7 +175,7 @@ declareEnumeration finiteEnumName countName ( Enumeration {..} ) = do | ||||
|     patSynSig <- TH.patSynSigD patName ( TH.conT tyName ) | ||||
|     pat       <- | ||||
| #if MIN_VERSION_template_haskell(2,18,0) | ||||
|       ( if   Text.null _patDoc | ||||
|       ( if   Text.null patDoc | ||||
|         then TH.patSynD | ||||
|         else | ||||
|           \ nm args dir pat -> | ||||
|   | ||||
| @@ -98,7 +98,7 @@ plotHeaders = do | ||||
|     manyTill | ||||
|       (   ( Left  <$> try ignoreDefine) | ||||
|       <|> ( Right <$> enumeration enumNamesAndTypes) | ||||
|       <|> ( Left  <$> ignoreStruct) | ||||
|       <|> ( Left  <$> try ignoreStruct) | ||||
|       <|> ( Left  <$> cppConditionalIgnore) | ||||
|       ) | ||||
|       ( namedSection "Callbacks" ) | ||||
| @@ -210,7 +210,7 @@ enumeration enumNamesAndTypes = do | ||||
|     enumTypeName = () | ||||
|   ( underlyingType, forwardDoc ) <- case HashMap.lookup enumName enumNamesAndTypes of | ||||
|     Just res -> pure res | ||||
|     Nothing  -> customFailure ( MissingForwardDeclaration { enumName } ) | ||||
|     Nothing  -> customFailure ( MissingForwardDeclaration { enumName, library = enumNamesAndTypes } ) | ||||
|   let | ||||
|     docs :: [Comment] | ||||
|     docs = forwardDoc : CommentText "" : inlineDocs | ||||
| @@ -438,6 +438,7 @@ cppDirective f = token ( \case { BeginCPP a -> f a; _ -> Nothing } ) mempty | ||||
|  | ||||
| cppConditional :: MonadParsec e [Tok] m => m () | ||||
| cppConditional = do | ||||
|   void $ many comment | ||||
|   void $ cppDirective ( \case { "ifdef" -> Just True; "ifndef" -> Just False; _ -> Nothing } ) | ||||
|   -- assumes no nesting | ||||
|   void $ skipManyTill anySingle ( cppDirective ( \case { "endif" -> Just (); _ -> Nothing } ) ) | ||||
| @@ -445,6 +446,7 @@ cppConditional = do | ||||
|  | ||||
| cppConditionalIgnore :: MonadParsec e [Tok] m => m () | ||||
| cppConditionalIgnore = do | ||||
|   void $ many comment | ||||
|   void $ cppDirective ( \case { "ifdef" -> Just (); "ifndef" -> Just (); "if" -> Just (); _ -> Nothing } ) | ||||
|   -- assumes no nesting | ||||
|   void $ skipManyTill anySingle ( cppDirective ( \case { "endif" -> Just (); _ -> Nothing } ) ) | ||||
|   | ||||
							
								
								
									
										1
									
								
								src/DearImGui/Raw/Context.hs
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								src/DearImGui/Raw/Context.hs
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../../../dear-imgui.hs/src/DearImGui/Raw/Context.hs | ||||
| @@ -40,7 +40,7 @@ import System.IO.Unsafe | ||||
|  | ||||
| -- dear-imgui | ||||
| import DearImGui | ||||
| import DearImGui.Context | ||||
| import DearImGui.Raw.Context | ||||
| import DearImGui.Plot.Context | ||||
|   ( implotContext ) | ||||
| import DearImGui.Plot.Enums | ||||
|   | ||||
		Reference in New Issue
	
	Block a user