Browse Source

draw a kludgey resize box in the corner

David Rose 19 years ago
parent
commit
ef26d66a3c

+ 72 - 0
panda/src/osxdisplay/osxGraphicsStateGuardian.cxx

@@ -17,11 +17,16 @@
 #include "osxGraphicsBuffer.h"
 #include "string_utils.h"
 #include "config_osxdisplay.h"
+#include "pnmImage.h"
 
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #import <mach-o/dyld.h>
 
+// This is generated data for the standard texture we use for drawing
+// the resize box in the window corner.
+#include "resize_box.rgb.c"
+
 TypeHandle osxGraphicsStateGuardian::_type_handle;
 
 
@@ -105,6 +110,73 @@ void osxGraphicsStateGuardian::reset()
   GLGraphicsStateGuardian::reset();
  }
 
+////////////////////////////////////////////////////////////////////
+//     Function: osxGraphicsStateGuardian::draw_resize_box
+//       Access: Public, Virtual
+//  Description: Draws an OSX-style resize icon in the bottom right
+//               corner of the current display region.  This is
+//               normally done automatically at the end of each frame
+//               when the window is indicated as resizable, since the
+//               3-D graphics overlay the normal, OS-drawn resize icon
+//               and the user won't be able see it.
+////////////////////////////////////////////////////////////////////
+void osxGraphicsStateGuardian::
+draw_resize_box() {
+  // This state is created, once, and never freed.
+  static CPT(RenderState) state;
+  if (state == (RenderState *)NULL) {
+    state = RenderState::make(TransparencyAttrib::make(TransparencyAttrib::M_alpha),
+                              DepthWriteAttrib::make(DepthWriteAttrib::M_off),
+                              DepthTestAttrib::make(DepthTestAttrib::M_none));
+
+    // Get the default texture to apply to the resize box; it's
+    // compiled into the code.
+    string resize_box_string((const char *)resize_box, resize_box_len);
+    istringstream resize_box_strm(resize_box_string);
+    PNMImage resize_box_pnm;
+    if (resize_box_pnm.read(resize_box_strm, "resize_box.rgb")) {
+      PT(Texture) tex = new Texture;
+      tex->set_name("resize_box.rgb");
+      tex->load(resize_box_pnm);
+      tex->set_minfilter(Texture::FT_linear);
+      tex->set_magfilter(Texture::FT_linear);
+      state = state->add_attrib(TextureAttrib::make(tex));
+    }
+  }
+
+  // Clear out the lens.
+  _projection_mat_inv = _projection_mat = TransformState::make_identity();
+  prepare_lens();
+
+  // Set the state to our specific, known state for drawing the icon.
+  set_state_and_transform(state, TransformState::make_identity());
+
+  // Now determine the inner corner of the quad, choosing a 15x15
+  // pixel square in the lower-right corner, computed from the
+  // viewport size.
+  float inner_x = 1.0f - (15.0f * 2.0f / _viewport_width);
+  float inner_y = (15.0f * 2.0f / _viewport_height) - 1.0f;
+  
+  // Draw the quad.  We just use the slow, simple immediate mode calls
+  // here.  It's just one quad, after all.
+  glBegin(GL_QUADS);
+
+  glColor4f(1.0, 1.0, 1.0, 1.0);
+  glTexCoord2f(0.0, 0.0);
+  glVertex2f(inner_x, -1.0);
+
+  glTexCoord2f(0.9375, 0.0);
+  glVertex2f(1.0, -1.0);
+
+  glTexCoord2f(0.9375, 0.9375);
+  glVertex2f(1.0, inner_y);
+
+  glTexCoord2f(0.0, 0.9375);
+  glVertex2f(inner_x, inner_y);
+
+  glEnd();
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: osxGraphicsStateGuardian::buildGL
 //       Access: Public, Virtual

+ 2 - 0
panda/src/osxdisplay/osxGraphicsStateGuardian.h

@@ -40,6 +40,8 @@ public:
                            osxGraphicsStateGuardian *share_with);
   virtual ~osxGraphicsStateGuardian();
   virtual void reset();
+
+  void draw_resize_box();
 	
 protected:
   virtual void *get_extension_func(const char *prefix, const char *name);

+ 15 - 6
panda/src/osxdisplay/osxGraphicsWindow.cxx

@@ -621,14 +621,23 @@ void osxGraphicsWindow::end_frame(FrameMode mode, Thread *current_thread)
 {
   end_frame_spam();
   
-  if(mode == FM_render )
-  {
-  nassertv(_gsg != (GraphicsStateGuardian *)NULL);
-
+  if(mode == FM_render ) {
+    nassertv(_gsg != (GraphicsStateGuardian *)NULL);
+
+    if (!_properties.get_fixed_size() && 
+        !_properties.get_undecorated() && 
+        !_properties.get_fullscreen()) {
+      // Draw a kludgey little resize box in the corner of the window,
+      // so the user knows he's supposed to be able to drag the window
+      // if he wants.
+      DisplayRegionPipelineReader dr_reader(_default_display_region, current_thread);
+      _gsg->prepare_display_region(&dr_reader, Lens::SC_mono);
+      DCAST(osxGraphicsStateGuardian, _gsg)->draw_resize_box();
+    }
+      
 	aglSwapBuffers (get_ggs_context());
-  _gsg->end_frame(current_thread);
+    _gsg->end_frame(current_thread);
   }
-//  trigger_flip();
 }
 
 ////////////////////////////////////////////////////////////////////

BIN
panda/src/osxdisplay/resize_box.rgb


+ 165 - 0
panda/src/osxdisplay/resize_box.rgb.c

@@ -0,0 +1,165 @@
+
+/*
+ * This table was generated by the command:
+ *
+ * bin2c -static -string -n resize_box -o resize_box.rgb.c resize_box.rgb
+ */
+
+static const unsigned char resize_box[] = {
+  0x01, 0xda, 0x01, 0x01, 0x00, 0x03, 0x00, 0x10, 0x00, 0x10, 0x00,
+  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x81, 0x00,
+  0x00, 0x06, 0x38, 0x00, 0x00, 0x05, 0xf2, 0x00, 0x00, 0x05, 0xb0,
+  0x00, 0x00, 0x05, 0x7a, 0x00, 0x00, 0x05, 0x41, 0x00, 0x00, 0x05,
+  0x0b, 0x00, 0x00, 0x04, 0xd9, 0x00, 0x00, 0x04, 0xb3, 0x00, 0x00,
+  0x04, 0x8a, 0x00, 0x00, 0x04, 0x64, 0x00, 0x00, 0x04, 0x42, 0x00,
+  0x00, 0x04, 0x30, 0x00, 0x00, 0x04, 0x1e, 0x00, 0x00, 0x04, 0x0c,
+  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x86, 0x00, 0x00, 0x06,
+  0x4b, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x05, 0xc1, 0x00, 0x00,
+  0x05, 0x88, 0x00, 0x00, 0x05, 0x50, 0x00, 0x00, 0x05, 0x19, 0x00,
+  0x00, 0x04, 0xe6, 0x00, 0x00, 0x04, 0xbd, 0x00, 0x00, 0x04, 0x95,
+  0x00, 0x00, 0x04, 0x6e, 0x00, 0x00, 0x04, 0x4b, 0x00, 0x00, 0x04,
+  0x35, 0x00, 0x00, 0x04, 0x23, 0x00, 0x00, 0x04, 0x11, 0x00, 0x00,
+  0x04, 0x03, 0x00, 0x00, 0x06, 0x8b, 0x00, 0x00, 0x06, 0x5e, 0x00,
+  0x00, 0x06, 0x16, 0x00, 0x00, 0x05, 0xd2, 0x00, 0x00, 0x05, 0x96,
+  0x00, 0x00, 0x05, 0x5f, 0x00, 0x00, 0x05, 0x27, 0x00, 0x00, 0x04,
+  0xf3, 0x00, 0x00, 0x04, 0xc7, 0x00, 0x00, 0x04, 0xa0, 0x00, 0x00,
+  0x04, 0x78, 0x00, 0x00, 0x04, 0x54, 0x00, 0x00, 0x04, 0x3a, 0x00,
+  0x00, 0x04, 0x28, 0x00, 0x00, 0x04, 0x16, 0x00, 0x00, 0x04, 0x06,
+  0x00, 0x00, 0x06, 0x90, 0x00, 0x00, 0x06, 0x71, 0x00, 0x00, 0x06,
+  0x28, 0x00, 0x00, 0x05, 0xe3, 0x00, 0x00, 0x05, 0xa4, 0x00, 0x00,
+  0x05, 0x6e, 0x00, 0x00, 0x05, 0x35, 0x00, 0x00, 0x05, 0x00, 0x00,
+  0x00, 0x04, 0xd1, 0x00, 0x00, 0x04, 0xab, 0x00, 0x00, 0x04, 0x82,
+  0x00, 0x00, 0x04, 0x5d, 0x00, 0x00, 0x04, 0x3f, 0x00, 0x00, 0x04,
+  0x2d, 0x00, 0x00, 0x04, 0x1b, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00,
+  0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00,
+  0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f,
+  0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+  0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00,
+  0x00, 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
+  0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05,
+  0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
+  0x11, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
+  0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0a, 0x00,
+  0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x09,
+  0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+  0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
+  0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00,
+  0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0e,
+  0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+  0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
+  0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
+  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10,
+  0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+  0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
+  0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
+  0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03,
+  0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+  0x03, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10,
+  0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00,
+  0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0f, 0xec,
+  0x01, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x0f, 0xec, 0x01,
+  0x00, 0x00, 0x10, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x0f,
+  0xec, 0x01, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x10, 0x00,
+  0x00, 0x0d, 0xec, 0x81, 0xcf, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0d,
+  0xec, 0x81, 0xcf, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0d, 0xec, 0x81,
+  0xcf, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x81, 0xff, 0x02,
+  0x00, 0x00, 0x0c, 0xec, 0x82, 0xcf, 0x80, 0x01, 0xec, 0x01, 0x00,
+  0x00, 0x0c, 0xec, 0x82, 0xcf, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00,
+  0x0c, 0xec, 0x82, 0xcf, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0c,
+  0x00, 0x82, 0xff, 0xff, 0x02, 0x00, 0x00, 0x0b, 0xec, 0x83, 0xca,
+  0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0b, 0xec, 0x83, 0xca,
+  0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0b, 0xec, 0x83, 0xca,
+  0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x82, 0xff,
+  0xff, 0x03, 0x00, 0x00, 0x0a, 0xec, 0x82, 0xca, 0x7e, 0x03, 0xec,
+  0x01, 0x00, 0x00, 0x0a, 0xec, 0x82, 0xca, 0x7e, 0x03, 0xec, 0x01,
+  0x00, 0x00, 0x0a, 0xec, 0x82, 0xca, 0x7e, 0x03, 0xec, 0x01, 0x00,
+  0x00, 0x0a, 0x00, 0x82, 0xff, 0xff, 0x04, 0x00, 0x00, 0x09, 0xec,
+  0x85, 0xcc, 0x80, 0xec, 0xec, 0xcf, 0x01, 0xec, 0x01, 0x00, 0x00,
+  0x09, 0xec, 0x85, 0xcc, 0x80, 0xec, 0xec, 0xcf, 0x01, 0xec, 0x01,
+  0x00, 0x00, 0x09, 0xec, 0x85, 0xcc, 0x80, 0xec, 0xec, 0xcf, 0x01,
+  0xec, 0x01, 0x00, 0x00, 0x09, 0x00, 0x85, 0xff, 0xff, 0x00, 0x00,
+  0xff, 0x02, 0x00, 0x00, 0x08, 0xec, 0x86, 0xca, 0x80, 0xec, 0xec,
+  0xcf, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00, 0x08, 0xec, 0x86, 0xca,
+  0x80, 0xec, 0xec, 0xcf, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00, 0x08,
+  0xec, 0x86, 0xca, 0x80, 0xec, 0xec, 0xcf, 0x80, 0x01, 0xec, 0x01,
+  0x00, 0x00, 0x08, 0x00, 0x86, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
+  0x02, 0x00, 0x00, 0x07, 0xec, 0x87, 0xc6, 0x7e, 0xec, 0xec, 0xc9,
+  0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00, 0x07, 0xec, 0x87, 0xc6,
+  0x7e, 0xec, 0xec, 0xc9, 0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00,
+  0x07, 0xec, 0x87, 0xc6, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0xec, 0x01,
+  0xec, 0x01, 0x00, 0x00, 0x07, 0x00, 0x86, 0xff, 0xff, 0x00, 0x00,
+  0xff, 0xff, 0x03, 0x00, 0x00, 0x06, 0xec, 0x86, 0xc6, 0x7e, 0xec,
+  0xec, 0xc9, 0x7e, 0x03, 0xec, 0x01, 0x00, 0x00, 0x06, 0xec, 0x86,
+  0xc6, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0x03, 0xec, 0x01, 0x00, 0x00,
+  0x06, 0xec, 0x86, 0xc6, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0x03, 0xec,
+  0x01, 0x00, 0x00, 0x06, 0x00, 0x86, 0xff, 0xff, 0x00, 0x00, 0xff,
+  0xff, 0x04, 0x00, 0x00, 0x05, 0xec, 0x89, 0xc8, 0x80, 0xec, 0xec,
+  0xcd, 0x80, 0xec, 0xec, 0xcd, 0x01, 0xec, 0x01, 0x00, 0x00, 0x05,
+  0xec, 0x89, 0xc8, 0x80, 0xec, 0xec, 0xcd, 0x80, 0xec, 0xec, 0xcd,
+  0x01, 0xec, 0x01, 0x00, 0x00, 0x05, 0xec, 0x89, 0xc8, 0x80, 0xec,
+  0xec, 0xcd, 0x80, 0xec, 0xec, 0xcd, 0x01, 0xec, 0x01, 0x00, 0x00,
+  0x05, 0x00, 0x89, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+  0xff, 0x02, 0x00, 0x00, 0x04, 0xec, 0x8a, 0xcd, 0x80, 0xec, 0xec,
+  0xcd, 0x80, 0xec, 0xec, 0xcd, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00,
+  0x04, 0xec, 0x8a, 0xcd, 0x80, 0xec, 0xec, 0xcd, 0x80, 0xec, 0xec,
+  0xcd, 0x80, 0x01, 0xec, 0x01, 0x00, 0x00, 0x04, 0xec, 0x8a, 0xcd,
+  0x80, 0xec, 0xec, 0xcd, 0x80, 0xec, 0xec, 0xcd, 0x80, 0x01, 0xec,
+  0x01, 0x00, 0x00, 0x04, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x00, 0xff,
+  0xff, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x03, 0xec, 0x8b,
+  0xc9, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0xec,
+  0x01, 0xec, 0x01, 0x00, 0x00, 0x03, 0xec, 0x8b, 0xc9, 0x7e, 0xec,
+  0xec, 0xc9, 0x7e, 0xec, 0xec, 0xc9, 0x7e, 0xec, 0x01, 0xec, 0x01,
+  0x00, 0x00, 0x03, 0xec, 0x8b, 0xc9, 0x7e, 0xec, 0xec, 0xc9, 0x7e,
+  0xec, 0xec, 0xc9, 0x7e, 0xec, 0x01, 0xec, 0x01, 0x00, 0x00, 0x03,
+  0x00, 0x8a, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff,
+  0xff, 0x03, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x0f, 0xec,
+  0x01, 0x00, 0x00, 0x0f, 0xec, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00
+};
+
+static const size_t resize_box_len = 1683;
+