# Path: fofix/core/Language.py
# def getAvailableLanguages():


import logging
import os
import struct
import pygame
            import win32api
            import win32gui
            import win32con
            import win32gui
            import win32con
            import atexit
from PIL import Image
from OpenGL.GL import *
from OpenGL.GL.ARB.multisample import *
from fofix.core.Language import _
            # then the alpha mask.  See documentation for the BITMAPINFOHEADER
            # structure for what the fields mean.  Not all fields are used -
            # http://msdn.microsoft.com/en-us/library/ms997538.aspx says which ones
            # don't matter and says to set them to zero.  We double the height for
            # reasons mentioned on that page, too.
            bigIconData = struct.pack('<LllHHLLllLL', 40, 32, 64, 1, 32, 0, len(bigIconColorData+bigIconMaskData), 0, 0, 0, 0) + bigIconColorData + bigIconMaskData
            smallIconData = struct.pack('<LllHHLLllLL', 40, 16, 32, 1, 32, 0, len(smallIconColorData+smallIconMaskData), 0, 0, 0, 0) + smallIconColorData + smallIconMaskData

            # Finally actually create the icons from the icon resource structures.
            hIconBig = win32gui.CreateIconFromResource(bigIconData, True, 0x00030000)
            hIconSmall = win32gui.CreateIconFromResource(smallIconData, True, 0x00030000)

            # And set the window's icon to our fresh new icon handles.
            win32api.SendMessage(hwnd, win32con.WM_SETICON, win32con.ICON_BIG, hIconBig)
            win32api.SendMessage(hwnd, win32con.WM_SETICON, win32con.ICON_SMALL, hIconSmall)

        if multisamples:
            try:
                glEnable(GL_MULTISAMPLE_ARB)
            except Exception:
                pass

        return bool(self.screen)

    def screenError(self):
        log.error("Video setup failed. Make sure your graphics card supports 32-bit display modes.")
        raise

    def resolutionReset(self):
        log.warning("Video setup failed. Trying default windowed resolution.")

# Path: fofix/core/Language.py
# def getAvailableLanguages():


# Path: fofix/core/Video.py
import logging
import os
import struct
import pygame
            import win32api
            import win32gui
            import win32con
            import win32gui
            import win32con
            import atexit
from PIL import Image
from OpenGL.GL import *
from OpenGL.GL.ARB.multisample import *
from fofix.core.Language import _

            # then the alpha mask.  See documentation for the BITMAPINFOHEADER
            # structure for what the fields mean.  Not all fields are used -
            # http://msdn.microsoft.com/en-us/library/ms997538.aspx says which ones
            # don't matter and says to set them to zero.  We double the height for
            # reasons mentioned on that page, too.
            bigIconData = struct.pack('<LllHHLLllLL', 40, 32, 64, 1, 32, 0, len(bigIconColorData+bigIconMaskData), 0, 0, 0, 0) + bigIconColorData + bigIconMaskData
            smallIconData = struct.pack('<LllHHLLllLL', 40, 16, 32, 1, 32, 0, len(smallIconColorData+smallIconMaskData), 0, 0, 0, 0) + smallIconColorData + smallIconMaskData

            # Finally actually create the icons from the icon resource structures.
            hIconBig = win32gui.CreateIconFromResource(bigIconData, True, 0x00030000)
            hIconSmall = win32gui.CreateIconFromResource(smallIconData, True, 0x00030000)

            # And set the window's icon to our fresh new icon handles.
            win32api.SendMessage(hwnd, win32con.WM_SETICON, win32con.ICON_BIG, hIconBig)
            win32api.SendMessage(hwnd, win32con.WM_SETICON, win32con.ICON_SMALL, hIconSmall)

        if multisamples:
            try:
                glEnable(GL_MULTISAMPLE_ARB)
            except Exception:
                pass

        return bool(self.screen)

    def screenError(self):
        log.error("Video setup failed. Make sure your graphics card supports 32-bit display modes.")
        raise

    def resolutionReset(self):
        log.warning("Video setup failed. Trying default windowed resolution.")

        self.error.append(_("Video setup failed with your resolution settings, and so were reset to defaults."))