[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ros-diffs
Subject:    [ros-diffs] [CVS reactos] implemented GetCurrentObject()
From:       weiden () osexperts ! com
Date:       2004-04-25 15:31:43
Message-ID: 20040425153143.A34EC43AA () mok ! osexperts ! com
[Download RAW message or body]

<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>reactos</tt></b><span id="info"> on \
MAIN</span></td></tr> <tr><td><tt>include/<a href="#file1">defines.h</a></tt></td><td \
align="right" id="added">+7</td><td align="right" id="removed">-6</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h?rev=1.84&amp;content-type=text/x-cvsweb-markup">1.84</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h.diff?r1=text&amp;tr1=1.84&amp;r2=text&amp;tr2=1.85&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h?rev=1.85&amp;content-type=text/x-cvsweb-markup">1.85</a></td></tr>
 <tr class="alt"><td><tt>lib/gdi32/misc/<a href="#file2">stubs.c</a></tt></td><td \
align="right" id="added">+1</td><td align="right" id="removed">-16</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c?rev=1.55&amp;content-type=text/x-cvsweb-markup">1.55</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c.diff?r1=text&amp;tr1=1.55&amp;r2=text&amp;tr2=1.56&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c?rev=1.56&amp;content-type=text/x-cvsweb-markup">1.56</a></td></tr>
 <tr><td><tt>lib/gdi32/objects/<a href="#file3">dc.c</a></tt></td><td align="right" \
id="added">+13</td><td></td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c?rev=1.30&amp;content-type=text/x-cvsweb-markup">1.30</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c.diff?r1=text&amp;tr1=1.30&amp;r2=text&amp;tr2=1.31&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c?rev=1.31&amp;content-type=text/x-cvsweb-markup">1.31</a></td></tr>
 <tr class="alt"><td><tt>subsys/win32k/objects/<a href="#file4">dc.c</a></tt></td><td \
align="right" id="added">+42</td><td align="right" id="removed">-2</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.130&amp;content-type=text/x-cvsweb-markup">1.130</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c.diff?r1=text&amp;tr1=1.130&amp;r2=text&amp;tr2=1.131&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.131&amp;content-type=text/x-cvsweb-markup">1.131</a></td></tr>
 <tr><td></td><td align="right" id="added">+63</td><td align="right" \
id="removed">-24</td><td></td></tr> </table>
<small id="info">4 modified files</small><br />
<div class="tasklist"><ul>
<li><a href="#task1">FIXME: NtGdiGetCurrentObject() ObjectType OBJ_PAL not supported \
yet!\n");</a></li> <li><a href="#task2">FIXME: NtGdiGetCurrentObject() ObjectType \
OBJ_COLORSPACE not supported yet!\n");</a></li> </ul></div>
<pre class="comment">
implemented GetCurrentObject()
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include">include</a><br /></span> \
<div class="fileheader"><big><b>defines.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h?rev=1.84&amp;content-type=text/x-cvsweb-markup">1.84</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h.diff?r1=text&amp;tr1=1.84&amp;r2=text&amp;tr2=1.85&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/defines.h?rev=1.85&amp;content-type=text/x-cvsweb-markup">1.85</a></small></div>
 <pre class="diff"><small id="info">diff -u -r1.84 -r1.85
--- defines.h	23 Mar 2004 00:18:54 -0000	1.84
+++ defines.h	25 Apr 2004 15:31:42 -0000	1.85
@@ -1092,19 +1092,20 @@
</small></pre><pre class="diff" id="context"> #define TRUETYPE_FONTTYPE	(4)
 
 /* EnumObjects, GetCurrentObject, GetObjectType */
</pre><pre class="diff" id="removed">-#define OBJ_BRUSH	(2)
</pre><pre class="diff" id="context"> #define OBJ_PEN	(1)
</pre><pre class="diff" id="added">+#define OBJ_BRUSH	(2)
+#define OBJ_DC	(3)
+#define OBJ_METADC	(4)
</pre><pre class="diff" id="context"> #define OBJ_PAL	(5)
 #define OBJ_FONT	(6)
 #define OBJ_BITMAP	(7)
</pre><pre class="diff" id="removed">-#define OBJ_EXTPEN	(11)
</pre><pre class="diff" id="context"> #define OBJ_REGION	(8)
</pre><pre class="diff" id="removed">-#define OBJ_DC	(3)
-#define OBJ_MEMDC	(10)
</pre><pre class="diff" id="context"> #define OBJ_METAFILE	(9)
</pre><pre class="diff" id="removed">-#define OBJ_METADC	(4)
-#define OBJ_ENHMETAFILE	(13)
</pre><pre class="diff" id="added">+#define OBJ_MEMDC	(10)
+#define OBJ_EXTPEN	(11)
</pre><pre class="diff" id="context"> #define OBJ_ENHMETADC	(12)
</pre><pre class="diff" id="added">+#define OBJ_ENHMETAFILE	(13)
+#define OBJ_COLORSPACE	(14)
</pre><pre class="diff" id="context"> 
 /* EnumPrinters */
 
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib">lib</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32">gdi32</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc">misc</a><br \
/></span> <div class="fileheader"><big><b>stubs.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c?rev=1.55&amp;content-type=text/x-cvsweb-markup">1.55</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c.diff?r1=text&amp;tr1=1.55&amp;r2=text&amp;tr2=1.56&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/misc/stubs.c?rev=1.56&amp;content-type=text/x-cvsweb-markup">1.56</a></small></div>
 <pre class="diff"><small id="info">diff -u -r1.55 -r1.56
--- stubs.c	25 Apr 2004 14:46:53 -0000	1.55
+++ stubs.c	25 Apr 2004 15:31:43 -0000	1.56
@@ -1,4 +1,4 @@
</small></pre><pre class="diff" id="removed">-/* $Id: stubs.c,v 1.55 2004/04/25 \
14:46:53 weiden Exp $ </pre><pre class="diff" id="added">+/* $Id: stubs.c,v 1.56 \
2004/04/25 15:31:43 weiden Exp $ </pre><pre class="diff" id="context">  *
  * reactos/lib/gdi32/misc/stubs.c
  *
</pre><pre class="diff"><small id="info">@@ -259,21 +259,6 @@
</small></pre><pre class="diff" id="context"> /*
  * @unimplemented
  */
</pre><pre class="diff" id="removed">-HGDIOBJ
-STDCALL
-GetCurrentObject(
-	HDC	a0,
-	UINT	a1
-	)
-{
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-
-/*
- * @unimplemented
- */
</pre><pre class="diff" id="context"> DWORD
 STDCALL
 GetFontData(
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib">lib</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32">gdi32</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>dc.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c?rev=1.30&amp;content-type=text/x-cvsweb-markup">1.30</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c.diff?r1=text&amp;tr1=1.30&amp;r2=text&amp;tr2=1.31&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/lib/gdi32/objects/dc.c?rev=1.31&amp;content-type=text/x-cvsweb-markup">1.31</a></small></div>
 <pre class="diff"><small id="info">diff -u -r1.30 -r1.31
--- dc.c	25 Apr 2004 14:46:54 -0000	1.30
+++ dc.c	25 Apr 2004 15:31:43 -0000	1.31
@@ -1030,3 +1030,16 @@
</small></pre><pre class="diff" id="context">   return FALSE;
 }
 
</pre><pre class="diff" id="added">+
+/*
+ * @implemented
+ */
+HGDIOBJ
+STDCALL
+GetCurrentObject(
+	HDC	hdc,
+	UINT	uObjectType
+	)
+{
+  return NtGdiGetCurrentObject(hdc, uObjectType);
+}
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>dc.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.130&amp;content-type=text/x-cvsweb-markup">1.130</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c.diff?r1=text&amp;tr1=1.130&amp;r2=text&amp;tr2=1.131&amp;f=h">-&gt;</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.131&amp;content-type=text/x-cvsweb-markup">1.131</a></small></div>
 <pre class="diff"><small id="info">diff -u -r1.130 -r1.131
--- dc.c	25 Apr 2004 12:51:53 -0000	1.130
+++ dc.c	25 Apr 2004 15:31:43 -0000	1.131
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context">  *  along with this program; if not, \
                write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
</pre><pre class="diff" id="removed">-/* $Id: dc.c,v 1.130 2004/04/25 12:51:53 weiden \
Exp $ </pre><pre class="diff" id="added">+/* $Id: dc.c,v 1.131 2004/04/25 15:31:43 \
weiden Exp $ </pre><pre class="diff" id="context">  *
  * DC.C - Device context functions
  *
</pre><pre class="diff"><small id="info">@@ -56,6 +56,10 @@
</small></pre><pre class="diff" id="context"> #define NDEBUG
 #include &lt;win32k/debug1.h&gt;
 
</pre><pre class="diff" id="added">+#ifndef OBJ_COLORSPACE
+#define OBJ_COLORSPACE	(14)
+#endif
+
</pre><pre class="diff" id="context"> static GDIDEVICE PrimarySurface;
 
 /* FIXME: DCs should probably be thread safe  */
</pre><pre class="diff"><small id="info">@@ -962,7 +966,43 @@
</small></pre><pre class="diff" id="context"> HGDIOBJ STDCALL
 NtGdiGetCurrentObject(HDC  hDC, UINT  ObjectType)
 {
</pre><pre class="diff" id="removed">-  UNIMPLEMENTED;
</pre><pre class="diff" id="added">+  HGDIOBJ SelObject;
+  DC *dc;
+  
+  if(!(dc = DC_LockDc(hDC)))
+  {
+    SetLastWin32Error(ERROR_INVALID_HANDLE);
+    return NULL;
+  }
+  
+  switch(ObjectType)
+  {
+    case OBJ_PEN:
+      SelObject = dc-&gt;w.hPen;
+      break;
+    case OBJ_BRUSH:
+      SelObject = dc-&gt;w.hBrush;
+      break;
+    case OBJ_PAL:
<a name="task1" />+      DPRINT1("<span class="task">FIXME</span>: \
NtGdiGetCurrentObject() ObjectType OBJ_PAL not supported yet!\n"); +      break;
+    case OBJ_FONT:
+      SelObject = dc-&gt;w.hFont;
+      break;
+    case OBJ_BITMAP:
+      SelObject = dc-&gt;w.hBitmap;
+      break;
+    case OBJ_COLORSPACE:
<a name="task2" />+      DPRINT1("<span class="task">FIXME</span>: \
NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not supported yet!\n"); +      \
break; +    default:
+      SelObject = NULL;
+      SetLastWin32Error(ERROR_INVALID_PARAMETER);
+      break;
+  }
+  
+  DC_UnlockDc(hDC);
+  return SelObject;
</pre><pre class="diff" id="context"> }
 
 DC_GET_VAL_EX ( GetCurrentPositionEx, w.CursPosX, w.CursPosY, POINT, x, y )
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" \
title="commit -&gt; email">CVSspam</a> 0.2.8</small></center> </body></html>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic