magscope.app_icon
=================

.. py:module:: magscope.app_icon


Attributes
----------

.. autoapisummary::

   magscope.app_icon.APP_USER_MODEL_ID
   magscope.app_icon.TASKBAR_ICON_RESOURCE
   magscope.app_icon.WINDOW_ICON_RESOURCE
   magscope.app_icon._ICON_PIXMAP_SIZES
   magscope.app_icon._WINDOWS_ICON_HANDLES
   magscope.app_icon._WM_SETICON
   magscope.app_icon._ICON_SMALL
   magscope.app_icon._ICON_BIG
   magscope.app_icon._GCLP_HICON
   magscope.app_icon._GCLP_HICONSM


Functions
---------

.. autoapisummary::

   magscope.app_icon.set_windows_app_user_model_id
   magscope.app_icon.load_app_icon
   magscope.app_icon.apply_windows_native_window_icon
   magscope.app_icon._load_windows_hicon
   magscope.app_icon._set_windows_window_icon
   magscope.app_icon._set_windows_class_icon


Module Contents
---------------

.. py:data:: APP_USER_MODEL_ID
   :value: 'MagScope.MagScope.Desktop'


.. py:data:: TASKBAR_ICON_RESOURCE
   :value: 'app_icon_taskbar.svg'


.. py:data:: WINDOW_ICON_RESOURCE
   :value: 'app_icon_window.svg'


.. py:data:: _ICON_PIXMAP_SIZES

.. py:data:: _WINDOWS_ICON_HANDLES
   :type:  list[int]
   :value: []


.. py:data:: _WM_SETICON
   :value: 128


.. py:data:: _ICON_SMALL
   :value: 0


.. py:data:: _ICON_BIG
   :value: 1


.. py:data:: _GCLP_HICON
   :value: -14


.. py:data:: _GCLP_HICONSM
   :value: -34


.. py:function:: set_windows_app_user_model_id(app_id: str = APP_USER_MODEL_ID) -> None

   Set the Windows app identity used for taskbar grouping and icons.


.. py:function:: load_app_icon()

   Build the MagScope Qt icon with simple small sizes and richer large sizes.


.. py:function:: apply_windows_native_window_icon(window: Any) -> None

   Apply native Windows small and taskbar icons to an existing Qt window.


.. py:function:: _load_windows_hicon(resource_name: str, size: int) -> int

.. py:function:: _set_windows_window_icon(hwnd: int, icon_type: int, hicon: int) -> None

.. py:function:: _set_windows_class_icon(hwnd: int, index: int, hicon: int) -> None

