Loading ...
Sorry, an error occurred while loading the content.
 

patch for QNX (and the photon gui)

Expand Messages
  • Julian Kinraid
    Hi, This patch just fixes a few problems for the qnx port - * A mistake in os_qnx.c * Scrolling in vertically split windows with photon * A few functions were
    Message 1 of 1 , Apr 5, 2001
      Hi,

      This patch just fixes a few problems for the qnx port -
      * A mistake in os_qnx.c
      * Scrolling in vertically split windows with photon
      * A few functions were not defined as static, which just happened to
      break compilation due to differences between the prototype in
      gui_photon.pro and the definition in the code
      * Plus some pointless scrollbar code was removed

      The gui_photon.pro will need to be regenerated.

      Julian Kinraid


      --- os_qnx.c~ Mon Apr 2 21:51:30 2001
      +++ os_qnx.c Thu Apr 5 21:48:37 2001
      @@ -56,7 +56,7 @@
      void
      clip_mch_request_selection( VimClipboard *cbd )
      {
      - int type = 'L', clip_length = 0;
      + int type = MLINE, clip_length = 0;
      void *cbdata;
      PhClipHeader *clip_header;
      char_u *clip_text = NULL;
      --- gui_photon.c.orig Thu Apr 5 04:56:34 2001
      +++ gui_photon.c Thu Apr 5 21:42:31 2001
      @@ -813,7 +813,7 @@
      #define DRAW_END gui_ph_draw_end()

      /* TODO: Set a clipping rect? */
      - void
      + static void
      gui_ph_draw_start( void )
      {
      PgSetRegion( PtWidgetRid( PtFindDisjoint( gui.vimTextArea ) ) );
      @@ -824,7 +824,7 @@
      PgSetTranslation( &gui_ph_raw_offset, Pg_RELATIVE );
      }

      - void
      + static void
      gui_ph_draw_end( void )
      {
      gui_ph_raw_offset.x = -gui_ph_raw_offset.x;
      @@ -1606,10 +1606,6 @@
      PhArea_t area = {{ x, y }, { w, h }};

      PtSetResource( sb->id, Pt_ARG_AREA, &area, 0 );
      -
      - if( ! PtWidgetIsRealized( sb->id ) )
      - PtRealizeWidget( sb->id );
      -
      }

      void
      @@ -1661,7 +1657,7 @@
      gui_mch_enable_scrollbar(scrollbar_t *sb, int flag)
      {
      if( flag != 0 )
      - ; /*PtRealizeWidget( sb->id );*/
      + PtRealizeWidget( sb->id );
      else
      PtUnrealizeWidget( sb->id );
      }
      @@ -1982,15 +1978,13 @@
      void
      gui_mch_delete_lines(int row, int num_lines)
      {
      - int top;
      PhRect_t rect;
      PhPoint_t delta;

      - rect.ul.x = FILL_X( 0 );
      - top = row + num_lines;
      - rect.ul.y = FILL_Y( top );
      + rect.ul.x = FILL_X( gui.scroll_region_left );
      + rect.ul.y = FILL_Y( row + num_lines );

      - rect.lr.x = FILL_X( Columns ) - 1;
      + rect.lr.x = FILL_X( gui.scroll_region_right + 1 ) - 1;
      rect.lr.y = FILL_Y( gui.scroll_region_bot + 1) - 1;

      PtWidgetOffset( gui.vimTextArea, &gui_ph_raw_offset );
      @@ -2004,23 +1998,24 @@

      PhBlit( PtWidgetRid( PtFindDisjoint( gui.vimTextArea ) ), &rect, &delta );

      - gui_clear_block(gui.scroll_region_bot - num_lines + 1, 0,
      - gui.scroll_region_bot, Columns - 1);
      + gui_clear_block(
      + gui.scroll_region_bot - num_lines + 1,
      + gui.scroll_region_left,
      + gui.scroll_region_bot,
      + gui.scroll_region_right );
      }

      void
      gui_mch_insert_lines(int row, int num_lines)
      {
      - int bottom;
      PhRect_t rect;
      PhPoint_t delta;

      - rect.ul.x = FILL_X( 0 );
      + rect.ul.x = FILL_X( gui.scroll_region_left );
      rect.ul.y = FILL_Y( row );

      - rect.lr.x = FILL_X( Columns ) - 1;
      - bottom = gui.scroll_region_bot - num_lines + 1;
      - rect.lr.y = FILL_Y( bottom ) - 1;
      + rect.lr.x = FILL_X( gui.scroll_region_right + 1 ) - 1;
      + rect.lr.y = FILL_Y( gui.scroll_region_bot - num_lines + 1 ) - 1;

      PtWidgetOffset( gui.vimTextArea, &gui_ph_raw_offset );
      PhTranslatePoint( &gui_ph_raw_offset, PtWidgetPos( gui.vimTextArea, NULL ) );
      @@ -2033,7 +2028,8 @@

      PhBlit( PtWidgetRid( PtFindDisjoint( gui.vimTextArea ) ) , &rect, &delta );

      - gui_clear_block( row, 0, row + num_lines - 1, Columns -1 );
      + gui_clear_block( row, gui.scroll_region_left,
      + row + num_lines - 1, gui.scroll_region_right );
      }

      void
      @@ -2257,7 +2253,7 @@
      }

      /* Change the position of a menu button in the parent */
      - void
      + static void
      gui_ph_position_menu( PtWidget_t *widget, int priority )
      {
      PtWidget_t *traverse;
    Your message has been successfully submitted and would be delivered to recipients shortly.