Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1932
Modified Files:
win32gui.i
Log Message:
Add IsWindowEnabled, CopyIcon, GetCursor, GetCursorInfo and
InitCommonControlsEx,
Index: win32gui.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** win32gui.i 13 May 2004 14:16:13 -0000 1.39
--- win32gui.i 19 May 2004 10:24:37 -0000 1.40
***************
*** 1461,1464 ****
--- 1461,1482 ----
void InitCommonControls();
+ %{
+ // @pyswig |InitCommonControlsEx|Initializes specific common controls.
+ static PyObject *PyInitCommonControlsEx(PyObject *self, PyObject *args)
+ {
+ int flag;
+ // @pyparm int|flag||One of the ICC_ constants
+ if (!PyArg_ParseTuple(args, "i", &flag))
+ return NULL;
+ INITCOMMONCONTROLSEX cc;
+ cc.dwSize = sizeof(cc);
+ cc.dwICC = flag;
+ if (!InitCommonControlsEx(&cc))
+ return PyWin_SetAPIError("InitCommonControlsEx");
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ %}
+ %native (InitCommonControlsEx) PyInitCommonControlsEx;
// @pyswig HCURSOR|LoadCursor|Loads a cursor.
***************
*** 1473,1476 ****
--- 1491,1512 ----
);
+ // @pyswig HCURSOR|GetCursor|
+ HCURSOR GetCursor();
+
+ %{
+ // @pyswig flags, hcursor, (x,y)|GetCursorInfo|Retrieves information about the global cursor.
+ PyObject *PyGetCursorInfo(PyObject *self, PyObject *args)
+ {
+ CURSORINFO ci;
+ ci.cbSize = sizeof(ci);
+ if (!PyArg_NoArgs(args))
+ return NULL;
+ if (!::GetCursorInfo(&ci))
+ return PyWin_SetAPIError("GetCursorInfo");
+ return Py_BuildValue("ii(ii)", ci.flags, ci.hCursor, ci.ptScreenPos.x, ci.ptScreenPos.y);
+ }
+ %}
+ %native(GetCursorInfo) PyGetCursorInfo;
+
// @pyswig HACCEL|CreateAcceleratorTable|Creates an accelerator table
%{
***************
*** 1540,1543 ****
--- 1576,1583 ----
HICON LoadIcon(HINSTANCE hInst, RESOURCE_ID name);
+ // @pyswig HICON|CopyIcon|Copies an icon
+ // #pyparm int|hicon||Existing icon
+ HICON CopyIcon(HICON hicon);
+
// @pyswig HANDLE|LoadImage|Loads a bitmap, cursor or icon
HANDLE LoadImage(HINSTANCE hInst, // @pyparm int|hinst||Handle to an instance of the module that contains the image to be loaded. To load an OEM image, set this parameter to zero.
***************
*** 1700,1703 ****
--- 1740,1747 ----
BOOL IsWindowVisible(HWND hwnd);
+ // @pyswig int|IsWindowEnabled|Indicates if the window is enabled.
+ // @pyparm int|hwnd||The handle to the window
+ BOOL IsWindowEnabled(HWND hwnd);
+
// @pyswig |SetFocus|Sets focus to the specified window.
// @pyparm int|hwnd||The handle to the window
|